Provide machine-readable optional dependencies?
Congratulations on 7.5!
Downstream on conda-forge, noted that markdown is needed for the test suite to run. Exciting!
However, it would be lovely to have a centralized place for this kind of information, and future optional dependencies changes.
This would certainly make it easier for downstreams such as conda-forge, but could also provide a actionable user messages
Design ideas:
One approach would be to leverage python's optional dependencies, which could be captured in various schemes with the robotframework[extra1,extra2] syntax.
This might look like:
setup(
# ...
extras_require={
"gfm": [
"pygments",
"robotframework[markdown]",
],
"markdown": [
"markdown",
],
"utest": [
"robotframework[markdown]",
# ....
]
#... and pyte, xml, yaml, and...
},
)pretty verbose, but, selfishly: i like seeing diffs of sorted lists )
Or, with fancy new pyproject.toml, which can separate out unexported names in dependency-groups:
[project.optional-dependencies]
gfm = [
"robotframework[markdown]",
"pygments"
]
markdown = [
"markdown",
]
# ...
[dependency-groups]
utest = [
"robotframework[markdown]",
# ... actual unique test deps
]this would also work if moving all of the
setup.pycontent over topyproject.toml, with a tinysetup.pyof__import__('setuptools').setup()which wouldn't require any docs changes... though maybe some automation
I'd be happy to work up a strawman PR for either approach, if desired.
Source: robotframework/robotframework