This PR introduces a basic set of performance tests (achieved with pytest-benchmark), as well as a Github Actions integration to make it easier to work with the performance testing, as well as control any unwanted degradation of the performance.
Implemented changes
Added pre-commit hook configuration, to automatically run black on commit.
Installed pytest-benchmark library to handle benchmarking.
Added tests/performance/* directory, which contains all the performance tests, related dataclasses and fixtures.
Configure dpytest to run performance tests and ensure valid output.
Added benchmark-action/github-action-benchmark@v1 Github Action that runs performance tests, adds comments with the results and can even fail a CI run if the performance has significantly worsened.
A new performance page will be generated, with history of commits to show how performance changed over time. It will be available at https://konradhalas.github.io/dacite/performance/X.Y, where X.Y is the related Python version from Github Actions matrix (e.g. 3.11).
Suggested actions
Before accepting and merging this PR, it is recommended to:
Create an empty gh-pages branch in konradhalas/dacite repo.
A personal Github Token should be generated, and added to the repository Secrets with the GITHUB_TOKEN key. The token must have the following permissions:
This PR introduces a basic set of performance tests (achieved with
pytest-benchmark
), as well as a Github Actions integration to make it easier to work with the performance testing, as well as control any unwanted degradation of the performance.Implemented changes
pre-commit
hook configuration, to automatically runblack
on commit.pytest-benchmark
library to handle benchmarking.tests/performance/*
directory, which contains all the performance tests, related dataclasses and fixtures.pytest
to run performance tests and ensure valid output.benchmark-action/github-action-benchmark@v1
Github Action that runs performance tests, adds comments with the results and can even fail a CI run if the performance has significantly worsened.https://konradhalas.github.io/dacite/performance/X.Y
, whereX.Y
is the related Python version from Github Actions matrix (e.g.3.11
).Suggested actions
Before accepting and merging this PR, it is recommended to:
gh-pages
branch inkonradhalas/dacite
repo.GITHUB_TOKEN
key. The token must have the following permissions:konradhalas/dacite
repo.