diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 760dfd38..6cbc252c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: files: ^docs/.*\.rst$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.7 + rev: v0.1.14 hooks: - id: ruff args: diff --git a/docs/contributing.rst b/docs/contributing.rst index 62490263..f78f1ab1 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -12,13 +12,47 @@ The requirements are listed in ``/pyproject.toml``. The constraints are relaxed with the purpose of allowing a3m to be used as a library. We use `pip-tools` which pins the requirements in ``requirements.txt`` and -``requirements-dev.txt`` for our Docker image. We provide a couple of helpers: +``requirements-dev.txt`` for our Docker image. We provide a few helpers: * ``make pip-compile`` generates the requirements with the latest versions of dependencies that satisfy the constraints in ``pyproject.toml``, but does not update versions if they are already satisfied. * ``make pip-upgrade`` regenerates the requirements, forcibly upgrading all listed packages to their latest available versions within the constraints. +* ``make pip-sync`` installs the requirements in your current environment. + +Our routine to keep up with the dependencies:: + + make pip-upgrade + make pip-sync + git add requirements.txt requirements-dev.txt + git commit -m "Update dependencies" + +At this point you can also look up new versions beyond our constraints, e.g.:: + + $ pip list --outdated + Package Version Latest Type + ------- ------- ------ ----- + Django 4.2.9 5.0.1 wheel + lxml 4.9.4 5.1.0 wheel + urllib3 2.0.7 2.1.0 wheel + +Update the constraints in ``pyproject.toml`` as needed, use ``pip-compile`` to +generate the requirements and ``pip-sync`` to update your environment. As you're +adopting new major versions of the dependencies, please make sure that you +understand how that impacts our project. + +pre-commit +^^^^^^^^^^ + +pre-commit is a framework we use for managing and maintaining pre-commit hooks. +The easiest way to discover and apply new updates is to run:: + + pre-commit autoupdate + +Commit the changes and run pre-commit again with:: + + tox -e pre-commit Python version ^^^^^^^^^^^^^^ diff --git a/pyproject.toml b/pyproject.toml index 4103c270..06a73140 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,7 +165,7 @@ typeCheckingMode = "basic" [tool.mypy] ignore_missing_imports = true -namespace_packages = true +namespace_packages = false files = [ "a3m", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 5c7306da..4b7b6d16 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,13 +4,13 @@ # # pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx ammcpc==0.2.0 # via a3m (pyproject.toml) asgiref==3.7.2 # via django -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing @@ -21,9 +21,9 @@ bagit==1.8.1 # via a3m (pyproject.toml) bandit==1.7.6 # via a3m (pyproject.toml) -boto3==1.33.13 +boto3==1.34.23 # via a3m (pyproject.toml) -botocore==1.33.13 +botocore==1.34.23 # via # boto3 # s3transfer @@ -53,7 +53,7 @@ click-log==0.4.0 # via scriv colorama==0.4.6 # via tox -coverage[toml]==7.3.2 +coverage[toml]==7.4.0 # via # a3m (pyproject.toml) # pytest-cov @@ -61,7 +61,7 @@ cryptography==41.0.7 # via secretstorage distlib==0.3.8 # via virtualenv -django==4.2.8 +django==4.2.9 # via # a3m (pyproject.toml) # django-stubs-ext @@ -83,7 +83,7 @@ filelock==3.13.1 # virtualenv gitdb==4.0.11 # via gitpython -gitpython==3.1.40 +gitpython==3.1.41 # via bandit googleapis-common-protos==1.62.0 # via @@ -107,7 +107,7 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 # via twine iniconfig==2.0.0 # via pytest @@ -117,7 +117,7 @@ jeepney==0.8.0 # via # keyring # secretstorage -jinja2==3.1.2 +jinja2==3.1.3 # via # scriv # sphinx @@ -125,13 +125,13 @@ jmespath==1.0.1 # via # boto3 # botocore -jsonschema==4.20.0 +jsonschema==4.21.1 # via a3m (pyproject.toml) -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema keyring==24.3.0 # via twine -lxml==4.9.3 +lxml==4.9.4 # via # a3m (pyproject.toml) # ammcpc @@ -140,15 +140,15 @@ markdown-it-py==3.0.0 # via # rich # scriv -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 mdurl==0.1.2 # via markdown-it-py metsrw==0.5.0 # via a3m (pyproject.toml) -more-itertools==10.1.0 +more-itertools==10.2.0 # via jaraco-classes -mypy==1.7.1 +mypy==1.8.0 # via a3m (pyproject.toml) mypy-extensions==1.0.0 # via mypy @@ -182,7 +182,7 @@ pre-commit==3.6.0 # via a3m (pyproject.toml) prometheus-client==0.19.0 # via a3m (pyproject.toml) -protobuf==4.25.1 +protobuf==4.25.2 # via # googleapis-common-protos # grpcio-reflection @@ -190,7 +190,7 @@ protobuf==4.25.1 # grpcio-tools pycparser==2.21 # via cffi -pygfried==0.6.0 +pygfried==0.7.0 # via a3m (pyproject.toml) pygments==2.17.2 # via @@ -202,7 +202,7 @@ pyproject-api==1.6.1 # via tox pyproject-hooks==1.0.0 # via build -pytest==7.4.3 +pytest==7.4.4 # via # a3m (pyproject.toml) # pytest-cov @@ -225,7 +225,7 @@ pyyaml==6.0.1 # pre-commit readme-renderer==42.0 # via twine -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -247,15 +247,15 @@ rich==13.7.0 # a3m (pyproject.toml) # bandit # twine -rpds-py==0.13.2 +rpds-py==0.17.1 # via # jsonschema # referencing -ruff==0.1.7 +ruff==0.1.14 # via a3m (pyproject.toml) -s3transfer==0.8.2 +s3transfer==0.10.0 # via boto3 -scriv==1.5.0 +scriv==1.5.1 # via a3m (pyproject.toml) secretstorage==3.3.3 # via keyring @@ -266,26 +266,20 @@ smmap==5.0.1 snowballstemmer==2.2.0 # via sphinx sphinx==7.2.6 - # via - # a3m (pyproject.toml) - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml -sphinxcontrib-applehelp==1.0.7 + # via a3m (pyproject.toml) +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-mermaid==0.9.2 # via a3m (pyproject.toml) -sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx sqlparse==0.4.4 # via django @@ -295,30 +289,28 @@ stevedore==5.1.0 # doc8 tenacity==8.2.3 # via a3m (pyproject.toml) -toml==0.10.2 - # via vulture -tox==4.11.4 +tox==4.12.1 # via a3m (pyproject.toml) twine==4.0.2 # via a3m (pyproject.toml) -types-beautifulsoup4==4.12.0.7 +types-beautifulsoup4==4.12.0.20240106 # via types-lxml -types-html5lib==1.1.11.15 +types-html5lib==1.1.11.20240106 # via types-beautifulsoup4 types-lxml==2023.10.21 # via a3m (pyproject.toml) -types-protobuf==4.24.0.4 +types-protobuf==4.24.0.20240106 # via a3m (pyproject.toml) -types-psycopg2==2.9.21.20 +types-psycopg2==2.9.21.20240118 # via django-types -types-requests==2.31.0.10 +types-requests==2.31.0.20240106 # via a3m (pyproject.toml) typing-extensions==4.9.0 # via # django-stubs-ext # mypy # types-lxml -unidecode==1.3.7 +unidecode==1.3.8 # via a3m (pyproject.toml) urllib3==2.0.7 # via @@ -330,7 +322,7 @@ virtualenv==20.25.0 # via # pre-commit # tox -vulture==2.10 +vulture==2.11 # via a3m (pyproject.toml) wheel==0.42.0 # via diff --git a/requirements.txt b/requirements.txt index 21507371..3b143254 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,15 +8,15 @@ ammcpc==0.2.0 # via a3m (pyproject.toml) asgiref==3.7.2 # via django -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing bagit==1.8.1 # via a3m (pyproject.toml) -boto3==1.33.13 +boto3==1.34.23 # via a3m (pyproject.toml) -botocore==1.33.13 +botocore==1.34.23 # via # boto3 # s3transfer @@ -26,7 +26,7 @@ charset-normalizer==3.3.2 # via requests click==8.1.7 # via a3m (pyproject.toml) -django==4.2.8 +django==4.2.9 # via # a3m (pyproject.toml) # django-stubs-ext @@ -51,11 +51,11 @@ jmespath==1.0.1 # via # boto3 # botocore -jsonschema==4.20.0 +jsonschema==4.21.1 # via a3m (pyproject.toml) -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema -lxml==4.9.3 +lxml==4.9.4 # via # a3m (pyproject.toml) # ammcpc @@ -70,18 +70,18 @@ platformdirs==4.1.0 # via a3m (pyproject.toml) prometheus-client==0.19.0 # via a3m (pyproject.toml) -protobuf==4.25.1 +protobuf==4.25.2 # via # googleapis-common-protos # grpcio-reflection # grpcio-status -pygfried==0.6.0 +pygfried==0.7.0 # via a3m (pyproject.toml) pygments==2.17.2 # via rich python-dateutil==2.8.2 # via botocore -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -89,11 +89,11 @@ requests==2.31.0 # via a3m (pyproject.toml) rich==13.7.0 # via a3m (pyproject.toml) -rpds-py==0.13.2 +rpds-py==0.17.1 # via # jsonschema # referencing -s3transfer==0.8.2 +s3transfer==0.10.0 # via boto3 six==1.16.0 # via python-dateutil @@ -103,7 +103,7 @@ tenacity==8.2.3 # via a3m (pyproject.toml) typing-extensions==4.9.0 # via django-stubs-ext -unidecode==1.3.7 +unidecode==1.3.8 # via a3m (pyproject.toml) urllib3==2.0.7 # via