From 5076be076b53063e37f60cb32e5c836ca0a3c75f Mon Sep 17 00:00:00 2001 From: Arthur Pastel Date: Fri, 6 Dec 2024 00:13:08 +0100 Subject: [PATCH] chore: add a changelog --- CHANGELOG.md | 249 +++++++++++++++++++++++++++++++++++++++++++++++++++ cliff.toml | 113 +++++++++++++++++++++++ 2 files changed, 362 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 cliff.toml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..50bffd8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,249 @@ +# Changelog + + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +## [Unreleased] + +### ๐Ÿš€ Features +- Check buildability and fallback when build doesn't work +- Compile the callgrind wrapper at build time + +### ๐Ÿ› Bug Fixes +- Allow build on arm64 + +### โš™๏ธ Internals +- Define the version from the pyproject.toml +- Force native extension build in CI +- Updated matrix release workflow +- Use a common python version in the codspeed job +- Fix the codspeed workflow +- Use uv in CI +- Uv lock + + +## [3.0.0] - 2024-10-29 + +### ๐Ÿ› Bug Fixes +- Fix compatibility with pytest-benchmark 5.0.0 by @art049 in [#54](https://github.com/CodSpeedHQ/pytest-codspeed/pull/54) + +### โš™๏ธ Internals +- Drop support for python3.8 by @art049 +- Expose type information (#53) by @Dreamsorcerer in [#53](https://github.com/CodSpeedHQ/pytest-codspeed/pull/53) +- Run the CI with ubuntu 24.04 by @art049 +- Improve naming in workflow examples by @art049 +- Bump actions/checkout to v4 (#47) by @fargito in [#47](https://github.com/CodSpeedHQ/pytest-codspeed/pull/47) + + +## [3.0.0b4] - 2024-09-27 + +### ๐Ÿš€ Features +- Send more outlier data by @art049 + +### ๐Ÿ› Bug Fixes +- Fix display of parametrized tests by @art049 +- Reenable gc logic by @art049 + +### ๐Ÿงช Testing +- Add benches for various syscalls by @art049 + + +## [3.0.0b3] - 2024-09-26 + +### ๐Ÿš€ Features +- Also save the lower and upper fences in the json data by @art049 in [#46](https://github.com/CodSpeedHQ/pytest-codspeed/pull/46) + +### ๐Ÿงช Testing +- Refactor the algorithm benches using parametrization and add benches on bit_manipulation by @art049 + + +## [3.0.0b2] - 2024-09-24 + +### ๐Ÿš€ Features +- Also save the q1 and q3 in the json data by @art049 in [#45](https://github.com/CodSpeedHQ/pytest-codspeed/pull/45) +- Add the --codspeed-max-time flag by @art049 + + +## [3.0.0b1] - 2024-09-20 + +### ๐Ÿš€ Features +- Send the semver version to cospeed instead of the PEP440 one by @art049 in [#44](https://github.com/CodSpeedHQ/pytest-codspeed/pull/44) +- Also store the semver version by @art049 + +### ๐Ÿงช Testing +- Add benches for TheAlgorithms/backtracking by @art049 in [#43](https://github.com/CodSpeedHQ/pytest-codspeed/pull/43) + + +## [3.0.0b0] - 2024-09-18 + +### ๐Ÿš€ Features +- Improve table style when displaying results by @art049 in [#41](https://github.com/CodSpeedHQ/pytest-codspeed/pull/41) +- Add the total bench time to the collected stats by @art049 +- Add configuration and split tests between instruments by @art049 +- Add outlier detection in the walltime instrument by @art049 +- Implement the walltime instrument by @art049 +- Add bench of various python noop by @art049 +- Avoid overriding pytest's default protocol (#32) by @kenodegard in [#32](https://github.com/CodSpeedHQ/pytest-codspeed/pull/32) + +### ๐Ÿ› Bug Fixes +- Use importlib_metadata to keep backward compatibility by @art049 +- Properly decide the mode depending on our env variable spec by @art049 +- Disable pytest-speed when installed and codspeed is enabled by @art049 + +### ๐Ÿ—๏ธ Refactor +- Differentiate the mode from the underlying instrument by @art049 +- Move the instrumentation wrapper directly in the instrument by @art049 +- Change Instrumentation to CPUInstrumentation by @art049 +- Create an abstraction for each instrument by @art049 + +### ๐Ÿ“š Documentation +- Update action version in the CI workflow configuration (#39) by @frgfm in [#39](https://github.com/CodSpeedHQ/pytest-codspeed/pull/39) +- Bump action versions in README by @adriencaccia + +### ๐Ÿงช Testing +- Add benches for TheAlgorithms/audio_filters by @art049 in [#42](https://github.com/CodSpeedHQ/pytest-codspeed/pull/42) + +### โš™๏ธ Internals +- Add a test on the walltime instrument by @art049 +- Fix utils test using a fake git repo by @art049 +- Update readme by @art049 +- Support python 3.13 and drop 3.7 by @art049 in [#40](https://github.com/CodSpeedHQ/pytest-codspeed/pull/40) +- Add TCH, FA, and UP to ruff lints (#29) by @kenodegard in [#29](https://github.com/CodSpeedHQ/pytest-codspeed/pull/29) + + +## [2.2.1] - 2024-03-19 + +### ๐Ÿš€ Features +- Support pytest 8.1.1 by @art049 + +### ๐Ÿ› Bug Fixes +- Loosen runtime requirements (#21) by @edgarrmondragon in [#21](https://github.com/CodSpeedHQ/pytest-codspeed/pull/21) + +### โš™๏ธ Internals +- Add all-checks job to CI workflow by @art049 in [#28](https://github.com/CodSpeedHQ/pytest-codspeed/pull/28) +- Switch from black to ruff format by @art049 +- Update action version in README.md by @adriencaccia +- Add codspeed badge to the readme by @art049 + + +## [2.2.0] - 2023-09-01 + +### ๐Ÿš€ Features +- Avoid concurrent wrapper builds by @art049 +- Add a test for pytest-xdist compatibility by @art049 + +### ๐Ÿ› Bug Fixes +- Fix xdist test output assertion by @art049 + + +## [2.1.0] - 2023-07-27 + +### ๐Ÿ› Bug Fixes +- Fix relative git path when using working-directory by @art049 in [#15](https://github.com/CodSpeedHQ/pytest-codspeed/pull/15) +- Fix typo in release.yml (#14) by @art049 in [#14](https://github.com/CodSpeedHQ/pytest-codspeed/pull/14) + + +## [2.0.1] - 2023-07-22 + +### ๐Ÿš€ Features +- Release the package from the CI with trusted provider by @art049 +- Add a return type to the benchmark fixture by @art049 in [#13](https://github.com/CodSpeedHQ/pytest-codspeed/pull/13) +- Add support for returning values (#12) by @patrick91 in [#12](https://github.com/CodSpeedHQ/pytest-codspeed/pull/12) + +### ๐Ÿ› Bug Fixes +- Fix setuptools installation with python3.12 by @art049 + + +## [2.0.0] - 2023-07-04 + +### ๐Ÿš€ Features +- Warmup performance map generation by @art049 +- Add some details about the callgraph generation status in the header by @art049 +- Test that perf maps are generated by @art049 +- Add a local test matrix with hatch by @art049 +- Test that benchmark selection with -k works by @art049 +- Add support for CPython3.12 and perf trampoline by @art049 +- Add introspection benchmarks by @art049 in [#9](https://github.com/CodSpeedHQ/pytest-codspeed/pull/9) + +### ๐Ÿ› Bug Fixes +- Support benchmark.extra_info parameters on the fixture by @art049 in [#10](https://github.com/CodSpeedHQ/pytest-codspeed/pull/10) +- Filter out pytest-benchmark warnings in the tests by @art049 + +### ๐Ÿ—๏ธ Refactor +- Use the pytest_run_protocol hook for better exec control by @art049 + +### โš™๏ธ Internals +- Separate the benchmark workflow by @art049 in [#8](https://github.com/CodSpeedHQ/pytest-codspeed/pull/8) +- Bump version to 1.3.0 to trigger the callgraph generation by @art049 +- Reuse same test code in the tests by @art049 +- Bump linting dependencies by @art049 +- Bump precommit in the CI by @art049 +- Add python3.12 to the ci matrix by @art049 +- Restructure dev dependencies by @art049 +- Replace isort by ruff by @art049 in [#11](https://github.com/CodSpeedHQ/pytest-codspeed/pull/11) +- Add discord badge in the readme by @art049 + + +## [1.2.2] - 2022-12-02 + +### ๐Ÿš€ Features +- Add library metadata in the profile output by @art049 in [#5](https://github.com/CodSpeedHQ/pytest-codspeed/pull/5) + + +## [1.2.1] - 2022-11-28 + +### ๐Ÿ› Bug Fixes +- Support kwargs with the benchmark fixture by @art049 in [#4](https://github.com/CodSpeedHQ/pytest-codspeed/pull/4) + + +## [1.2.0] - 2022-11-22 + +### ๐Ÿ› Bug Fixes +- Avoid wrapping the callable to maintain existing results by @art049 +- Disable automatic garbage collection to increase stability by @art049 in [#2](https://github.com/CodSpeedHQ/pytest-codspeed/pull/2) +- Update readme by @art049 + +### โš™๏ธ Internals +- Update readme by @art049 + + +## [1.1.0] - 2022-11-10 + +### ๐Ÿš€ Features +- Allow running along with pytest-benchmarks by @art049 + +### ๐Ÿ› Bug Fixes +- Fix the release script by @art049 +- Make the release script executable by @art049 +- Match the test output in any order by @art049 + +### ๐Ÿ—๏ธ Refactor +- Manage compatibility env in the conftest by @art049 + +### โš™๏ธ Internals +- Add a pytest-benchmark compatibility test by @art049 in [#1](https://github.com/CodSpeedHQ/pytest-codspeed/pull/1) +- Add more details on the pytest run by @art049 +- Continue running on matrix item error by @art049 +- Add a CI configuration with pytest-benchmark installed by @art049 + + +[unreleased]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0..HEAD +[3.0.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0b4..v3.0.0 +[3.0.0b4]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0b3..v3.0.0b4 +[3.0.0b3]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0b2..v3.0.0b3 +[3.0.0b2]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0b1..v3.0.0b2 +[3.0.0b1]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v3.0.0b0..v3.0.0b1 +[3.0.0b0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.2.1..v3.0.0b0 +[2.2.1]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.2.0..v2.2.1 +[2.2.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.1.0..v2.2.0 +[2.1.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.0.1..v2.1.0 +[2.0.1]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.0.0..v2.0.1 +[2.0.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v1.2.2..v2.0.0 +[1.2.2]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v1.2.1..v1.2.2 +[1.2.1]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v1.2.0..v1.2.1 +[1.2.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v1.1.0..v1.2.0 +[1.1.0]: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v1.0.4..v1.1.0 + + diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 0000000..287a5c8 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,113 @@ +# git-cliff ~ default configuration file +# https://git-cliff.org/docs/configuration +# +# Lines starting with "#" are comments. +# Configuration options are organized into tables and keys. +# See documentation for more information on available options. +[remote.github] +owner = "CodSpeedHQ" +repo = "pytest-codspeed" + +[changelog] +# template for the changelog header +header = """ +# Changelog\n + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +\n + +""" +# template for the changelog body +# https://keats.github.io/tera/docs/#introduction +body = """ +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} + +{% if version -%} + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else -%} + ## [Unreleased] +{% endif -%} + +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | upper_first }} + {%- for commit in commits %} + - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\ + {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} + {% if commit.remote.pr_number %} in \ + [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ + {%- endif -%} + {% endfor %} +{% endfor %}\n\n +""" +# template for the changelog footer +footer = """ +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} + +{% for release in releases -%} + {% if release.version -%} + {% if release.previous.version -%} + [{{ release.version | trim_start_matches(pat="v") }}]: \ + {{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }} + {% endif -%} + {% else -%} + [unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD + {% endif -%} +{% endfor %} + +""" + +# remove the leading and trailing s +trim = true +# postprocessors +postprocessors = [ + # { pattern = '', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL +] +# render body even when there are no releases to process +# render_always = true +# output file path +# output = "test.md" + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true +# filter out the commits that are not conventional +filter_unconventional = true +# process each line of a commit as an individual commit +split_commits = false +# regex for preprocessing the commit messages +commit_preprocessors = [ + # Replace issue numbers + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit with https://github.com/crate-ci/typos + # If the spelling is incorrect, it will be automatically fixed. + #{ pattern = '.*', replace_command = 'typos --write-changes -' }, +] +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "๐Ÿš€ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^doc", group = "๐Ÿ“š Documentation" }, + { message = "^perf", group = "โšก Performance" }, + { message = "^refactor", group = "๐Ÿ—๏ธ Refactor" }, + { message = "^style", group = "๐ŸŽจ Styling" }, + { message = "^test", group = "๐Ÿงช Testing" }, + { message = "^chore\\(release\\): prepare for", skip = true }, + { message = "^chore: Release", skip = true }, + { message = "^chore\\(deps.*\\)", skip = true }, + { message = "^chore\\(pr\\)", skip = true }, + { message = "^chore\\(pull\\)", skip = true }, + { message = "^chore|^ci", group = "โš™๏ธ Internals" }, + { body = ".*security", group = "๐Ÿ›ก๏ธ Security" }, + { message = "^revert", group = "โ—€๏ธ Revert" }, + { message = ".*", group = "๐Ÿ’ผ Other" }, +] +# filter out the commits that are not matched by commit parsers +filter_commits = false +# sort the tags topologically +topo_order = false +# sort the commits inside sections by oldest/newest order +sort_commits = "newest"