Deployment
The package is distributed on PyPI and deployment is tested on TestPyPI. Therefore, a developer wishing to deploy the package must have acounts on both websites. To request access to the project, please contact Stephen Liu at stephen.liu21@imperial.ac.uk. This package is currently deployed manually.
Please follow the steps on PyPI and TestPyPI to generate the necessary API tokens. Then in a ~./pypirc file enter:
[testpypi]
username = __token__
password = <YOUR TOKEN HERE>
[pypi]
username = __token__
password = <YOUR TOKEN HERE>
Note
Why not a CD deployment? NekUpload GUI uses tkinter, which does not have a comprehensive GUI testing framework. Therefore, manual testing is necessary to double check the GUI functionality.
Manual Upload Procedure
Go into pyproject.toml and update the version (use semantic versioning). Then build the package:
python3 -m build
This creates dist/*.tar.gz and dist/*whl.
Tip
It is sometimes useful to delete any pre-existing dist/ files.
Then upload to TestPyPI:
twine upload --repository testpypi dist/*
For testing purposes, create a new virtual environment and download the package. TestPyPI doesn’t mirror real PyPI packages, so both indexes must be specified:
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple NekUpload
Check the user interface functions and basic functionality works. Once verified, deploy the package to PyPI:
twine upload dist/*