Skip to content

Commit 7fce493

Browse files
authored
Prepare release of version 0.4.0 (#72)
* Add release notes for version 0.4.0 Created with the help of changelist. * Add current preparation PR itself to notes
1 parent 2afc549 commit 7fce493

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

docs/release_notes/v0.4.0.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# docstub 0.4.0
2+
3+
We're happy to announce the release of docstub 0.4.0! 🎉
4+
5+
## Highlights
6+
7+
- **Inline annotations override types in docstrings**
8+
This provides a fallback and a solution in case docstub is missing support
9+
or if Python's type system can't express what you want to say in the docstring ([#61](https://github.com/scientific-python/docstub/pull/61)).
10+
11+
- **Derive types from import statements in parsed files**
12+
Types imported in your project are made implicitly available to reference in docstrings.
13+
You no longer need to declare them explicitly in configuration ([#63](https://github.com/scientific-python/docstub/pull/63)).
14+
15+
- **Ignore files**
16+
A new command line option `--ignore` and a config option `ignore_files` now help you ignore files you don't want to create stubs for ([#60](https://github.com/scientific-python/docstub/pull/60)).
17+
18+
Find a more detailed list of pull requests contributing to this release below.
19+
20+
## Enhancement
21+
22+
- Ensure that existing inline annotations aren't overridden by annotations in docstrings. This allows documenting types inside docstrings that are not (yet) supported by Python's type system. Instead, more general inlined type annotations can be used as a fallback. Previously, annotations in docstrings would take precedence ([#61](https://github.com/scientific-python/docstub/pull/61)).
23+
- Add new command line option `--ignore` and config option `ignore_files`. Both allow ignoring directories or files in the package directory that docstub is invoked on ([#60](https://github.com/scientific-python/docstub/pull/60)).
24+
- Use import statements in the parsed package to collect additional type information. This makes imported types available in the same module scope to be used in docstrings. Some of the imports can be used package wide even if not imported there. E.g. `from pathlib import Path` will allow using "Path" inside the modules scope. Outside of that module, you must use the full `pathlib.Path` to reference that type ([#63](https://github.com/scientific-python/docstub/pull/63)).
25+
- Type nicknames specified in the configuration are now resolved recursively. That means one nickname can point to another nickname ([#63](https://github.com/scientific-python/docstub/pull/63)).
26+
- Add `--no-cache` option to `docstub run` which avoids creating or reading to a cache entirely; mostly useful during development. Also note when the cache is used during type collection ([#69](https://github.com/scientific-python/docstub/pull/69)).
27+
- Add `docstub clean` command to remove temporary files such as the cache directory ([#69](https://github.com/scientific-python/docstub/pull/69)).
28+
- Relax grammar for specifying optional and additional information after type descriptions in docstrings. You can now specify as much optional information after the first top-level comma as you want and in arbitrary order, e.g., `some_param: int, in range (0, 1), optional`. This optional information is ignored by docstub ([#70](https://github.com/scientific-python/docstub/pull/70)).
29+
30+
## Bug Fixes
31+
32+
- Avoid an AttributeError when using a union of dtypes in an array expression ([#52](https://github.com/scientific-python/docstub/pull/52)).
33+
- Support referencing types from `collections.abc` and `typing` with their module name included. So `collections.abc.Iterable` should work now ([#53](https://github.com/scientific-python/docstub/pull/53)).
34+
- Make sure that no warning is raised for inline annotations, if there is no conflicting annotation in a docstring. Otherwise, the inlined annotation takes precedence and a warning is printed ([#66](https://github.com/scientific-python/docstub/pull/66)).
35+
- Nesting natural language containers didn't work in all cases. Now, doctypes like `list of (list of int)` will work. For complex nested types, falling back to Python's typing syntax might be more readable though ([#71](https://github.com/scientific-python/docstub/pull/71)).
36+
37+
## Documentation
38+
39+
- Add a reference document for the configuration file ([#60](https://github.com/scientific-python/docstub/pull/60)).
40+
41+
## DevOps
42+
43+
- Fix broken diff check due to changed output behavior ([#54](https://github.com/scientific-python/docstub/pull/54)).
44+
- Add pull request template for changelist ([#67](https://github.com/scientific-python/docstub/pull/67)).
45+
46+
## Maintenance
47+
48+
- Improve walking of the source directory ([#68](https://github.com/scientific-python/docstub/pull/68)).
49+
- Prepare release of version 0.4.0 ([#72](https://github.com/scientific-python/docstub/pull/72)).
50+
51+
## Contributors
52+
53+
2 authors added to this release (alphabetically):
54+
55+
- Lars Grüter ([@lagru](https://github.com/lagru))
56+
- Oriol Abril-Pla ([@OriolAbril](https://github.com/OriolAbril))
57+
58+
2 reviewers added to this release (alphabetically):
59+
60+
- Lars Grüter ([@lagru](https://github.com/lagru))
61+
- Stefan van der Walt ([@stefanv](https://github.com/stefanv))

0 commit comments

Comments
 (0)