Skip to content

Commit

Permalink
Update dev deps, use tox-uv
Browse files Browse the repository at this point in the history
Also use a new --hypothesis-profile=less-examples by default.

Finally, remove --benchmark-* options from pytest.ini (which disabled
pytest-benchmark anyway) so that pytest-benchmark need not be installed
only to avoid an error that the --benchmark-disable option is
unrecognized.
  • Loading branch information
jab committed Mar 16, 2024
1 parent 61bcdbe commit f48bf58
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 60 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ jobs:
- name: benchmark and compare to baseline
run: |
./cachegrind.py pytest -n0 \
--benchmark-enable \
--benchmark-autosave \
--benchmark-columns=min,rounds,iterations \
--benchmark-disable-gc \
--benchmark-group-by=name \
--benchmark-compare=baseline.json \
tests/microbenchmarks.py
- name: archive benchmark results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: tests

env:
FORCE_COLOR: "1"
PYTEST_ADDOPTS: "--hypothesis-show-statistics"
PYTEST_ADDOPTS: "--benchmark-disable"

jobs:
test-all:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ repos:
args: ["--uri-ignore-words-list", "*"] # https://github.com/codespell-project/codespell/issues/2473

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
- hypothesis
- pytest

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
rev: v0.3.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 1 addition & 0 deletions dev-deps/dev.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest-clarity
pytest-icdiff
tox
tox-uv
12 changes: 6 additions & 6 deletions dev-deps/pypy3.10/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile --upgrade --python-version=3.10 dev-deps/test.in -o dev-deps/pypy3.10/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
exceptiongroup==1.2.0
Expand All @@ -11,19 +11,19 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -40,5 +40,5 @@ tomli==2.0.1
# via
# mypy
# pytest
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
12 changes: 6 additions & 6 deletions dev-deps/pypy3.9/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile --upgrade --python-version=3.9 dev-deps/test.in -o dev-deps/pypy3.9/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
exceptiongroup==1.2.0
Expand All @@ -11,19 +11,19 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -40,5 +40,5 @@ tomli==2.0.1
# via
# mypy
# pytest
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
12 changes: 6 additions & 6 deletions dev-deps/python3.10/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile --upgrade --python-version=3.10 dev-deps/test.in -o dev-deps/python3.10/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
exceptiongroup==1.2.0
Expand All @@ -11,19 +11,19 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -40,5 +40,5 @@ tomli==2.0.1
# via
# mypy
# pytest
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
12 changes: 6 additions & 6 deletions dev-deps/python3.11/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
# uv pip compile --upgrade --python-version=3.11 dev-deps/test.in -o dev-deps/python3.11/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -32,5 +32,5 @@ sortedcontainers==2.4.0
# via
# hypothesis
# sortedcollections
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
17 changes: 11 additions & 6 deletions dev-deps/python3.12/dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was autogenerated by uv v0.1.5 via the following command:
# uv pip compile --upgrade --python-version=3.12 dev-deps/dev.in -o dev-deps/python3.12/dev.txt
cachetools==5.3.2
cachetools==5.3.3
# via tox
chardet==5.2.0
# via tox
Expand All @@ -20,11 +20,12 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
packaging==23.2
packaging==24.0
# via
# pyproject-api
# pytest
# tox
# tox-uv
platformdirs==4.2.0
# via
# tox
Expand All @@ -41,14 +42,18 @@ pygments==2.17.2
# via rich
pyproject-api==1.6.1
# via tox
pytest==8.0.1
pytest==8.0.2
# via
# pytest-clarity
# pytest-icdiff
pytest-clarity==1.0.1
pytest-icdiff==0.9
rich==13.7.0
rich==13.7.1
# via pytest-clarity
tox==4.13.0
virtualenv==20.25.0
tox==4.14.1
# via tox-uv
tox-uv==1.6.0
uv==0.1.21
# via tox-uv
virtualenv==20.25.1
# via tox
2 changes: 1 addition & 1 deletion dev-deps/python3.12/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jinja2==3.1.3
# via sphinx
markupsafe==2.1.5
# via jinja2
packaging==23.2
packaging==24.0
# via sphinx
pygments==2.17.2
# via
Expand Down
12 changes: 6 additions & 6 deletions dev-deps/python3.12/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
# uv pip compile --upgrade --python-version=3.12 dev-deps/test.in -o dev-deps/python3.12/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -32,5 +32,5 @@ sortedcontainers==2.4.0
# via
# hypothesis
# sortedcollections
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
12 changes: 6 additions & 6 deletions dev-deps/python3.8/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile --upgrade --python-version=3.8 dev-deps/test.in -o dev-deps/python3.8/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
exceptiongroup==1.2.0
Expand All @@ -11,19 +11,19 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -40,5 +40,5 @@ tomli==2.0.1
# via
# mypy
# pytest
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
12 changes: 6 additions & 6 deletions dev-deps/python3.9/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile --upgrade --python-version=3.9 dev-deps/test.in -o dev-deps/python3.9/test.txt
attrs==23.2.0
# via hypothesis
coverage==7.4.2
coverage==7.4.4
# via coverage-enable-subprocess
coverage-enable-subprocess==1.0
exceptiongroup==1.2.0
Expand All @@ -11,19 +11,19 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
hypothesis==6.98.9
hypothesis==6.99.6
iniconfig==2.0.0
# via pytest
mypy==1.8.0
mypy==1.9.0
mypy-extensions==1.0.0
# via mypy
packaging==23.2
packaging==24.0
# via pytest
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pytest==8.0.1
pytest==8.0.2
# via
# pytest-benchmark
# pytest-sphinx
Expand All @@ -40,5 +40,5 @@ tomli==2.0.1
# via
# mypy
# pytest
typing-extensions==4.9.0
typing-extensions==4.10.0
# via mypy
2 changes: 1 addition & 1 deletion dev-deps/update_dev_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ main() {

log "Done."
log "Reminders:"
log " - Re-run /init_dev_env when ready to sync the new requirements to the dev env."
log " - Re-run init_dev_env when ready to sync the new requirements to the dev env."
log " - Check release notes of upgraded packages for anything that affects bidict."
log " - Ensure tests pass for all supported Python versions."
log " - Check output for any new warnings, not just test failures."
Expand Down
6 changes: 1 addition & 5 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ testpaths = bidict tests docs
doctest_optionflags = ELLIPSIS
addopts =
-vv
# Disable pytest-benchmark by default and require explicitly passing --benchmark-enable to override (prevents warning about incompatibility with pytest-xdist)
--benchmark-disable
--benchmark-columns=min,rounds,iterations
--benchmark-disable-gc
--benchmark-group-by=name
--doctest-modules
--doctest-glob=tests/*.txt
--doctest-glob=docs/*.rst
--durations=5
--hypothesis-profile=less-examples
--numprocesses=auto

0 comments on commit f48bf58

Please sign in to comment.