This package uses GitHub workflows for automated tests, reviewable.io for code reviews. We strongly recommend setting up pre-commit so that the basic style and formatting checks run as part of your git commit hooks.
Netconan has not yet released a 1.0.0 release, so we are using alpha releases in the 0.xx.yy series. The version number is stored in netconan/__init__.py. On the master branch, it is always 0.<next-minor>.0.dev, while in release branches we remove the .dev.
All releases are cut from release branches named release-0.xx branch. Note that we do not include the .yy extension for the patch version in the branch name. Instead, the same branch contains a series of commits corresponding to the patches.
Suppose that the latest release was v0.12.3. That means that in the master branch, the version is listed as 0.13.0.dev and the next minor release will be v0.13.0.
- To create the branch, run
git checkout -b release-0.13. - Modify
netconan/__init__.pyand update the version to0.13.0(remove the.dev). - Commit the version change and push the branch to GitHub.
- Go back to the master branch, and bump the minor version to
0.14.0.dev.
- Create a clean release branch following the steps above.
- Ensure the version number in netconan/__init__.py has been updated (no .dev extension).
- Push the branch to GitHub.
- Go to the GitHub repository and navigate to the "Actions" tab.
- Select the "Publish Python Package" workflow.
- Click "Run workflow" and select the release branch.
- Choose the target repository (pypi or testpypi).
- Click "Run workflow".
- Once the workflow completes successfully, the package will be published to the selected repository.
- Create a GitHub release as described above (for PyPI releases only).
Before publishing a package to the main PyPI repository, it's recommended to test it with TestPyPI:
- Follow the steps above for building a release with GitHub Actions, but select "testpypi" as the target repository.
- Once published to TestPyPI, you can install the package using:
` pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ netconan ` - Verify that the package installs correctly and functions as expected.
- If everything works as expected, run the workflow again but select "pypi" as the target repository.