Skip to content

Commit e0fbea7

Browse files
authored
Fix version number in docs and prepare new release (#116)
- Clear release notes - Fix outdated version in migrating and upgrading docs - Clear release notes for release - Bump version number in the docs
2 parents 85d85bf + 16842ac commit e0fbea7

File tree

10 files changed

+31
-111
lines changed

10 files changed

+31
-111
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ directory will be created with the generated project name. For example:
4242
cd ~/devel
4343
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
4444
--directory=cookiecutter \
45-
--checkout v0.5.0
45+
--checkout v0.5.1
4646
```
4747

4848
This command will prompt you for the project type, name, and other

RELEASE_NOTES.md

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,5 @@
11
# Frequenz Repository Configuration Release Notes
22

3-
## Summary
4-
5-
This release adds linting of code examples in *docstrings*, a workflow to check if PRs have updated the release notes and an [editorconfig](https://editorconfig.org/) file, as well as a bunch of bug fixes.
6-
7-
## Upgrading
8-
9-
- nox: Now the default configuration for API repositories will not automatically add `pytests` as an `extra_path`
10-
11-
The `pytests` directory is not a standard directory that will be auto-discovered by `pytest`, so it should always be included in the `pyproject.toml` file, in the `tool.pytest.ini_options.testpaths` array. Please check your API project is properly configured.
12-
13-
### Cookiecutter template
14-
15-
- To make the new workflow to check if release notes were updated you should add the check to the branch protection rules of your repository to require this check to pass. You should also add a new label *"cmd:skip-release-notes"* to be able to override the check. You can use the following script to do it:
16-
17-
```sh
18-
repo=... # org/repo
19-
token=... # GitHub token with the correct permissions
20-
name="cmd:skip-release-notes"
21-
desc="It is not necessary to update release notes for this PR"
22-
color="930F79"
23-
24-
# Using cURL
25-
curl -L \
26-
-X POST \
27-
-H "Accept: application/vnd.github+json" \
28-
-H "Authorization: Bearer $token" \
29-
-H "X-GitHub-Api-Version: 2022-11-28" \
30-
-d '{"name":"'"$name"'","description":"'"$desc"'","color":"'"$color"'"}' \
31-
"https://api.github.com/repos/$repo/labels"
32-
33-
# Using the gh tool (no need for a token if you already have it configured)
34-
gh api -X POST \
35-
-f name="$name" -f description="$desc" -f color="$color" \
36-
"repos/$repo/labels"
37-
```
38-
39-
## New Features
40-
41-
- Add support for linting code examples found in *docstrings*.
42-
43-
A new module `frequenz.repo.config.pytest.examples` is added with an utility function to be able to easily collect and lint code examples in *docstrings*.
44-
45-
There is also a new optional dependency `extra-lint-examples` to easily pull the dependencies needed to do this linting. Please have a look at the documentation in the `frequenz.repo.config` package for more details.
46-
47-
### Cookiecutter template
48-
49-
- Add a new GitHub workflow to check that release notes were updated.
50-
51-
This workflow will check PRs to see if a change was done in the `src/` directory, and if so, it will fail if the `RELEASE_NOTES.md` wasn't also updated.
52-
53-
Users can override this by assigning the label `cmd:skip-release-notes` to the PR for changes that don't really need a release notes update.
54-
55-
- Add `MANIFEST.in` file.
56-
57-
This makes sure that we don't ship useless files when building the distribution package and that we include all the relevant files too, like generated *.pyi files for API repositories.
58-
59-
- Add an `.editorconfig` file to ensure a common basic editor configuration for different file types.
60-
61-
- Add a `pytest` hook to collect and lint code examples found in *docstrings* using `pylint`.
62-
63-
Examples found in code *docstrings* in the `src/` directory will now be collected and checked using `pylint`. This is done via the file `src/conftest.py`, which hooks into `pytest`, so to only check the examples you can run `pylint src`.
64-
65-
!!! info
66-
67-
There is a bug in the library used to extract the examples that prevents from collecting examples from `__init__.py` files. See https://github.com/frequenz-floss/frequenz-repo-config-python/issues/113 for more details.
68-
693
## Bug Fixes
704

71-
- The distribution package doesn't include tests and other useless files anymore.
72-
73-
- nox
74-
75-
* When discovering path *extra paths*, now paths will not be added if they are also *source paths*, as we don't want any duplicates.
76-
77-
* Fix copying of `Config` and `CommandOptions` objects.
78-
79-
### Cookiecutter template
80-
81-
- Now the CI workflow will checkout the submodules.
82-
83-
- Fix adding of an empty keyword.
84-
85-
- Don't distribute development files in the source distribution.
5+
- Fix outdated version number in the migrating and upgrading documentation.

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.0",
8+
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -70,7 +70,7 @@ dev-mkdocs = [
7070
"mkdocs-material == 9.1.16",
7171
"mkdocs-section-index == 0.3.5",
7272
"mkdocstrings[python] == 0.22.0",
73-
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.0",
73+
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.1",
7474
]
7575
dev-mypy = [
7676
"mypy == 1.2.0",
@@ -79,7 +79,7 @@ dev-mypy = [
7979
]
8080
dev-noxfile = [
8181
"nox == 2023.4.22",
82-
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.0",
82+
"frequenz-repo-config[{{cookiecutter.type}}] == 0.5.1",
8383
]
8484
dev-pylint = [
8585
"pylint == 2.17.3",
@@ -88,7 +88,7 @@ dev-pylint = [
8888
]
8989
dev-pytest = [
9090
"pytest == 7.3.1",
91-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
91+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
9292
{%- if cookiecutter.type != "api" %}
9393
"pytest-mock == 3.10.0",
9494
"pytest-asyncio == 0.21.0",

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Then simply run [Cookiecutter] where you want to create the new project:
3535

3636
```sh
3737
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
38-
--directory=cookiecutter --checkout v0.5.0
38+
--directory=cookiecutter --checkout v0.5.1
3939
```
4040

4141
This command will prompt you for the project type, name, and other
@@ -238,7 +238,7 @@ the files in your existing project by using `rsync` or similar tools:
238238
```sh
239239
cd /tmp
240240
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
241-
--directory=cookiecutter --checkout v0.4.0
241+
--directory=cookiecutter --checkout v0.5.1
242242
rsync -vr --exclude=.git/ new-project/ /path/to/existing/project
243243
cd /path/to/existing/project
244244
git diff
@@ -283,7 +283,7 @@ git commit -a # commit all changes
283283
cd ..
284284
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
285285
--directory=cookiecutter \
286-
--checkout v0.4.0 \
286+
--checkout v0.5.1 \
287287
--overwrite-if-exists \
288288
--replay \
289289
--replay-file project-directory/.cookiecutter-replay.json

src/frequenz/repo/config/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
# ...
245245
dev-pytest = [
246246
# ...
247-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
247+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
248248
]
249249
# ...
250250
[[tool.mypy.overrides]]
@@ -357,7 +357,7 @@
357357
requires = [
358358
"setuptools >= 67.3.2, < 68",
359359
"setuptools_scm[toml] >= 7.1.0, < 8",
360-
"frequenz-repo-config[api] >= 0.5.0, < 0.6.0",
360+
"frequenz-repo-config[api] >= 0.5.1, < 0.6.0",
361361
]
362362
build-backend = "setuptools.build_meta"
363363

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[actor] == 0.5.0",
8+
"frequenz-repo-config[actor] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -52,7 +52,7 @@ dev-mkdocs = [
5252
"mkdocs-material == 9.1.16",
5353
"mkdocs-section-index == 0.3.5",
5454
"mkdocstrings[python] == 0.22.0",
55-
"frequenz-repo-config[actor] == 0.5.0",
55+
"frequenz-repo-config[actor] == 0.5.1",
5656
]
5757
dev-mypy = [
5858
"mypy == 1.2.0",
@@ -61,7 +61,7 @@ dev-mypy = [
6161
]
6262
dev-noxfile = [
6363
"nox == 2023.4.22",
64-
"frequenz-repo-config[actor] == 0.5.0",
64+
"frequenz-repo-config[actor] == 0.5.1",
6565
]
6666
dev-pylint = [
6767
"pylint == 2.17.3",
@@ -70,7 +70,7 @@ dev-pylint = [
7070
]
7171
dev-pytest = [
7272
"pytest == 7.3.1",
73-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
73+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
7474
"pytest-mock == 3.10.0",
7575
"pytest-asyncio == 0.21.0",
7676
"async-solipsism == 0.5",

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[api] == 0.5.0",
8+
"frequenz-repo-config[api] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -50,7 +50,7 @@ dev-mkdocs = [
5050
"mkdocs-material == 9.1.16",
5151
"mkdocs-section-index == 0.3.5",
5252
"mkdocstrings[python] == 0.22.0",
53-
"frequenz-repo-config[api] == 0.5.0",
53+
"frequenz-repo-config[api] == 0.5.1",
5454
]
5555
dev-mypy = [
5656
"mypy == 1.2.0",
@@ -59,7 +59,7 @@ dev-mypy = [
5959
]
6060
dev-noxfile = [
6161
"nox == 2023.4.22",
62-
"frequenz-repo-config[api] == 0.5.0",
62+
"frequenz-repo-config[api] == 0.5.1",
6363
]
6464
dev-pylint = [
6565
"pylint == 2.17.3",
@@ -68,7 +68,7 @@ dev-pylint = [
6868
]
6969
dev-pytest = [
7070
"pytest == 7.3.1",
71-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
71+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
7272
]
7373
dev = [
7474
"frequenz-api-test[dev-mkdocs,dev-docstrings,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[app] == 0.5.0",
8+
"frequenz-repo-config[app] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -51,7 +51,7 @@ dev-mkdocs = [
5151
"mkdocs-material == 9.1.16",
5252
"mkdocs-section-index == 0.3.5",
5353
"mkdocstrings[python] == 0.22.0",
54-
"frequenz-repo-config[app] == 0.5.0",
54+
"frequenz-repo-config[app] == 0.5.1",
5555
]
5656
dev-mypy = [
5757
"mypy == 1.2.0",
@@ -60,7 +60,7 @@ dev-mypy = [
6060
]
6161
dev-noxfile = [
6262
"nox == 2023.4.22",
63-
"frequenz-repo-config[app] == 0.5.0",
63+
"frequenz-repo-config[app] == 0.5.1",
6464
]
6565
dev-pylint = [
6666
"pylint == 2.17.3",
@@ -69,7 +69,7 @@ dev-pylint = [
6969
]
7070
dev-pytest = [
7171
"pytest == 7.3.1",
72-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
72+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
7373
"pytest-mock == 3.10.0",
7474
"pytest-asyncio == 0.21.0",
7575
"async-solipsism == 0.5",

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[lib] == 0.5.0",
8+
"frequenz-repo-config[lib] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -48,7 +48,7 @@ dev-mkdocs = [
4848
"mkdocs-material == 9.1.16",
4949
"mkdocs-section-index == 0.3.5",
5050
"mkdocstrings[python] == 0.22.0",
51-
"frequenz-repo-config[lib] == 0.5.0",
51+
"frequenz-repo-config[lib] == 0.5.1",
5252
]
5353
dev-mypy = [
5454
"mypy == 1.2.0",
@@ -57,7 +57,7 @@ dev-mypy = [
5757
]
5858
dev-noxfile = [
5959
"nox == 2023.4.22",
60-
"frequenz-repo-config[lib] == 0.5.0",
60+
"frequenz-repo-config[lib] == 0.5.1",
6161
]
6262
dev-pylint = [
6363
"pylint == 2.17.3",
@@ -66,7 +66,7 @@ dev-pylint = [
6666
]
6767
dev-pytest = [
6868
"pytest == 7.3.1",
69-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
69+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
7070
"pytest-mock == 3.10.0",
7171
"pytest-asyncio == 0.21.0",
7272
"async-solipsism == 0.5",

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 67.7.2",
77
"setuptools_scm[toml] == 7.1.0",
8-
"frequenz-repo-config[model] == 0.5.0",
8+
"frequenz-repo-config[model] == 0.5.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -52,7 +52,7 @@ dev-mkdocs = [
5252
"mkdocs-material == 9.1.16",
5353
"mkdocs-section-index == 0.3.5",
5454
"mkdocstrings[python] == 0.22.0",
55-
"frequenz-repo-config[model] == 0.5.0",
55+
"frequenz-repo-config[model] == 0.5.1",
5656
]
5757
dev-mypy = [
5858
"mypy == 1.2.0",
@@ -61,7 +61,7 @@ dev-mypy = [
6161
]
6262
dev-noxfile = [
6363
"nox == 2023.4.22",
64-
"frequenz-repo-config[model] == 0.5.0",
64+
"frequenz-repo-config[model] == 0.5.1",
6565
]
6666
dev-pylint = [
6767
"pylint == 2.17.3",
@@ -70,7 +70,7 @@ dev-pylint = [
7070
]
7171
dev-pytest = [
7272
"pytest == 7.3.1",
73-
"frequenz-repo-config[extra-lint-examples] == 0.5.0",
73+
"frequenz-repo-config[extra-lint-examples] == 0.5.1",
7474
"pytest-mock == 3.10.0",
7575
"pytest-asyncio == 0.21.0",
7676
"async-solipsism == 0.5",

0 commit comments

Comments
 (0)