Skip to content

Commit c799cc6

Browse files
committed
Add release notes
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent cca5c6b commit c799cc6

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

RELEASE_NOTES.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,53 @@
1414

1515
- If you are upgrading without regenerating the cookiecutter templates, you'll need to adjust the dependencies accordingly.
1616

17+
- `nox`: The `Config.package_args()` method was removed.
18+
19+
- `mypy`
20+
21+
* Options must be specified in the `pyproject.toml` file, including the option `packages` specifying the package containing the source code of the project. The documentation was updated to suggest the recommended options.
22+
23+
* Dependencies on *stubs* for running the type check need to be specified manually in the `pyproject.toml` file, so they can be pinned (before they were installed automatically by `mypy`.
24+
25+
* The `mypy` `nox` session runs `mypy` 2 times, one without options to check the package including the sources, and one with the paths of development paths (`tests`, `benchmarks`, etc.).
26+
27+
To migrate existing projects:
28+
29+
1. Add the recommended options (previously specified in the default options object):
30+
31+
```toml
32+
[tool.mypy]
33+
explicit_package_bases = true
34+
namespace_packages = true
35+
packages = ["<package.name>"] # For example: "frequenz.repo.config" for this package
36+
strict = true
37+
```
38+
39+
2. Find out which *stubs* were previously installed automatically by `mypy`:
40+
41+
```sh
42+
python -m venv tmp_venv
43+
. tmp_venv/bin/activate
44+
pip install -e .[dev-mypy]
45+
mypy --install-types
46+
deactivate
47+
```
48+
49+
3. Look at the list of packages it offers to install and answer "no".
50+
51+
4. Search for the latest package version for those packages in https://pypi.org/project/<package-name>/
52+
53+
5. Edit the `pyproject.toml` file to add those dependencies in `dev-mypy`, for example:
54+
55+
```toml
56+
[project.optional-dependencies]
57+
dev-mypy = [
58+
"mypy == 1.5.1",
59+
"types-setuptools == 68.1.0.0",
60+
# ...
61+
```
62+
63+
1764
### Cookiecutter template
1865

1966
- CI: The `nox` job now uses a matrix to run the different `nox` sessions in parallel. If you use branch projection with the `nox` job you need to update the rules to include each matrix job.
@@ -26,6 +73,8 @@
2673

2774
- `darlint` was replaced by `pydoclint`, which is way faster and detect more issues.
2875

76+
- `nox`: The `Config.path_args()` method now accepts two optional arguments to control with paths to include.
77+
2978
### Cookiecutter template
3079

3180
- Now dependabot updates will be done weekly and grouped by *required* and *optional* for minor and patch updates (major updates are still done individually for each dependency).

0 commit comments

Comments
 (0)