Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
01dea50
feat: remove similar changed path method + rename some pytest-ranking…
leticosta4 Jun 26, 2026
06c38cf
remove: remove remaining SCP parts from code
leticosta4 Jun 26, 2026
7295369
refactor: separate help strings
leticosta4 Jun 26, 2026
71a9228
refactor: update project name from pytest-ranked-selection to pytest-…
leticosta4 Jun 27, 2026
82356f0
refactor: update gitignore (remove studying and experiments docs)
leticosta4 Jul 19, 2026
2323205
fix typo in gitignore
leticosta4 Jul 19, 2026
0cbe28d
Merge pull request #1 from leticosta4/rascunho-rts
leticosta4 Jul 19, 2026
57e5e36
docs: update readme with local development and testing instructions
leticosta4 Jul 19, 2026
afc068d
fix: correct test_invalid_weight according to new weight config
leticosta4 Jul 19, 2026
44778d2
refactor: reorganize tests dir
leticosta4 Jul 19, 2026
762bb6b
Merge pull request #2 from leticosta4/refactor/tests-dir
leticosta4 Jul 19, 2026
cb2687d
remove: del dir as an option for rank level
leticosta4 Jul 19, 2026
12e1767
docs: update changelog according to latest change
leticosta4 Jul 19, 2026
6615f67
refactor: modularize ranking plugin by splitting into multiple files
leticosta4 Jul 20, 2026
4056eac
refactor: rename package name from pytest-ranking to pytest-regsmart
leticosta4 Jul 20, 2026
f3bedf2
Merge branch 'main' into refactor/split-into-modules
leticosta4 Jul 20, 2026
95375ab
Merge pull request #3 from leticosta4/refactor/split-into-modules
leticosta4 Jul 20, 2026
b5c8522
code: migrate to uv and hatchling
leticosta4 Jul 20, 2026
22a975f
Merge pull request #4 from leticosta4/chore/uv-migration
leticosta4 Jul 21, 2026
b0b1be3
fix: format runtime output in pytest_terminal_summary for better read…
leticosta4 Jul 22, 2026
0afc9c9
refactor: rename RTPRunner to PluginRunner
leticosta4 Jul 24, 2026
232e85e
refactor: update main --rank flag to --regsmart
leticosta4 Jul 25, 2026
ed30861
feat: add logic for new --no-rank execution option
leticosta4 Jul 25, 2026
8ccdafb
docs: update documentation with new name conventions
leticosta4 Jul 25, 2026
6818aea
fix typo in help_strings.py
leticosta4 Jul 25, 2026
727b798
refactor: improve no_rank_help string
leticosta4 Jul 25, 2026
7050e57
feat: add validation for --no-rank combined with ranking options
leticosta4 Jul 25, 2026
d9b1719
Merge branch 'main' into feat/no-rank-option
leticosta4 Jul 25, 2026
708f911
docs: update changelog
leticosta4 Jul 25, 2026
5878b98
fix: enhance no-rank option validation and logging options
leticosta4 Jul 25, 2026
0789219
fix: properly validate --no-rank usage with other rank flags
leticosta4 Jul 25, 2026
0759370
add tests , remove old comment and complement changelog
leticosta4 Jul 25, 2026
8d9d94c
Merge pull request #5 from leticosta4/feat/no-rank-option
leticosta4 Jul 25, 2026
b900812
chore: add pyan3 and GitPython for new selector module
leticosta4 Jul 30, 2026
c2147e1
[wip] feat: new selector module base
leticosta4 Jul 30, 2026
eeac122
feat: get_git_diff func
leticosta4 Jul 30, 2026
cffd76f
feat: update get_affected_tests signature and integrate get_git_diff …
leticosta4 Jul 30, 2026
212a97b
tests + fix: comment run_rts call
leticosta4 Jul 30, 2026
1c4877f
Merge pull request #6 from leticosta4/rts/feat/git-diff-module
leticosta4 Jul 30, 2026
9f8ced1
refactor: make the repository dir a constant
leticosta4 Jul 31, 2026
c4b9702
feat: dependency graph creation 1st draft via pyan3.ImportVisitor (mo…
leticosta4 Jul 31, 2026
88c3394
tests: convert git_repo and commit_file into pytest fixtures
leticosta4 Jul 31, 2026
41fc0b4
tests: add integration and unit tests for new ast module
leticosta4 Jul 31, 2026
e235d87
refactor/fix: unify repo resolution for git diff and deps graph + ada…
leticosta4 Jul 31, 2026
83c3867
Merge pull request #7 from leticosta4/rts/feat/pyan3-deps-graph
leticosta4 Aug 1, 2026
da7e40b
refactor: rename args to rank_args
leticosta4 Aug 1, 2026
b6f58a5
restructure modules for better organization
leticosta4 Aug 1, 2026
05677d7
chore: replace isort and flake8 for ruff as a linter
leticosta4 Aug 2, 2026
ce52120
refactor: reorganize selection dir internal structure
leticosta4 Aug 3, 2026
79b0ae3
feat: add the main test selection function (diff and graph correlaton)
leticosta4 Aug 5, 2026
b9064c0
feat: add run_rts_ call to the pluigin
leticosta4 Aug 5, 2026
39855d5
test: add a very simple unit testing
leticosta4 Aug 5, 2026
e72403d
feat: add is_git_repo function for plugin validation
leticosta4 Aug 6, 2026
5bd9df0
rename git module files for better organization
leticosta4 Aug 6, 2026
bb9640f
feat: add Git repository validation and handle GitCommandError in tes…
leticosta4 Aug 6, 2026
024bd5c
feat: integrate git repository validation in test selection and enhan…
leticosta4 Aug 6, 2026
a4a6b91
feat: add tests for verifying git repository status and requirements
leticosta4 Aug 6, 2026
e3d53d0
fix lint (ruff)
leticosta4 Aug 6, 2026
18d81e0
fix: resolve default git branch dynamicallly and handle repo without …
leticosta4 Aug 6, 2026
64eb59a
refactor: add warnings and time duration logs to rts module
leticosta4 Aug 6, 2026
f585456
refactor: add rts info in report header formatting
leticosta4 Aug 6, 2026
5663204
fix: include changed test files to affected_tests list
leticosta4 Aug 7, 2026
30b6afd
add integration tests for selection module
leticosta4 Aug 7, 2026
a43e275
Merge pull request #9 from leticosta4/feat/identify-selected-tests
leticosta4 Aug 7, 2026
2d83584
fix: _find_py_files function more restrictive
leticosta4 Aug 7, 2026
a45e155
Merge pull request #8 from leticosta4/feat/rts-base
leticosta4 Aug 7, 2026
76692d2
docs: update changelog and README to include the latest RTS module de…
leticosta4 Aug 7, 2026
4f0427c
chore(deps): bump gitpython from 3.1.57 to 3.1.58
dependabot[bot] Aug 9, 2026
a3be227
Merge pull request #11 from leticosta4/dependabot/uv/gitpython-3.1.58
leticosta4 Aug 9, 2026
483590b
chore: drop support for python 3.8 and 3.9
leticosta4 Aug 11, 2026
c5410f2
chore: bump minimum pytest version to 9.0.3 (CVE-2025-71176)
leticosta4 Aug 11, 2026
b9d3490
Merge branch 'main' into chore/upgrade-pytest
leticosta4 Aug 11, 2026
2a20452
Merge pull request #12 from leticosta4/chore/upgrade-pytest
leticosta4 Aug 11, 2026
5d999ce
docs: update changelog with latest chore bumps
leticosta4 Aug 11, 2026
cb54b87
style: translate some comments and docstrgins from pt-br to english
leticosta4 Aug 11, 2026
61185cd
feat: add branch tracking to diff detection and reporting
leticosta4 Aug 11, 2026
e322704
add tests + improve info text
leticosta4 Aug 11, 2026
4313e02
Merge pull request #14 from leticosta4/feat/report-used-branch
leticosta4 Aug 12, 2026
00e2a79
docs: change license from MIT to GPLv2+
leticosta4 Aug 12, 2026
cddca7c
docs: add a notice about pytest-ranking fork and pyan3 usage
leticosta4 Aug 12, 2026
c919067
docs: update changelog with latest changes
leticosta4 Aug 12, 2026
a3770b5
chore: update license metadata and docs to GPL-2.0-or-later
leticosta4 Aug 12, 2026
04641d4
refactor: make rank level constant more specific
leticosta4 Aug 12, 2026
c2b1ef6
feat: add new --diff-level flag basic configurations
leticosta4 Aug 12, 2026
2861138
refactor: improve some output logs with new diff-level flag info
leticosta4 Aug 12, 2026
80b4428
fix: change diff level from line to function
leticosta4 Aug 14, 2026
c822253
fix: add parse_git_level at plugin.py
leticosta4 Aug 14, 2026
7b698aa
Merge pull request #15 from leticosta4/docs/change-license
leticosta4 Aug 15, 2026
0b87290
docs: update LICENSE to remove attribution details
leticosta4 Aug 15, 2026
c07a398
feat: enhance git diff with deleted files tracking and line range par…
leticosta4 Aug 16, 2026
7dde2d5
test: add tests for parse_diff_output and get_changed_line_ranges fun…
leticosta4 Aug 16, 2026
ff89c37
Merge pull request #16 from leticosta4/feat/get-granular-diff
leticosta4 Aug 16, 2026
235179d
Merge branch 'main' into refactor/granular-rts
leticosta4 Aug 16, 2026
8030435
chore: reestructure directories into a src style divison
leticosta4 Aug 17, 2026
716aa20
chore(pyproject.toml): add dev dependencies
leticosta4 Aug 17, 2026
88b740b
docs: fix inconsistencies in readme and changelog
leticosta4 Aug 17, 2026
66e2abd
docs: update changelog style into keep-a-changelog template
leticosta4 Aug 17, 2026
4a366c4
chore: update version to 0.6.1 in pyproject.toml, __init__.py, and uv…
leticosta4 Aug 17, 2026
1ade003
Merge branch 'main' into refactor/granular-rts
leticosta4 Aug 17, 2026
b4b898b
Merge branch 'refactor/granular-rts' of https://github.com/leticosta4…
leticosta4 Aug 18, 2026
8d85e6a
refactor: simplify untracked diff attr
leticosta4 Aug 18, 2026
4673c73
refactor: make diff_level_help string more specific
leticosta4 Aug 18, 2026
a8aba04
refactor: restructure git_manager to make it less redundant
leticosta4 Aug 18, 2026
6c1d49e
fix lint
leticosta4 Aug 18, 2026
f00cda4
refactor: add validation for invalid diff_level values
leticosta4 Aug 18, 2026
b77dbaa
refactor: update DIFF_LEVEL and level_type to use enum type
leticosta4 Aug 19, 2026
5b95c01
Merge pull request #17 from leticosta4/refactor/granular-rts
leticosta4 Aug 19, 2026
3a8118f
refactor: inital refactor to make deps_graph more generic
leticosta4 Aug 19, 2026
ed6066e
feat: add a new function level CallGraph
leticosta4 Aug 20, 2026
dc8eadb
test: add cases for function callgraph + docs: update changelog
leticosta4 Aug 20, 2026
f159590
Merge pull request #18 from leticosta4/feat/add-function-level-callgraph
leticosta4 Aug 20, 2026
7e6fa10
feat: base for line diff and function graph correlation
leticosta4 Aug 21, 2026
e7a4a51
refactor: reorganize some functions into utils.py
leticosta4 Aug 21, 2026
394bc30
feat(plugin.py): pytest nodeid selection based on diff level
leticosta4 Aug 22, 2026
ca24bae
fix: properly convert pyan3 functionid to pytest nodeids
leticosta4 Aug 22, 2026
f286d65
fix(ranking): add guard for no diff detected
leticosta4 Aug 22, 2026
0e2117d
fic: change default diff level from file to function
leticosta4 Aug 22, 2026
e722b0f
style: org studies comments
leticosta4 Aug 22, 2026
d972755
fix: adjust old tests based on new logic
leticosta4 Aug 23, 2026
14bbec7
remove duplicate validation for diff level flag
leticosta4 Aug 23, 2026
f43ecf2
new tests
leticosta4 Aug 23, 2026
48426ea
fix lint
leticosta4 Aug 23, 2026
f3a7a7e
Merge pull request #19 from leticosta4/feat/function-level-correlation
leticosta4 Aug 23, 2026
0789d70
reduce unecessary tests
leticosta4 Aug 23, 2026
6dc7e7b
perf(selection): skip dependency graph generation when no diff is det…
leticosta4 Aug 24, 2026
28a4aae
docs: update readme
leticosta4 Aug 24, 2026
b3a2c30
refactor: add typealias for better readability
leticosta4 Aug 24, 2026
e0a9a78
fix: replace argparse.ArgumentTypeError with pytest.UsageError for be…
leticosta4 Aug 24, 2026
8880e01
fix lint and more basic stuff
leticosta4 Aug 24, 2026
9b2db9a
refactor(plugin): function separation + self.branch type
leticosta4 Aug 24, 2026
eaafc45
refactor reporter - ranking log
leticosta4 Aug 25, 2026
08a644b
more accurate readme
leticosta4 Aug 25, 2026
157a789
refactor(plugin): move timing logs for feature collection and rts to …
leticosta4 Aug 25, 2026
4a42191
refactor: update diff level help string
leticosta4 Aug 25, 2026
317fff8
fix: change no_rank ini type to bool and update related logic
leticosta4 Aug 25, 2026
55f0524
Merge pull request #21 from leticosta4/refactor-plugin
leticosta4 Aug 26, 2026
71d0842
fix: properly select tests at file level considering more import names
leticosta4 Aug 27, 2026
f7e973f
Merge pull request #22 from leticosta4/hotfix/properly-select-modifie…
leticosta4 Aug 27, 2026
b6063c2
fix: run the entire test suite when conftest is in git diff
leticosta4 Aug 28, 2026
f0e06b7
fix: change warning logs emission sequence
leticosta4 Aug 28, 2026
52f04b7
Merge pull request #23 from leticosta4/fix/identify-conftest-selection
leticosta4 Aug 28, 2026
755b788
fix lint
leticosta4 Aug 29, 2026
573542f
fix: add default value for some flag at addini option
leticosta4 Aug 29, 2026
3a0e474
fix: add validation for args config in pytest.ini + uv sync
leticosta4 Aug 29, 2026
167df01
docs: improve license files writing
leticosta4 Aug 29, 2026
b207aea
Merge branch 'main' into dev
leticosta4 Aug 29, 2026
7ad60c9
fix(rts): resolve base branch to the merge destination instead of cur…
leticosta4 Aug 30, 2026
5227497
fix(git): improve base branch resolution for CI environments
leticosta4 Aug 30, 2026
b04a679
docs: remove uneccessary command in deployment guide
leticosta4 Aug 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: CI

on:
Expand All @@ -11,27 +8,21 @@ on:

jobs:
tests:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install tox and any other packages
run: |
pip install tox
- name: Run tox
# Run tox using the version of Python in `PATH`
run: |
tox run -e py$(echo ${{ matrix.python-version }})
run: uv sync --frozen
- name: Run tests
run: uv run pytest -xv tests/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
__pycache__/
dist/
*.egg-info/
.venv/
estudo/
validacao-experimentos/
20 changes: 8 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ repos:
- id: end-of-file-fixer
exclude: '.*\.pth$'
- id: debug-statements
- repo: https://github.com/astral-sh/uv-pre-commit
rev: v0.5.0
hooks:
- id: uv-lock
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.1
hooks:
- id: flake8
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
179 changes: 121 additions & 58 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,124 @@

# Changelog

0.3.3 (2024-04-08)
----

* Add replay option
* Refine random order and test group level
* Code refactoring

0.3.3 (2024-12-24)
----

* Support order dependency

0.3.2 (2024-12-23)
----

* Refine test group level definition and extraction
* Use pytest test discovery order as default

0.3.1 (2024-06-06)
----

* Support ranking tests at different granularity levels (PUT, method, file, folder)
* Add plugin summary via pytest_terminal_summary

0.3.0 (2024-05-12)
----

* Fix attribute initialization in change tracker for Python 3.11 and lower versions


0.2.8 (2024-05-08)
----

* Make pytest-xdist compatible for random and change-related heuristics


0.2.7 (2024-03-18)
----

* Add option to run tests in random order
* Improve documentation




0.2.0 (2024-02-16)
----

* Add textual similarity between tests and changed files since last run as the third heuristic
* Weight normalization
* History length as an optional argument
* Rename plugin to `pytest-ranking`


0.1.0 (2023-12-04)
----

* First release on PyPI
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] pytest-regsmart

## [0.6.3] - 2026-08-29

### Added
- Hotfix: Resolve base branch to the merge destination instead of current branch
- Add validation for args options in pytest.ini
- Add default values for diff-level, rank-level and no-rank flags in pytest.ini
## [0.6.2] - 2026-08-22

### Added
- New `--diff-level` flag to choose the diff granularity: `function`pr (default) or `file`
- Track deleted files in the diff result
## [0.6.1] - 2026-08-11

### Changed
- License changed from MIT to GPLv2+
### Added
- Default branch information in summary log report
## [0.6.0] - 2026-08-10

### Security
- Bump pytest from version 7.4.3 to 9.0.3 ([CVE-2025-71176](https://github.com/leticosta4/pytest-regsmart/security/dependabot/1))
- Bump gitpython from 3.1.57 to 3.1.58 ([CVEs](https://github.com/leticosta4/pytest-regsmart/security/dependabot?q=GitPython+is%3Aclosed))
### Removed
- Support for Python 3.8 and 3.9
## [0.5.0] - 2026-08-07

### Added
- Regression Test Selection (RTS): a new `selection` module that computes the test files affected by the current changes and runs only them under `--regsmart`
- Detect changed files with git (modified + untracked) against the resolved default branch (origin/HEAD → main/master → active branch); repositories without commits fall back to untracked files only
- Build a module-level dependency graph with pyan3 and propagate changes transitively (BFS) to affected test files
- Raise a `UsageError` when `--regsmart` is used outside a git repository
- Report the RTS configuration and timing in the terminal header/summary
- Integration tests for the selection module and improved test suite
### Changed
- Refine `--no-rank`: it now only disables RTP while keeping RTS active, and cannot be combined with other `--rank-*` flags (raises a `UsageError`)
## [0.4.0] - 2026-07-24

### Added
- `--no-rank` option to remove RTP, considering only the future RTS module
### Changed
- Rename activation flag from `--rank` to `--regsmart`
- Improve documentation
## [0.3.0] - 2026-07-20

### Changed
- Migrate package manager to uv
## [0.2.0] - 2026-07-19

### Changed
- Rename whole package name to `pytest-regsmart`
- Refactor ranking module internals (modularization)
### Removed
- Directory-level granularity (`--rank-level=dir`)
## [0.1.0] - 2026-06-25

### Added
- Fork of pytest-ranking (based on PyPI release 0.3.4)
### Changed
- Rename plugin to `pytest-regsmart`
### Removed
- Similar Changed Path method (`--rank-weight=0-0-1`)

---

## Inherited history (pytest-ranking)

## [0.3.4] - 2025-04-09

### Added
- Replay option
- Published version at [PyPI](https://pypi.org/project/pytest-ranking/0.3.4/#history)
### Changed
- Refine random order and test group level
- Code refactoring
## [0.3.3] - 2024-12-24

### Added
- Support order dependency
## [0.3.2] - 2024-12-23

### Changed
- Refine test group level definition and extraction
- Use pytest test discovery order as default
## [0.3.1] - 2024-06-06

### Added
- Support ranking tests at different granularity levels (PUT, method, file, folder)
- Plugin summary via `pytest_terminal_summary`
## [0.3.0] - 2024-05-12

### Fixed
- Attribute initialization in change tracker for Python 3.11 and lower versions
## [0.2.8] - 2024-05-08

### Fixed
- pytest-xdist compatibility for random and change-related heuristics
## [0.2.7] - 2024-03-18

### Added
- Option to run tests in random order
### Changed
- Improve documentation
## [0.2.0] - 2024-02-16

### Added
- Textual similarity between tests and changed files since last run as the third heuristic
- History length as an optional argument
### Changed
- Weight normalization
- Rename plugin to `pytest-ranking`
## [0.1.0] - 2023-12-04

### Added
- First release on PyPI
46 changes: 29 additions & 17 deletions docs/DEPLOYMENT.md → DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,63 @@
# Deployment

## Using pytest-ranking in fixed location
## Using pytest-regsmart in fixed location

If your CI runs different test builds in a fixed location, e.g., a project folder in specific machine, you can directly use `pytest-ranking` after installation without additional setup.
If your CI runs different test builds in a fixed location, e.g., a project folder in specific machine, you can directly use `pytest-regsmart` after installation without additional setup.

## Using pytest-ranking in Github Actions
## Using pytest-regsmart in Github Actions

If your CI workflow always starts a new virtual machine to run a test build, you need to set up the CI to be able to pass `pytest` cache data across test builds.
Here, we use GitHub Actions as an example.

### Add pytest-ranking to project dependency
### Check out the full history

`pytest-regsmart` computes the diff against the **base** (destination) branch — e.g. `main` for a PR or push. GitHub Actions' default checkout does a shallow, single-branch clone (`fetch-depth: 1`), which does not fetch that base branch, so the base cannot be resolved and `pytest-regsmart` raises a `UsageError`. Fetch the full history:

You can add `pytest-ranking` as a dependency by adding a installation job before the job that runs `pytest ...` (a job is often specified by `-name: `) in the workflow file:
```yml
- uses: actions/checkout@v4
with:
fetch-depth: 0
```

This only affects the clone metadata, not the working-tree files, so the added time is negligible even for large repositories.

### Add pytest-regsmart to project dependency


You can add `pytest-regsmart` as a dependency by adding a installation job before the job that runs `pytest ...` (a job is often specified by `-name: `) in the workflow file:

```yml
- name: Install pytest-ranking related
run: pip install pytest-ranking
- name: Install pytest-regsmart related
run: pip install pytest-regsmart
```

Alternatively, depending on where the forked project puts its dependency, e.g., can be in `setup.py`, `pyproejct.toml`, you can also add the `pytest-ranking` to the build/test dependency, but best not to specify version.
Alternatively, depending on where the forked project puts its dependency, e.g., can be in `setup.py`, `pyproejct.toml`, you can also add the `pytest-regsmart` to the build/test dependency, but best not to specify version.


#### If the project uses `Tox`

Add `pytest-ranking` to the `deps` of `[testenv]` in `./tox.ini`:
Add `pytest-regsmart` to the `deps` of `[testenv]` in `./tox.ini`:
```ini
[testenv]
deps =
; ...
pytest-ranking
pytest-regsmart
pytest-json-report
```


### Setup pytest_cache

Before the job in the workflow file that runs the `pytest ...` but after the `pytest-ranking` installation job, add the job that restores cache from the latest run if such run exists:
Before the job in the workflow file that runs the `pytest ...` but after the `pytest-regsmart` installation job, add the job that restores cache from the latest run if such run exists:

```yml
- name: Restore pytest-ranking cache
id: restore-pytest-ranking-cache
- name: Restore pytest-regsmart cache
id: restore-pytest-regsmart-cache
if: always()
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/.pytest_cache/v/pytest_ranking_data
key: pytest-ranking-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}
key: pytest-regsmart-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}
# --------below is the job for running pytest
-name: pytest
...
Expand All @@ -57,13 +69,13 @@ And after the job that runs `pytest ...` command, add the job that caches result
-name: pytest
...
# --------above is the job for running pytest
- name: Save pytest-ranking cache
id: save-pytest-ranking-cache
- name: Save pytest-regsmart cache
id: save-pytest-regsmart-cache
if: always()
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/.pytest_cache/v/pytest_ranking_data
key: pytest-ranking-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}-${{ github.run_id }}
key: pytest-regsmart-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}-${{ github.run_id }}
```

#### If the project uses `Tox`
Expand Down
Loading