substra
substra copied to clipboard
Low-level Python library used to interact with a Substra network
This repository is inactive.
The Substra project is under active development as a closed-source solution. There are ongoing strategic discussions regarding the possibility of open-sourcing newer versions, but no conclusion has been reached yet.
CLI and SDK for interacting with Substra platform.
Table of contents
- Install
- Running the Substra platform locally
-
Usage
- CLI
- SDK
- Documentation
- Examples
- Compatibility table
-
Contributing
- Setup
- Documentation
- Deploy
Install
To install the command line interface and the python sdk, run the following command:
pip install substra
To enable Bash completion, you need to put into your .bashrc:
eval "$(_SUBSTRA_COMPLETE=source substra)"
For zsh users add this to your .zshrc:
eval "$(_SUBSTRA_COMPLETE=source_zsh substra)"
From this point onwards, substra command line interface will have autocompletion enabled.
Running the Substra platform locally
Check out the setup guide.
Usage
Credentials are required for using this tool.
CLI
substra --help
SDK
import substra
client = substra.Client()
# enjoy...
Documentation
- Documentation website
- Documentation repository
- Chat on Slack
Interacting with the Substra platform:
- Command line interface
- SDK
Implementing your assets in python (thanks to the substratools library)
- Objective base class
- Dataset base class
- Algo base class
- Composite algo base class
- Aggregate algo base class
Examples
- Titanic
- Cross-validation
- Compute plan
- Debugging
Compatibility table
These sets of versions have been tested for compatilibility:
Adding entries to the compatibility table
- Please ensure that all the tests from
substra-tests
pass
$ cd substra-tests
$ make test
Contributing
Setup
To setup the project in development mode, run:
pip install -e .[test]
To run all tests, use the following command:
python setup.py test
Documentation
To generate the command line interface documentation, sdk and schemas documentation, the python
version
must be 3.7. Run the following command:
make doc
Documentation will be available in the references/ directory.
Deploy
Deployment to pypi.org should be automatic thanks to Travis but if you need to do it manually, here is what you need to do:
rm -rf dist/*
python3 setup.py sdist bdist_wheel
twine upload dist/* --verbose