- Python >= 3.8
pip install -r requirements_dev.txt
black <directory>
e.g.
black sgnlp/
Unit and integration tests scripts are all stored in the tests
folder.
In order for unit tests in Tests
folder to import the modules properly, please add the root of the repository to the
Python path variable prior to running test cases.
For Linux
export PYTHONPATH=.
For Windows
set PYTHONPATH=%cd%
Below is the example to execute all test cases in the tests
folder, commands are executed at the root
of the repository.
Using Pytest package
# Run all
pytest tests/
# Run slow tests only
pytest -m slow tests/
# Run non-slow tests only
pytest -m 'not slow' tests/
# Run single script
pytest <path/to/script>
- Merge all changes to be released into
dev
branch - Merge
dev
intomain
- Update version in
setup.py
to the correct version - Commit the change and tag it in Github
- Publish to PyPI
- Update demo_api and gitlab pipelines accordingly to deploy to production.
- Run production pipelines to build relevant demo apis.
- Continue deployment process in frontend/helm repo.
-
Requires
twine
-
Increment version number in
setup.py
rm -rf build dist sgnlp.egg-info/
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*