Open xrotwang opened 3 years ago
@LinguList @PhyloStar we can keep this functionality or remove it. I just wanted to show off termgraph :)
Cool package ;)
I think we should keep some command functionality. One problem I had in the past were dependencies, since having extra deps like matplotlib and the like will yield a lot of warnings in fresh virtual environments. For this reason, I now switched to adding commands to a scripts folder and executing them with Python directly. So I am also hesitant with respect to commands we apply for the LSI in general.
Ah, yes, that's true. We wouldn't want to install matplotlib just to run the CLDF validation in CI, e.g.
I was wondering if we have the chance to make a workaround here, similar to the different installation options one has.
We have a setup.py
- so declaring matplotlib
as optional requirement via extras_require should work.
the problem is: if it is not installed, there will be a warning / error,
since the commands are completely loaded when you call cldfbench
. So
the question is: can we suppress loading, or should we make a library
check, like try: import matplotlib except matplotlib=None
or similar?
Oh, yes. Optional requirements need a try ... except ImportError
when loaded. Ideally with suitable info messages - something like install as pip install .[extra]
.
Mostly because I like the
termgraph
package so much, I cobbled together a command that shows distribution of sounds among the languages of the survey.