Command line interface to the ReCodEx system.
- Python 3.9+
- See
requirements.txt
pip install recodex-cli
See recodex --help
after installation.
- clone the repository
- install dependencies using
pip install -r requirements.txt
in the root directory of the repository
The package can be installed locally using pip install -e
for the development.
The CLI is easy to extend with plugins. This way, you can add subcommands to the recodex
command without touching the
source of the core, while the CLI takes care of storing access tokens for you.
A minimal plugin must contain package with a Click command and a setup.py
file that looks
like this:
from setuptools import setup
# ...
setup(# ...
entry_points={
'recodex': [
'my_plugin_name = my_plugin_package.plugin:cli_function'
]
}
# ...
)
When this is ready, you can install the plugin package (it is recommended to use pip install -e .
for development).
The entry point configuration allows the ReCodEx CLI to find your plugins whenever you run it.
Your entry point (the Click command) can use the @pass_api_client
, @pass_user_context
and other decorators from the
recodex.decorators
module.
For examples of plugins (including decorator usage), check out the recodex.plugins
package in this repository.
Unit tests are using py.test and are located in the /tests
directory.
- unit tests:
pytest