I have a small python project "tsdb" using hatch for packaging.
The projects develops a python package and includes a demo using Streamlit. Since not everyone needs the demo and since Streamlit has a lot of dependencies, I make it an optional dependency (or a feature, as it is called in the documentation):
[project.optional-dependencies]
gui = [ "streamlit" ]
To make the demo easier to use, I add the following entry point (script):
[project.scripts]
tsdb-demo = "tsdb.scripts.run_streamlit:run"
This works, except that tsdb-demo throws an error when the package is installed without [gui] (since it is missing Streamlit).
It there a way to specify that the entry point should get installed only with [gui]?
And if not, what is the recommended/standard approach in these cases: should I put the demo into a separate package. And if so, can/should this be done within the same git repo, or should I have two separate repos?