Skip to content

Commit

Permalink
Update dependancies (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Apr 22, 2024
1 parent dadba61 commit a7b0978
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 36 deletions.
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ install:
pip install -r requirements/all.txt
pip install -e .

.PHONY: refresh-lockfiles
refresh-lockfiles:
@echo "Updating requirements/*.txt files using pip-compile"
find requirements/ -name '*.txt' ! -name 'all.txt' -type f -delete
pip-compile -q --no-emit-index-url --resolver backtracking -o requirements/linting.txt requirements/linting.in
pip-compile -q --no-emit-index-url --resolver backtracking -o requirements/testing.txt requirements/testing.in
pip-compile -q --no-emit-index-url --resolver backtracking --extra toml --extra yaml -o requirements/pyproject.txt pyproject.toml
pip install --dry-run -r requirements/all.txt

.PHONY: format
format:
black $(sources)
ruff --fix $(sources)
ruff check --fix $(sources)
ruff format $(sources)

.PHONY: lint
lint:
ruff $(sources)
black $(sources) --check --diff
ruff check $(sources)
ruff format --check $(sources)

.PHONY: mypy
mypy:
Expand Down
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,20 @@ source = [

[tool.ruff]
line-length = 120
target-version = 'py38'

[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true

[tool.ruff.lint]
extend-select = ['Q', 'RUF100', 'C90', 'UP', 'I']
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}
mccabe = { max-complexity = 14 }
isort = { known-first-party = ['pydantic_settings', 'tests'] }
target-version = 'py38'
mccabe = { max-complexity = 14 }
pydocstyle = { convention = 'google' }

[tool.black]
color = true
line-length = 120
target-version = ['py310']
skip-string-normalization = true
[tool.ruff.format]
quote-style = 'single'

[tool.mypy]
python_version = '3.10'
Expand Down
22 changes: 11 additions & 11 deletions requirements/linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements/linting.txt requirements/linting.in
# pip-compile --no-emit-index-url --output-file=requirements/linting.txt requirements/linting.in
#
black==24.2.0
black==24.4.0
# via -r requirements/linting.in
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via black
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.4
# via virtualenv
identify==2.5.34
identify==2.5.36
# via pre-commit
mypy==1.8.0
mypy==1.9.0
# via -r requirements/linting.in
mypy-extensions==1.0.0
# via
# black
# mypy
nodeenv==1.8.0
# via pre-commit
packaging==23.2
packaging==24.0
# via black
pathspec==0.12.1
# via black
Expand All @@ -34,27 +34,27 @@ platformdirs==4.2.0
# virtualenv
pre-commit==3.5.0
# via -r requirements/linting.in
pyupgrade==3.15.0
pyupgrade==3.15.2
# via -r requirements/linting.in
pyyaml==6.0.1
# via
# -r requirements/linting.in
# pre-commit
ruff==0.2.2
ruff==0.4.1
# via -r requirements/linting.in
tokenize-rt==5.2.0
# via pyupgrade
tomli==2.0.1
# via
# black
# mypy
types-pyyaml==6.0.12.12
types-pyyaml==6.0.12.20240311
# via -r requirements/linting.in
typing-extensions==4.9.0
typing-extensions==4.11.0
# via
# black
# mypy
virtualenv==20.25.0
virtualenv==20.25.3
# via pre-commit

# The following packages are considered to be unsafe in a requirements file:
Expand Down
7 changes: 4 additions & 3 deletions requirements/pyproject.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --extra=toml --extra=yaml,toml --output-file=requirements/pyproject.txt pyproject.toml
# pip-compile --extra=toml --extra=yaml --no-emit-index-url --output-file=requirements/pyproject.txt pyproject.toml
#
annotated-types==0.6.0
# via pydantic
Expand All @@ -16,7 +16,8 @@ pyyaml==6.0.1
# via pydantic-settings (pyproject.toml)
tomli==2.0.1
# via pydantic-settings (pyproject.toml)
typing-extensions==4.9.0
typing-extensions==4.11.0
# via
# annotated-types
# pydantic
# pydantic-core
22 changes: 11 additions & 11 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements/testing.txt requirements/testing.in
# pip-compile --no-emit-index-url --output-file=requirements/testing.txt requirements/testing.in
#
black==24.2.0
black==24.4.0
# via pytest-examples
click==8.1.7
# via black
coverage[toml]==7.4.1
coverage[toml]==7.4.4
# via -r requirements/testing.in
exceptiongroup==1.2.0
exceptiongroup==1.2.1
# via pytest
iniconfig==2.0.0
# via pytest
Expand All @@ -20,40 +20,40 @@ mdurl==0.1.2
# via markdown-it-py
mypy-extensions==1.0.0
# via black
packaging==23.2
packaging==24.0
# via
# black
# pytest
pathspec==0.12.1
# via black
platformdirs==4.2.0
# via black
pluggy==1.4.0
pluggy==1.5.0
# via pytest
pygments==2.17.2
# via rich
pytest==8.0.1
pytest==8.1.1
# via
# -r requirements/testing.in
# pytest-examples
# pytest-mock
# pytest-pretty
pytest-examples==0.0.10
# via -r requirements/testing.in
pytest-mock==3.12.0
pytest-mock==3.14.0
# via -r requirements/testing.in
pytest-pretty==1.2.0
# via -r requirements/testing.in
rich==13.7.0
rich==13.7.1
# via pytest-pretty
ruff==0.2.2
ruff==0.4.1
# via pytest-examples
tomli==2.0.1
# via
# black
# coverage
# pytest
typing-extensions==4.9.0
typing-extensions==4.11.0
# via
# black
# rich

0 comments on commit a7b0978

Please sign in to comment.