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

Adding process section to 'Contributing' #31

Merged
merged 3 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#### Labels

Assign of these labels to the PR:
- norelease
- release:patch
- release:minor
- release:major

#### Introduction

In the introduction, please describe the type of change introduced by the pull request and its purpose and link the GitHub issue that this pull request addresses if possible, or add any reference that would provide more context to the reviewer.
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
44 changes: 44 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,47 @@ Before opening a pull request, please make sure that all of the following requir
2. all public API classes, functions, methods, and properties have docstrings and follow the [Google Python Style Guide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings)
3. docstrings on private objects are not required, but are encouraged where they would significantly aid understanding
1. testing is done using the pytest library, and test coverage should not unnecessarily decrease.


## Process

### Versioning

NDK uses [semantic versioning](https://en.wikipedia.org/wiki/Software_versioning#Semantic_versioning) to identify its releases.

We use the [release on push](https://github.com/rymndhng/release-on-push-action/tree/master/) github action to generate the new version for each release. This github action generates the version based on a pull request label assigned before merge. The supported labels are:

- `release-patch`
- `release-minor`
- `release-major`
- `norelease`

### Automatic release

Merged pull requests with one of the labels `release-patch`, `release-minor` or `release-major` will trigger a release job on CI.

The release job will:

1. generate a new package version using semantic versioning provided by [release on push](https://github.com/rymndhng/release-on-push-action/tree/master/)
1. update the `pyproject.toml` version using `poetry`
1. commit the updated `pyproject.toml` file using the [git-auto-commit action](https://github.com/stefanzweifel/git-auto-commit-action/tree/v4/)
1. push the package to pypi using [poetry publish](JRubics/[email protected])
1. build a new docker image and tag it with the previously generated semantic version

Pull requests merged with the tag `norelease` will not trigger any of the actions listed above.

### Checking NDK documentation on CI

All pull requests trigger a CI job that builds the documentation and makes the built files available.

To check the generated documentation in a pull request:

1. Scroll to the bottom of the page and click on the `Show all checks` link.
1. Click on the details link of the `ci/circleci: build_docs` job.
<figure markdown>
![Circle-ci-check](images/circle-ci-check.png)
</figure>
1. In the opened Circle CI page click on the `Artifacts` tab and then choose the page you'd like to see (e.g. `index.html` to load the documentation root page). Note that each page has to be opened individually from the `Artifacts` folder, as redirects between pages do not work in this setup.
<figure markdown>
![Circle-ci-artifacts](images/circle-ci-artifacts.png)
</figure>
Binary file added docs/images/circle-ci-artifacts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/circle-ci-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.