From 87442f6b187ccd31ccf8e7274143652d23a06468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Dagur?= Date: Thu, 26 Nov 2020 20:18:49 +0000 Subject: Keep a changelog using 'changelog-cli' --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 1 + tests/test_version_numbers.py | 17 +++++++++++++---- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..63c9cd0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +# CHANGELOG + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Changelog](http://keepachangelog.com/). + + +## Unreleased +--- + +### New +* Maintain a `CHANGELOG.md` file. + +### Changes + +### Fixes + +### Breaks + + +## 0.3.2 - (2020-09-22) +--- + +### New +* Build Python 3.9 wheels. + +### Changes +* Updated PyO3 to version `0.12`. + +### Fixes +* Don't use star imports in `__init__.py` to give linters and type checkers more information. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c829e6c..e383fb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,3 +15,4 @@ python = "^3.5" maturin = "*" pytest = "*" toml = "*" +changelog-cli = "*" \ No newline at end of file diff --git a/tests/test_version_numbers.py b/tests/test_version_numbers.py index 6519ffa..f2f94a0 100644 --- a/tests/test_version_numbers.py +++ b/tests/test_version_numbers.py @@ -1,3 +1,5 @@ +import subprocess + import toml import adblock @@ -14,15 +16,22 @@ def get_version_value_cargo(): return cargo_toml["package"]["version"] +def get_version_value_changelog(): + proc = subprocess.Popen(["changelog", "current"], stdout=subprocess.PIPE) + assert proc.wait() == 0 + return proc.stdout.read().decode("utf-8").strip() + + def test_version_numbers_all_same(): """ - Makes sure that `pyproject.toml` and `Cargo.toml` contain the same version - number as the one attached to the `adblock` module. + Makes sure that `pyproject.toml`, `Cargo.toml`, and `CHANGELOG.md` contain + the same version number as the one attached to the `adblock` module. """ cargo_version = get_version_value_cargo() poetry_version = get_version_value_poetry() + changelog_version = get_version_value_changelog() module_version = adblock.__version__ assert cargo_version == poetry_version - assert poetry_version == module_version - assert cargo_version == module_version + assert poetry_version == changelog_version + assert changelog_version == module_version -- cgit v1.2.3