summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁrni Dagur <arni@dagur.eu>2020-11-26 20:18:49 +0000
committerÁrni Dagur <arni@dagur.eu>2020-11-26 20:41:08 +0000
commit87442f6b187ccd31ccf8e7274143652d23a06468 (patch)
treee66e162f24e62ae10059f21130dde36d487679ff
parent653221ca5463a4e785839bed6142dad04d6a6d6e (diff)
Keep a changelog using 'changelog-cli'
-rw-r--r--CHANGELOG.md30
-rw-r--r--pyproject.toml1
-rw-r--r--tests/test_version_numbers.py17
3 files changed, 44 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..63c9cd0
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,30 @@
1# CHANGELOG
2
3All notable changes to this project will be documented in this file.
4This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Changelog](http://keepachangelog.com/).
5
6
7## Unreleased
8---
9
10### New
11* Maintain a `CHANGELOG.md` file.
12
13### Changes
14
15### Fixes
16
17### Breaks
18
19
20## 0.3.2 - (2020-09-22)
21---
22
23### New
24* Build Python 3.9 wheels.
25
26### Changes
27* Updated PyO3 to version `0.12`.
28
29### Fixes
30* 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"
15maturin = "*" 15maturin = "*"
16pytest = "*" 16pytest = "*"
17toml = "*" 17toml = "*"
18changelog-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 @@
1import subprocess
2
1import toml 3import toml
2import adblock 4import adblock
3 5
@@ -14,15 +16,22 @@ def get_version_value_cargo():
14 return cargo_toml["package"]["version"] 16 return cargo_toml["package"]["version"]
15 17
16 18
19def get_version_value_changelog():
20 proc = subprocess.Popen(["changelog", "current"], stdout=subprocess.PIPE)
21 assert proc.wait() == 0
22 return proc.stdout.read().decode("utf-8").strip()
23
24
17def test_version_numbers_all_same(): 25def test_version_numbers_all_same():
18 """ 26 """
19 Makes sure that `pyproject.toml` and `Cargo.toml` contain the same version 27 Makes sure that `pyproject.toml`, `Cargo.toml`, and `CHANGELOG.md` contain
20 number as the one attached to the `adblock` module. 28 the same version number as the one attached to the `adblock` module.
21 """ 29 """
22 cargo_version = get_version_value_cargo() 30 cargo_version = get_version_value_cargo()
23 poetry_version = get_version_value_poetry() 31 poetry_version = get_version_value_poetry()
32 changelog_version = get_version_value_changelog()
24 module_version = adblock.__version__ 33 module_version = adblock.__version__
25 34
26 assert cargo_version == poetry_version 35 assert cargo_version == poetry_version
27 assert poetry_version == module_version 36 assert poetry_version == changelog_version
28 assert cargo_version == module_version 37 assert changelog_version == module_version