Creating a new release of the NC requires 4 steps
- Prepare the release
- Merge your pull request to the default branch
- Switch to main branch and update it from remote
- Create and push a tag to GitHub
poetry run nox -s release:prepare -- -- <additional-options> <version>
<additional-options>
include
--no-branch
if already working on a branch--no-pr
if you already created a pull request or plan to do so manually after preparing the release
The command uses the nox task project:fix
of the Python Tool
Box (PTB) and
- Optionally creates a branch
- Optionally creates a pull request
- Updates the version number and the Change Log
Updating the Change Log includes
- Moving file
doc/changes/unreleased.md
to a filename reflecting the specified version, e.g.doc/changes/changes_1.2.3.md
- Updating the list of changes files in
doc/changes/changelog.md
- Adding the current date at the top of the changelog as the date of the release
- Creating a new file
doc/changes/unreleased.md
You can find out the default branch with
git remote show origin | sed -n '/HEAD branch/s/.*: //p'
The following commands switches to branch main
and updates it from remote
git checkout main
git pull
Use the following commands to create a Git Tag and push it to GitHub:
TAG=<version>
git tag "$TAG"
git push origin "$TAG"
Pushing the new tag to GitHub will trigger GitHub workflow ci-cd.yml
.
The workflow completely automates the release process, incl.
- Creating a release on GitHub and
- Publishing the release to PyPi
You can use the following commands to manually update the version number without preparing a release:
- Update version in file
pyproject.toml
or callpoetry version <version>
- Call
poetry run version-check version.py --fix
The second command will update the version number in file version.py
.
NC contains multiple dependencies including the following
Dependency | Defined in | Example |
---|---|---|
script-languages-container-tool (SLCT) |
File pyproject.toml | exasol-script-languages-container-tool = "^1.0.0" |
A release of the Exasol Script Language Containers script-languages-release (SLCR) |
File exasol/nb_connector/slct_manager.py | SLC_RELEASE_TAG = "9.1.0" |
Additionally, each version of the SLCR depends on a specific version of the SLCT, see the SLCR release letters and the file pyproject.toml
used by any specific released version of the SLCR.
Conclusion: Whenever you update the major version of script-languages-container-tool
in pyproject.toml
you will need to update the referenced tag of SLCR in slct_manager.py
For the versions named in the table above
- SLCR version 9.1.0 in the release letter, section "Script-Language-Container-Tool (Exaslct)" states "This release uses version 1.0.0 of the container tool."
- When clicking on the commit 60492ad and "Browse files", then SLCR's file pyproject.toml shows
exasol-script-languages-container-tool = "^1.0.0"
In this case the dependencies shown in the table above are ✅ valid as NC's file pyproject.toml
depends on the same major version of SLCT.
Check if the referred version of SLCR is also compatible with the version of SLCT:
- Go to SLCR releases
- Search for the SLCR version referenced in NC's file
exasol/nb_connector/slct_manager.py
- Check if in the SLCR release, file
pyproject.toml
, dependencyscript-languages-container-tools
has the same major version