This document contains some notes on distributing NASim via PyPi. This is mainly as a reminder for the steps to take when releasing an update.
Unless specified otherwise, all bash commands are assumed to be executed from the root directory of the NASim package.
Before pushing to master¶
- Ensure all tests are passing by running:
cd test pytest
- Ensure updates are included in the What’s new section of the README.rst and docs/source/index.rst files (this step can be ignored for very small changes)
- Ensure any necessary updates have been included in the documentation.
- Make sure the documentation can be built by running:
cd docs make html
setup.pyhas been updated to reflect any version and/or dependency changes.
After changes have been pushed¶
If pushing a new version (MAJOR, MINOR, or MICRO), do the following:
- Add a tag with the release number to the commit.
- On github create a new release and link it to the tagged commit
- Publish the new release to PyPi:
# build distributions python setup.py sdist bdist_wheel # upload latest distribution builds to pypi # this will ask for PyPi username and password python -m twine upload dist/* --skip-existing
- Login to https://pypi.org/ and verify latest version is added correctly.
- Visit https://networkattacksimulator.readthedocs.io/en/latest/index.html and check documentation has updated correctly (make sure to refresh browser cache to ensure your looking at the latest version.)