mad-lab-fau / carwatch-python

Python package for "CARWatch – An Open-Source Framework for Improving Cortisol Awakening Response Sampling"
https://www.mad.tf.fau.de/research/projects/carwatch/
MIT License
2 stars 1 forks source link

Register CLI as script entrypoint #24

Closed AKuederle closed 1 year ago

AKuederle commented 1 year ago

At the moment, the only way to use the cli is to clone the repo and install it as developer.

However, in Python there is an easier way. You can register a script as a script entrypoint (https://python-poetry.org/docs/pyproject/#scripts)

This way, the script will be installed as global binary, when the package is installed. I.e. after doing pip install carwatch you would be able to just call generate_labels from anywhere in the commandline.

Note, probably you should rename the script entrypoint to carwatch_generate_labels to avoid naming conflicts)