diff --git a/.config/constraints.txt b/.config/constraints.txt index c9eb003..b389179 100644 --- a/.config/constraints.txt +++ b/.config/constraints.txt @@ -1,103 +1,99 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=backports-tarfile --unsafe-package=cryptography --unsafe-package=exceptiongroup --unsafe-package=jeepney --unsafe-package=secretstorage --unsafe-package=twine pyproject.toml -# -babel==2.16.0 -beautifulsoup4==4.12.3 -build==1.2.2.post1 -cachetools==5.5.0 -cairocffi==1.7.1 -cairosvg==2.7.1 -certifi==2024.12.14 -cffi==1.17.1 -chardet==5.2.0 -charset-normalizer==3.4.0 -click==8.1.8 -colorama==0.4.6 -coverage==7.6.9 -cssselect2==0.7.0 -defusedxml==0.7.1 -diskcache==5.6.3 -distlib==0.3.9 -docutils==0.21.2 -filelock==3.16.1 -ghp-import==2.1.0 -gitdb==4.0.11 -gitpython==3.1.43 -idna==3.10 -importlib-metadata==8.5.0 -iniconfig==2.0.0 -jaraco-classes==3.4.0 -jaraco-context==6.0.1 -jaraco-functools==4.1.0 -jinja2==3.1.5 -keyring==25.5.0 -markdown==3.7 -markdown-exec==1.10.0 -markdown-it-py==3.0.0 -markupsafe==3.0.2 -mdurl==0.1.2 -mergedeep==1.3.4 -mkdocs==1.6.1 -mkdocs-autorefs==1.2.0 -mkdocs-gen-files==0.5.0 -mkdocs-get-deps==0.2.0 -mkdocs-htmlproofer-plugin==1.3.0 -mkdocs-material==9.5.49 -mkdocs-material-extensions==1.3.1 -more-itertools==10.5.0 -nh3==0.2.20 -packaging==24.2 -paginate==0.5.7 -pathspec==0.12.1 -pillow==11.0.0 -pip==24.3.1 -pipdeptree==2.24.0 -pkginfo==1.12.0 -platformdirs==4.3.6 -pluggy==1.5.0 -py-cpuinfo==9.0.0 -pycparser==2.22 -pygments==2.18.0 -pymdown-extensions==10.12 -pyproject-api==1.8.0 -pyproject-hooks==1.2.0 -pytest==8.3.4 -pytest-benchmark==5.1.0 -pytest-plus==0.7.0 -python-dateutil==2.9.0.post0 -pyyaml==6.0.2 -pyyaml-env-tag==0.1 -readme-renderer==44.0 -regex==2024.11.6 -requests==2.32.3 -requests-toolbelt==1.0.0 -rfc3986==2.0.0 -rich==13.9.4 -setuptools==75.6.0 -shellingham==1.5.4 -six==1.17.0 -smmap==5.0.1 -soupsieve==2.6 -subprocess-tee==0.4.2 -tinycss2==1.4.0 -tomli==2.0.1 ; python_version < "3.11" -tox==4.23.2 -typer==0.15.1 -typer-config==1.4.2 -typing-extensions==4.12.2 -urllib3==2.2.3 -virtualenv==20.28.0 -watchdog==6.0.0 -webencodings==0.5.1 -zipp==3.21.0 +# This file was autogenerated by uv via the following command: +# tox run -e deps +babel==2.16.0 ; sys_platform != 'win32' # via mkdocs-material +beautifulsoup4==4.12.3 ; sys_platform != 'win32' # via mkdocs-htmlproofer-plugin +build==1.2.2.post1 ; sys_platform != 'win32' # via mk (pyproject.toml) +cachetools==5.5.0 ; sys_platform != 'win32' # via tox +cairocffi==1.7.1 ; sys_platform != 'win32' # via cairosvg +cairosvg==2.7.1 ; sys_platform != 'win32' # via mk (pyproject.toml) +certifi==2024.12.14 ; sys_platform != 'win32' # via requests +cffi==1.17.1 ; sys_platform != 'win32' # via cairocffi, cryptography +chardet==5.2.0 ; sys_platform != 'win32' # via tox +charset-normalizer==3.4.0 ; sys_platform != 'win32' # via requests +click==8.1.8 ; sys_platform != 'win32' # via mkdocs, typer +colorama==0.4.6 ; sys_platform != 'win32' # via build, mkdocs-material, tox +coverage==7.6.9 ; sys_platform != 'win32' # via mk (pyproject.toml) +cssselect2==0.7.0 ; sys_platform != 'win32' # via cairosvg +defusedxml==0.7.1 ; sys_platform != 'win32' # via cairosvg +diskcache==5.6.3 ; sys_platform != 'win32' # via mk (pyproject.toml) +distlib==0.3.9 ; sys_platform != 'win32' # via virtualenv +docutils==0.21.2 ; sys_platform != 'win32' # via readme-renderer +filelock==3.16.1 ; sys_platform != 'win32' # via tox, virtualenv +ghp-import==2.1.0 ; sys_platform != 'win32' # via mkdocs +gitdb==4.0.11 ; sys_platform != 'win32' # via gitpython +gitpython==3.1.43 ; sys_platform != 'win32' # via mk (pyproject.toml) +idna==3.10 ; sys_platform != 'win32' # via requests +importlib-metadata==8.5.0 ; python_full_version < '3.12' and platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via keyring +iniconfig==2.0.0 ; sys_platform != 'win32' # via pytest +jaraco-classes==3.4.0 ; platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via keyring +jaraco-context==6.0.1 ; platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via keyring +jaraco-functools==4.1.0 ; platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via keyring +jinja2==3.1.5 ; sys_platform != 'win32' # via mkdocs, mkdocs-material +keyring==25.5.0 ; platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via twine +markdown==3.7 ; sys_platform != 'win32' # via mkdocs, mkdocs-autorefs, mkdocs-htmlproofer-plugin, mkdocs-material, pymdown-extensions +markdown-exec==1.10.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +markdown-it-py==3.0.0 ; sys_platform != 'win32' # via rich +markupsafe==3.0.2 ; sys_platform != 'win32' # via jinja2, mkdocs, mkdocs-autorefs +mdurl==0.1.2 ; sys_platform != 'win32' # via markdown-it-py +mergedeep==1.3.4 ; sys_platform != 'win32' # via mkdocs, mkdocs-get-deps +mkdocs==1.6.1 ; sys_platform != 'win32' # via mkdocs-autorefs, mkdocs-gen-files, mkdocs-htmlproofer-plugin, mkdocs-material, mk (pyproject.toml) +mkdocs-autorefs==1.2.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +mkdocs-gen-files==0.5.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +mkdocs-get-deps==0.2.0 ; sys_platform != 'win32' # via mkdocs +mkdocs-htmlproofer-plugin==1.3.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +mkdocs-material==9.5.49 ; sys_platform != 'win32' # via mk (pyproject.toml) +mkdocs-material-extensions==1.3.1 ; sys_platform != 'win32' # via mkdocs-material, mk (pyproject.toml) +more-itertools==10.5.0 ; platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via jaraco-classes, jaraco-functools +nh3==0.2.20 ; sys_platform != 'win32' # via readme-renderer +packaging==24.2 ; sys_platform != 'win32' # via build, mkdocs, pipdeptree, pyproject-api, pytest, tox, twine, mk (pyproject.toml) +paginate==0.5.7 ; sys_platform != 'win32' # via mkdocs-material +pathspec==0.12.1 ; sys_platform != 'win32' # via mkdocs +pillow==11.0.0 ; sys_platform != 'win32' # via cairosvg, mk (pyproject.toml) +pipdeptree==2.24.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +pkginfo==1.12.0 ; sys_platform != 'win32' # via twine +platformdirs==4.3.6 ; sys_platform != 'win32' # via mkdocs-get-deps, tox, virtualenv +pluggy==1.5.0 ; sys_platform != 'win32' # via pytest, tox, mk (pyproject.toml) +py-cpuinfo==9.0.0 ; sys_platform != 'win32' # via pytest-benchmark +pycparser==2.22 ; sys_platform != 'win32' # via cffi +pygments==2.18.0 ; sys_platform != 'win32' # via mkdocs-material, readme-renderer, rich +pymdown-extensions==10.12 ; sys_platform != 'win32' # via markdown-exec, mkdocs-material, mk (pyproject.toml) +pyproject-api==1.8.0 ; sys_platform != 'win32' # via tox +pyproject-hooks==1.2.0 ; sys_platform != 'win32' # via build +pytest==8.3.4 ; sys_platform != 'win32' # via pytest-benchmark, pytest-plus, mk (pyproject.toml) +pytest-benchmark==5.1.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +pytest-plus==0.7.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +python-dateutil==2.9.0.post0 ; sys_platform != 'win32' # via ghp-import +pyyaml==6.0.2 ; sys_platform != 'win32' # via mkdocs, mkdocs-get-deps, pymdown-extensions, pyyaml-env-tag, mk (pyproject.toml) +pyyaml-env-tag==0.1 ; sys_platform != 'win32' # via mkdocs +readme-renderer==44.0 ; sys_platform != 'win32' # via twine +regex==2024.11.6 ; sys_platform != 'win32' # via mkdocs-material +requests==2.32.3 ; sys_platform != 'win32' # via mkdocs-htmlproofer-plugin, mkdocs-material, requests-toolbelt, twine +requests-toolbelt==1.0.0 ; sys_platform != 'win32' # via twine +rfc3986==2.0.0 ; sys_platform != 'win32' # via twine +rich==13.9.4 ; sys_platform != 'win32' # via twine, typer, mk (pyproject.toml) +setuptools==75.6.0 ; sys_platform != 'win32' # via mk (pyproject.toml) +shellingham==1.5.4 ; sys_platform != 'win32' # via typer, mk (pyproject.toml) +six==1.17.0 ; sys_platform != 'win32' # via python-dateutil +smmap==5.0.1 ; sys_platform != 'win32' # via gitdb +soupsieve==2.6 ; sys_platform != 'win32' # via beautifulsoup4 +subprocess-tee==0.4.2 ; sys_platform != 'win32' # via mk (pyproject.toml) +tinycss2==1.4.0 ; sys_platform != 'win32' # via cairosvg, cssselect2 +tomli==2.0.1 ; python_full_version < '3.11' and sys_platform != 'win32' # via build, pyproject-api, pytest, tox, mk (pyproject.toml) +tox==4.23.2 ; sys_platform != 'win32' # via mk (pyproject.toml) +typer==0.15.1 ; sys_platform != 'win32' # via typer-config, mk (pyproject.toml) +typer-config==1.4.2 ; sys_platform != 'win32' # via mk (pyproject.toml) +urllib3==2.2.3 ; sys_platform != 'win32' # via requests, twine +virtualenv==20.28.0 ; sys_platform != 'win32' # via tox +watchdog==6.0.0 ; sys_platform != 'win32' # via mkdocs +webencodings==0.5.1 ; sys_platform != 'win32' # via cssselect2, tinycss2 +zipp==3.21.0 ; python_full_version < '3.12' and platform_machine != 'ppc64le' and platform_machine != 's390x' and sys_platform != 'win32' # via importlib-metadata -# The following packages are considered to be unsafe in a requirements file: +# The following packages were excluded from the output: # backports-tarfile # cryptography # exceptiongroup # jeepney +# pip # secretstorage # twine +# typing-extensions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bd3170..fe8a065 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- ci: skip: - - lock + - pip-compile - deps repos: - repo: https://github.com/astral-sh/ruff-pre-commit @@ -92,31 +92,27 @@ repos: - subprocess-tee - typer-config - typer>=0.12.2 - - repo: https://github.com/jazzband/pip-tools - rev: 7.4.1 + + # keep at bottom as these are slower + - repo: local hooks: - - id: pip-compile - name: lock - alias: lock - always_run: true - # keyring excluded in order to keep lockfile portable between linux and macos - entry: pip-compile pyproject.toml - files: ^.config\/.*requirements.*$ + - id: deps + name: Upgrade constraints files and requirements + files: ^(pyproject\.toml|requirements\.txt)$ language: python language_version: "3.10" # minimal we support officially + entry: python3 -m uv pip compile -q --universal --all-extras --output-file=.config/constraints.txt pyproject.toml --upgrade pass_filenames: false - stages: [manual] + stages: + - manual additional_dependencies: - - pip>=22.3.1 + - uv>=0.4.3 - id: pip-compile - name: deps - alias: deps - always_run: true - entry: pip-compile pyproject.toml --upgrade - files: ^.config\/.*requirements.*$ + name: Check constraints files and requirements + files: ^(pyproject\.toml|requirements\.txt)$ language: python language_version: "3.10" # minimal we support officially + entry: python3 -m uv pip compile -q --universal --all-extras --output-file=.config/constraints.txt pyproject.toml pass_filenames: false - stages: [manual] additional_dependencies: - - pip>=22.3.1 + - uv>=0.4.3 diff --git a/pyproject.toml b/pyproject.toml index fd0a3fd..2f1578c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,23 +100,6 @@ color_output = true error_summary = true no_incremental = true -[tool.pip-tools] -no_annotate = true -quiet = true - -[tool.pip-tools.compile] -all_extras = true -output_file = ".config/constraints.txt" -strip_extras = true -unsafe_package = [ - "backports-tarfile", - "cryptography", - "exceptiongroup", - "jeepney", - "secretstorage", - "twine" -] - [tool.pylint."MESSAGES CONTROL"] # increase from default is 50 which is too aggressive max-statements = 60 @@ -187,8 +170,28 @@ git_describe_command = [ "git", "describe", "--dirty", - "--tags", "--long", + "--tags", "--match", "v*.*" ] + +[tool.uv] +# incompatible with Windows +environments = ["platform_system != 'Windows'"] + +[tool.uv.pip] +annotation-style = "line" +custom-compile-command = "tox run -e deps" +no-emit-package = [ + "backports-tarfile", + "cryptography", + "exceptiongroup", + "jeepney", + "pip", + "resolvelib", + "secretstorage", + "twine", + "typing_extensions", + "uv" +] diff --git a/tox.ini b/tox.ini index 20a0cbb..bec8b17 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ skip_missing_interpreters = true requires = tox >= 4.15.1 tox-extra + tox-uv setuptools >= 65.3.0 # editable installs pip >= 24.0 @@ -116,9 +117,9 @@ passenv = {[testenv]passenv} # without PROGRAMDATA cloning using git for Windows will fail with an # `error setting certificate verify locations` error PROGRAMDATA -extras = lint deps = pre-commit >= 2.4.0 + pre-commit-uv # `usedevelop = true` overrides `skip_install` instruction, it's unwanted usedevelop = false # don't install package itself in this env @@ -127,7 +128,6 @@ setenv = PIP_CONSTRAINT= commands = pre-commit run {tty:--color=always} --all-files --show-diff-on-failure - pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock [testenv:integration] description = Run integrations tests