Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare release 5.0.0 #121

Merged
merged 4 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/docs/changelog/changes_5.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 5.0.0 - 2023-10-08

🚀 This release is powered by **Gert van Dijk**, thank you for your contribution!

## 🚨 Breaking Changes
* Move from a single-file/module to an ‘src-based layout’ package.

The layout of the source repository has changed from single file `crc.py` in the
root into a package where `crc.py` is now a private module `_crc.py` of package
`crc`.

```
src/
└── crc/
├── _crc.py
└── __init__.py
```

`__init__.py` re-exports all the public entities from the private module, so that
typical imports like `from crc import Calculator` remain working as-is.

The need and choice for this new layout is discussed in [Issue #110][issue-110].

* The shebang line on the main `src/crc/_crc.py` file (formerly `crc.py`) has been
removed.

This shouldn't affect anyone installing `crc` as package. Both the entrypoint `crc`
and the package-level `__main__` remain in place.

However, in case you were to obtain the `src/crc/_crc.py` file (formerly `crc.py`)
and mark it as executable afterwards to run it directly, then this change may affect
you. Running the `main()` function can then still be achieved by either:

- `python path/to/crc.py`
- `python -m crc` (if the module is on your `PYTHON_PATH`)

## ✨ Added
* Add `py.typed` marker to indicate the `crc` package ships with type information. The
type information was added inline since [2.0.0](changes_2.0.0.md), but the marker file
was missing in the package, so type checkers did not consider the type information.
This eliminates the use of `ignore_missing_imports` (mypy) or `reportMissingTypeStubs`
(Pylance/Pyright) in downstream projects.

## 📚 Documentation
* Add contributors page

## 🔩 Internal / Development
* Several improvements to type annotations:
* Conform to mypy in strict mode.
* Type information now follows a more modern syntax by implementing recommendations
from PEPs [563][PEP 563], [585][PEP 585], [604][PEP 604] while maintaining
support for Python 3.8.
* Declare all instance variables on classes.
* Create a Type Alias for a complex Union used repetitively.
* Remove unnecessary parentheses and `start` argument in `range()`.
* Remove unused imports.
* Update lockfile.

[issue-110]: https://github.com/Nicoretti/crc/issues/110
[PEP 563]: https://peps.python.org/pep-0563/
[PEP 585]: https://peps.python.org/pep-0585/
[PEP 604]: https://peps.python.org/pep-0604/
56 changes: 0 additions & 56 deletions docs/docs/changelog/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,57 +1 @@
# Unreleased

## 🚨 Breaking Changes
* Move from a single-file/module to an ‘src-based layout’ package.

The layout of the source repository has changed from single file `crc.py` in the
root into a package where `crc.py` is now a private module `_crc.py` of package
`crc`.

```
src/
└── crc/
├── _crc.py
└── __init__.py
```

`__init__.py` re-exports all the public entities from the private module, so that
typical imports like `from crc import Calculator` remain working as-is.

The need and choice for this new layout is discussed in [Issue #110][issue-110].

* The shebang line on the main `src/crc/_crc.py` file (formerly `crc.py`) has been
removed.

This shouldn't affect anyone installing `crc` as package. Both the entrypoint `crc`
and the package-level `__main__` remain in place.

However, in case you were to obtain the `src/crc/_crc.py` file (formerly `crc.py`)
and mark it as executable afterwards to run it directly, then this change may affect
you. Running the `main()` function can then still be achieved by either:

- `python path/to/crc.py`
- `python -m crc` (if the module is on your `PYTHON_PATH`)

## ✨ Added
* Add `py.typed` marker to indicate the `crc` package ships with type information. The
type information was added inline since [2.0.0](changes_2.0.0.md), but the marker file
was missing in the package, so type checkers did not consider the type information.
This eliminates the use of `ignore_missing_imports` (mypy) or `reportMissingTypeStubs`
(Pylance/Pyright) in downstream projects.

## 🔩 Internal / Development
* Several improvements to type annotations:
* Conform to mypy in strict mode.
* Type information now follows a more modern syntax by implementing recommendations
from PEPs [563][PEP 563], [585][PEP 585], [604][PEP 604] while maintaining
support for Python 3.8.
* Declare all instance variables on classes.
* Create a Type Alias for a complex Union used repetitively.
* Remove unnecessary parentheses and `start` argument in `range()`.
* Remove unused imports.
* Update lockfile.

[issue-110]: https://github.com/Nicoretti/crc/issues/110
[PEP 563]: https://peps.python.org/pep-0563/
[PEP 585]: https://peps.python.org/pep-0585/
[PEP 604]: https://peps.python.org/pep-0604/
2 changes: 1 addition & 1 deletion docs/docs/contributors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributors

Thank you to all contributors for helping to improve this project. 🚀
Thank you to all contributors for your help in improving this project. 🚀

* Gert van Dijk
* Dependabot
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ nav:
- Development:
- "development/setup.md"
- "development/release.md"
- "contributors.md"
- Changelog:
- "changelog/unreleased.md"
- "changelog/changes_4.3.0.md"
Expand All @@ -30,6 +29,7 @@ nav:
- "changelog/changes_3.0.1.md"
- "changelog/changes_3.0.0.md"
- "changelog/changes_2.0.0.md"
- "contributors.md"
theme:
name: material
icon:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "crc"
version = "4.3.0"
version = "5.0.0"
description = "Library and CLI to calculate and verify all kinds of CRC checksums"
packages = [
{ include = "crc", from = "src" },
Expand Down