Skip to content

Commit

Permalink
Add pip-tools to pre-commit configuration (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai authored Jan 18, 2024
1 parent e090701 commit 145ed55
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 42 deletions.
109 changes: 109 additions & 0 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#
# 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 .config/requirements.in pyproject.toml
#
ansible-builder==3.0.0
attrs==23.1.0
babel==2.14.0
beautifulsoup4==4.12.3
bindep==2.11.0
black==23.12.1
cachetools==5.3.2
cairocffi==1.6.1
cairosvg==2.7.1
certifi==2023.11.17
cffi==1.16.0
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
coverage==7.4.0
csscompressor==0.9.5
cssselect2==0.7.0
defusedxml==0.7.1
distlib==0.3.8
distro==1.8.0
dnspython==2.4.2
docstring-parser-fork==0.0.5
exceptiongroup==1.2.0
execnet==2.0.2
filelock==3.13.1
ghp-import==2.1.0
griffe==0.39.0
htmlmin2==0.1.13
identify==2.5.33
idna==3.6
iniconfig==2.0.0
jinja2==3.1.3
jsmin==3.0.1
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
linkchecker==10.4.0
markdown==3.5.2
markdown-exec==1.8.0
markdown-include==0.8.1
markupsafe==2.1.3
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-ansible==0.2.1
mkdocs-autorefs==0.5.0
mkdocs-gen-files==0.5.0
mkdocs-htmlproofer-plugin==1.0.0
mkdocs-material==9.5.4
mkdocs-material-extensions==1.3.1
mkdocs-minify-plugin==0.7.2
mkdocs-monorepo-plugin==1.1.0
mkdocstrings==0.24.0
mkdocstrings-python==1.8.0
mypy==1.8.0
mypy-extensions==1.0.0
nodeenv==1.8.0
packaging==23.1
paginate==0.5.6
parsley==1.3
pathspec==0.12.1
pbr==5.11.1
pillow==10.2.0
pipdeptree==2.13.2
platformdirs==4.1.0
pluggy==1.3.0
pre-commit==3.6.0
pycparser==2.21
pydoclint==0.3.9
pygments==2.17.2
pymdown-extensions==10.7
pyproject-api==1.6.1
pytest==7.4.4
pytest-xdist==3.5.0
python-dateutil==2.8.2
python-slugify==8.0.1
pyyaml==6.0.1
pyyaml-env-tag==0.1
referencing==0.30.2
regex==2023.12.25
requests==2.31.0
requirements-parser==0.5.0
rpds-py==0.10.2
ruff==0.1.13
six==1.16.0
soupsieve==2.5
subprocess-tee==0.4.1
text-unidecode==1.3
tinycss2==1.2.1
toml-sort==0.23.1
tomli==2.0.1
tomlkit==0.12.3
tox==4.11.4
types-pyyaml==6.0.12.12
types-setuptools==68.1.0.1
typing-extensions==4.9.0
urllib3==2.1.0
virtualenv==20.25.0
watchdog==3.0.0
webencodings==0.5.1

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
black
mypy
pip-tools
pre-commit
pydoclint
pytest
Expand Down
File renamed without changes.
File renamed without changes.
36 changes: 0 additions & 36 deletions .config/requirements.txt

This file was deleted.

21 changes: 20 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
ci:
# format compatible with commitlint
autoupdate_commit_msg: "chore: pre-commit autoupdate"
autoupdate_schedule: monthly
autofix_commit_msg: |
chore: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
skip:
- deps
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down Expand Up @@ -61,7 +71,7 @@ repos:
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: 0.3.8
rev: 0.3.9
hooks:
- id: pydoclint
args:
Expand Down Expand Up @@ -95,3 +105,12 @@ repos:
- tests
- --python-version=3.11
pass_filenames: false
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks:
- id: pip-compile
name: deps
alias: deps
entry: pip-compile .config/requirements.in --all-extras --no-annotate --strip-extras --output-file=.config/constraints.txt pyproject.toml
files: ^.config\/.*requirements.*$
language_version: "3.10" # minimal we support officially
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ convention = "pep257"

[tool.setuptools.dynamic]
dependencies = {file = [".config/requirements.in"]}
optional-dependencies.dev = {file = [".config/requirements-dev.txt"]}
optional-dependencies.docs = {file = [".config/requirements-docs.txt"]}
optional-dependencies.test = {file = [".config/requirements-test.txt"]}
optional-dependencies.dev = {file = [".config/requirements-dev.in"]}
optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
optional-dependencies.test = {file = [".config/requirements-test.in"]}

[tool.setuptools_scm]
local_scheme = "no-local-version"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pass_env =
set_env =
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
FORCE_COLOR = 1
PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
PRE_COMMIT_COLOR = always
TERM = xterm-256color
commands_pre =
Expand Down

0 comments on commit 145ed55

Please sign in to comment.