Skip to content

Commit 7f78683

Browse files
author
Martin Møldrup
committed
Move Changelog to seperate file
1 parent ca2ff6a commit 7f78683

File tree

7 files changed

+33
-29
lines changed

7 files changed

+33
-29
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
echo "README.md file not found."
8080
exit 1
8181
fi
82-
CHANGELOG=$(awk '/^## \['${{ needs.details.outputs.new_version }}'\]/,/^## \[/' README.md | sed '1d;$d')
82+
CHANGELOG=$(awk '/^## \['${{ needs.details.outputs.new_version }}'\]/,/^## \[/' CHANGELOG.md | sed '1d;$d')
8383
if [ -z "$CHANGELOG" ]; then
8484
echo "Changelog for version ${{ needs.details.outputs.new_version }} not found."
8585
exit 1

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
## [0.2.0]
5+
- Better error messages by using pytest assertion rewriting
6+
- Allow users to set the snapshot directory when using the load_snapshot fixture
7+
8+
## [0.1.1]
9+
- Update dependencies with the lower bounds of package compatibility
10+
- Refactor to make code easier for users of package to modify and extend
11+
12+
## [0.1.0]
13+
- Added fixture for loading snapshots from previous tests (load_snapshot fixture)
14+
- Added the snappylapy marker for tests that depend on previous tests (pytest.mark.snappylapy). This will be used for more advanced features in the future.
15+
16+
## [0.0.2]
17+
- 🐞 Added fix for python 3.9, by refactoring incompatible type annotation
18+
- Loosened the version requirements for pytest (until the lower bound have been discovered, with automated testing)
19+
- Improved metadata for pypi
20+
21+
## [0.0.1]
22+
- Initial release of Snappylapy
23+
- Implemented basic snapshot testing functionality for dict, list, bytes and str data types

README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -160,25 +160,3 @@ Snappylapy is your go-to tool for efficient and reliable snapshot testing in Pyt
160160

161161
# Contributing
162162
We welcome contributions to Snappylapy! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request on our GitHub repository. We appreciate your feedback and support in making Snappylapy even better for the community.
163-
164-
# Change Log
165-
## [0.2.0]
166-
- Better error messages by using pytest assertion rewriting
167-
- Allow users to set the snapshot directory when using the load_snapshot fixture
168-
169-
## [0.1.1]
170-
- Update dependencies with the lower bounds of package compatibility
171-
- Refactor to make code easier for users of package to modify and extend
172-
173-
## [0.1.0]
174-
- Added fixture for loading snapshots from previous tests (load_snapshot fixture)
175-
- Added the snappylapy marker for tests that depend on previous tests (pytest.mark.snappylapy). This will be used for more advanced features in the future.
176-
177-
## [0.0.2]
178-
- 🐞 Added fix for python 3.9, by refactoring incompatible type annotation
179-
- Loosened the version requirements for pytest (until the lower bound have been discovered, with automated testing)
180-
- Improved metadata for pypi
181-
182-
## [0.0.1]
183-
- Initial release of Snappylapy
184-
- Implemented basic snapshot testing functionality for dict, list, bytes and str data types

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "CHANGELOG.md"

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
site_name: Snappylapy
22
repo_name: martinmoldrup/snappylapy
3-
repo_url: https://dev.azure.com/GFIOSvr/AI%20Circle/_git/AzureSharedPkg
3+
repo_url: https://github.com/martinmoldrup/snappylapy
44

55
theme:
66
name: material
@@ -66,4 +66,5 @@ markdown_extensions:
6666

6767
nav:
6868
- Home: index.md
69-
- Code Reference: reference/
69+
- Code Reference: reference/
70+
- Changelog: changelog.md

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "snappylapy"
33
version = "0.2.0"
44
description = "A snapshot library for python optimized for easy of use, human readable snapshots and enabling decoupling of chained integration tests."
55
authors = ["Martin Møldrup"]
6-
readme = "README.md"
6+
readme = ["README.md", "CHANGELOG.md"]
77
classifiers = [
88
"Framework :: Pytest",
99
"Development Status :: 4 - Beta",
@@ -23,6 +23,7 @@ classifiers = [
2323
]
2424
packages = [{ include = "snappylapy" }, { include = "snappylapy/py.typed" }]
2525
repository = "https://github.com/martinmoldrup/snappylapy"
26+
documentation = "https://martinmoldrup.github.io/snappylapy"
2627

2728
keywords = ["pytest", "snapshot", "testing", "snapshot-testing", "integration-testing", "unit-testing"]
2829

scripts/create_new_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from packaging.version import Version
88

99
PYPROJECT_TOML = pathlib.Path(__file__).parent.parent / "pyproject.toml"
10-
README_MD = pathlib.Path(__file__).parent.parent / "README.md"
10+
CHANGELOG_MD = pathlib.Path(__file__).parent.parent / "CHANGELOG.md"
1111
PYPI_ENDPOINT = "https://pypi.org/pypi/snappylapy/json"
1212

1313
def read_version():
@@ -26,12 +26,12 @@ def check_version(version: str):
2626

2727
def check_change_log(version: str):
2828
"""Check if the version has a corresponding entry in the change log. It will be a line starting with ## [0.0.2]"""
29-
with open(README_MD, "r", encoding="utf-8") as file:
29+
with open(CHANGELOG_MD, "r", encoding="utf-8") as file:
3030
lines = file.readlines()
3131
version_str = f"## [{version}]"
3232
if not any(line.startswith(version_str) for line in lines):
3333
raise ValueError(f"Version {version} does not have a corresponding entry in the change log.")
34-
34+
3535

3636

3737
if __name__ == "__main__":

0 commit comments

Comments
 (0)