You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also prepare for the v0.5.0 release.
- Update repo-config version
- Add support for linting code examples in docstrings
- Add support for the `part:pytest` label
- mkdocs: Ignore the top-level `conftest` module
- Lint docstrings examples
- Skip examples linting for `__init__.py` files
- cookiecutter: Add a `pytest` hook to lint docstring examples
- Add summary to release notes
Fixesfrequenz-floss#27.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Summary
4
4
5
-
<!-- Here goes a general summary of what this release is about -->
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
6
7
7
## Upgrading
8
8
@@ -38,6 +38,12 @@
38
38
39
39
## New Features
40
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
+
41
47
### Cookiecutter template
42
48
43
49
- Add a new GitHub workflow to check that release notes were updated.
@@ -52,6 +58,14 @@
52
58
53
59
- Add an `.editorconfig` file to ensure a common basic editor configuration for different file types.
54
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
+
55
69
## Bug Fixes
56
70
57
71
- The distribution package doesn't include tests and other useless files anymore.
0 commit comments