Skip to content

Commit 81cc140

Browse files
authored
Merge branch 'develop' into 174-create-pr-template
2 parents f98762b + 7c58d1b commit 81cc140

File tree

3 files changed

+46
-10
lines changed

3 files changed

+46
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
[PR #181](https://github.com/appliedAI-Initiative/pyDVL/pull/181)
77
- Simplified and fixed publishing to PyPI from CI
88
[PR #183](https://github.com/appliedAI-Initiative/pyDVL/pull/183)
9-
- Added Pull Request template [PR #185](https://github.com/appliedAI-Initiative/pyDVL/pull/185)
9+
- Fixed bug in release script and updated contributing docs.
10+
[PR #184](https://github.com/appliedAI-Initiative/pyDVL/pull/184)
11+
- Added Pull Request template
12+
[PR #185](https://github.com/appliedAI-Initiative/pyDVL/pull/185)
1013

1114

1215
## 0.2.0 - 📚 Better docs

CONTRIBUTING.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,20 @@ any rst files which are not manually created), you can use a file watcher.
173173
This is not part of the development setup of pyDVL (yet! PRs welcome), but
174174
modern IDEs provide functionality for this.
175175

176+
Use the **docs** tox environment to build the documentation the same way it is done in CI:
177+
178+
```bash
179+
tox -e docs
180+
```
181+
182+
Locally, you can use the **docs-dev** tox environment to continuously rebuild docs on changes:
183+
184+
```bash
185+
tox -e docs-dev
186+
```
187+
188+
**NOTE:** This currently only rebuilds on changes to `.rst` files and notebooks.
189+
176190
### Writing mathematics
177191

178192
In sphinx one can write mathematics with the directives `:math:` (inline) or
@@ -201,7 +215,19 @@ def f(x: float) -> float:
201215

202216
## CI and release processes
203217

204-
#### Automatic release process
218+
### Skipping CI run
219+
220+
You sometimes would like to skip CI for certain commits (e.g. updating the readme).
221+
In order to do that you can simply prefix the commit message with `[skip ci]`.
222+
223+
- Other strings, like `[ci skip]` are allowed, but we prefer `[skip ci]`.
224+
- The string doesn't have to be at the beginning of the commit message, but we prefer doing it
225+
that way because it makes it immediately apparent when looking at commits in a PR.
226+
227+
Refer to the official [Github documentation](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs)
228+
for more information.
229+
230+
### Automatic release process
205231

206232
In order to create an automatic release, a few prerequisites need to be
207233
satisfied:
@@ -212,7 +238,7 @@ satisfied:
212238

213239
Then, a new release can be created using the script
214240
`build_scripts/release-version.sh` (leave out the version parameter to have
215-
`bumpversion` automatically derive the next release version):
241+
`bumpversion` automatically derive the next release version by bumping the patch part):
216242

217243
```shell script
218244
./scripts/release-version.sh 0.1.6
@@ -228,14 +254,17 @@ If running in interactive mode (without `-y|--yes`), the script will output a
228254
summary of pending changes and ask for confirmation before executing the
229255
actions.
230256

231-
#### Manual release process
257+
Once this is done, a package will be automatically created and published from CI to PyPI.
258+
259+
### Manual release process
260+
232261
If the automatic release process doesn't cover your use case, you can also
233262
create a new release manually by following these steps:
234263

235264
1. (Repeat as needed) implement features on feature branches merged into
236-
`develop`. Each merge into develop will advance the `.devNNN` version suffix
237-
and publish the pre-release version into the package registry. These versions
238-
can be installed using `pip install --pre`.
265+
`develop`. Each merge into develop will publish a new pre-release version
266+
to TestPyPI. These versions can be installed using `pip install --pre
267+
--index-url https://test.pypi.org/simple/`.
239268
2. When ready to release: From the develop branch create the release branch and
240269
perform release activities (update changelog, news, ...). For your own
241270
convenience, define an env variable for the release version
@@ -269,6 +298,7 @@ create a new release manually by following these steps:
269298
7. Delete the release branch if necessary:
270299
`git branch -d release/${RELEASE_VERSION}`
271300
8. Pour yourself a cup of coffee, you earned it! :coffee: :sparkles:
301+
9. A package will be automatically created and published from CI to PyPI.
272302

273303
### CI and requirements for releases
274304

@@ -296,9 +326,9 @@ part of the version number, create a tag and push it from CI.
296326
297327
To do that, we use 2 different tox environments:
298328
329+
- **bump-dev-version**: Uses bump2version to bump the dev version,
330+
without committing the new version or creating a corresponding git tag.
299331
- **publish-test-package**: Builds and publishes a package to TestPyPI
300-
- **bump-dev-version-and-create-tag**: Uses bump2version to bump the dev version,
301-
commit the new version and create a corresponding git tag.
302332
303333
304334
## Other useful information

build_scripts/release-version.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function _parse_opts() {
5252

5353
DEBUG=
5454
EDIT_CHANGELOG=
55+
DELETE_BRANCH=1
5556
FORCE_YES=
5657
HELP=
5758
REMOTE="origin"
@@ -99,6 +100,7 @@ function _parse_opts() {
99100
fi
100101

101102
export DEBUG
103+
export DELETE_BRANCH
102104
export EDIT_CHANGELOG
103105
export FORCE_YES
104106
export HELP
@@ -156,7 +158,7 @@ function _confirm() {
156158
🔍 Summary of changes:
157159
- Pull latest remote version of ${bold}develop${normal} (fast-forward only) from $REMOTE
158160
- Create branch ${bold}$RELEASE_BRANCH${normal}
159-
- Bump version number: ${bold}$CURRENT_VERSION$RELEASE_VERSION${normal}
161+
- Bump version number: ${bold}$CURRENT_VERSION $RELEASE_VERSION${normal}
160162
EOF
161163

162164
if [[ -n "$EDIT_CHANGELOG" ]]; then
@@ -192,6 +194,7 @@ if [[ -n "$DEBUG" ]]; then
192194
echo "DEBUG: ${DEBUG}"
193195
echo "EDIT_CHANGELOG: ${EDIT_CHANGELOG}"
194196
echo "FORCE_YES: ${FORCE_YES}"
197+
echo "DELETE_BRANCH: ${DELETE_BRANCH}"
195198
echo "RELEASE_BRANCH: ${RELEASE_BRANCH}"
196199
echo "RELEASE_TAG: ${RELEASE_TAG}"
197200
echo "CURRENT_VERSION: ${CURRENT_VERSION}"

0 commit comments

Comments
 (0)