﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
7173	RFE: Get optional dependencies from the Toolshed and/or pip	Zach Pearson	Zach Pearson	"Tom notes that the ChimeraX distribution is growing large. I don't disagree. 

It should be possible to mark some part of a bundle's functionality as depending on a package that's not included in the distribution. Other python packages have solved this somewhat gracefully with flags in code:

{{{
_has_dep = False
try:
    import optional_dep
    _has_dep = True
except ImportError:
    _has_dep = False

...

# Code that warns the user if they hit a codepath that uses the dependency.
}}}

But I prefer a decorator:

{{{
def uses_optional(dep, func):
    try: 
        import dep
        return func
    except ImportError:
        def warn_and_attempt_install_instead():
            ... # Warn the user they need to install something, or prompt them with a popup and with consent try to install it from the toolshed
        return warn_and_attempt_install_instead
}}}

Tom noted that the ChimeraX-side code isn't the difficult part; that'll be making the Toolshed support it. 

I agree we should do a trial run with the DICOM bundle. "	enhancement	closed	moderate		Infrastructure		fixed		chimerax-programmers				all	ChimeraX
