Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add release guide to CONTRIBUTING.md #886

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ https://github.com/aeye-lab/pymovements/issues/new/choose) or write us at
- [Pull Requests](#pull-requests)
- [Continuous Integration](#continuous-integration)
- [Core Developer Guidelines](#core-developer-guidelines)
- [Releasing](#releasing)
- [License](#license)
- [Questions](#questions)

Expand Down Expand Up @@ -296,6 +297,36 @@ Make sure:
- to use Markdown for formatting.


# Publishing Releases

Before releasing a new pymovements version make sure that all integration tests pass via `tox -e integration`.

You need to register an account on [PyPI](https://pypi.org/account/register/) and request maintainer privileges for releasing new pymovements versions.

The first step is releasing on GitHub. Our [release-drafter](https://github.com/aeye-lab/pymovements/blob/main/.github/release-drafter.yml) takes care of drafting a release log which should be available on the [release page](https://github.com/aeye-lab/pymovements/releases). Please assign the listed PRs into the correct categories in the release draft. If all merged PRs adhered to the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) specification the release-drafter will have already taken care of this. Take special care for PRs that introduce breaking changes. Specify the version tag according to the [Semantic Versioning 2.0.0](https://semver.org/) specification. After publishing the release on GitHub the latest commit will be tagged with the specified version.

The next step is releasing pymovements on the PyPI repository.
This is currently done manually, so you need to run a `git pull` locally. It is recommended to use a separate local directory and not the one you use for development to make sure you are using a clean source.

Now build a new package using

```
python -m build
```

This should result in two files being created in the `dist` directory: a `.whl` file and a `.tar.gz` file. The filenames should match the specified python version. If the filenames include the word `dirty` then you need to make sure you work on a clean pymovements source. Your local files must not include any uncommited changes or files, otherwise your build will be flagged as dirty and will not be adequate for uploading.

Now you can upload your `.whl` and `.tar.gz` files via

```
python -m twine upload dist/pymovements-${VERSION}*
```

Check that the [pymovements page](https://pypi.org/project/pymovements/) at the PyPI repository features the new pymovements version.

The next step is making sure the new version is uploaded into the conda-forge repository. This part is automated via the [pymovements-feedstock](https://github.com/conda-forge/pymovements-feedstock) repository. A bot will create a PR and merge it after passing all tests. There might be issues when the new pymovements release includes changes in dependencies. You will then need to adjust the `meta.yaml` found in the `recipe` directory.


## License

Please note that by contributing to the project you agree that it will be licensed under the
Expand Down
Loading