Skip to content

Commit

Permalink
Add --no-annotate flag to the pip-compile pre-commit hook (#58)
Browse files Browse the repository at this point in the history
Without this flag, the path that some dependencies are annotated with
will differ on the pipeline which will cause differences on the auto generated files
  • Loading branch information
said-moj authored Nov 4, 2024
1 parent 78f72bf commit 4fdb63a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 308 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ repos:
- id: pip-compile
name: pip-compile requirements-development.in
files: requirements-(base|development).in
args: [requirements/source/requirements-development.in, "--output-file", requirements/generated/requirements-development.txt]
args: [requirements/source/requirements-development.in, "--output-file", requirements/generated/requirements-development.txt, "--no-annotate"]
- id: pip-compile
name: pip-compile requirements-linting.in
files: requirements-(base|linting).in
args: [requirements/source/requirements-linting.in, "--output-file", requirements/generated/requirements-linting.txt]
args: [requirements/source/requirements-linting.in, "--output-file", requirements/generated/requirements-linting.txt, "--no-annotate"]
- id: pip-compile
name: pip-compile requirements-testing.in
files: requirements-(base|testing).in
args: [requirements/source/requirements-testing.in, "--output-file", requirements/generated/requirements-testing.txt]
args: [requirements/source/requirements-testing.in, "--output-file", requirements/generated/requirements-testing.txt, "--no-annotate"]
- id: pip-compile
name: pip-compile requirements-production.in
files: requirements-(base|production).in
args: [requirements/source/requirements-production.in, "--output-file", requirements/generated/requirements-production.txt]
args: [requirements/source/requirements-production.in, "--output-file", requirements/generated/requirements-production.txt, "--no-annotate"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.2
hooks:
Expand Down
2 changes: 2 additions & 0 deletions .trufflehog3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ exclude: # exclude matching issues
- dist/**
- README.md
- .github/**
- .ruff_cache/**
- .pytest_cache/**
- message: Examples and data necessary for running auto-tests
paths:
- docs/*.html
Expand Down
114 changes: 1 addition & 113 deletions requirements/generated/requirements-development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,186 +2,74 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/generated/requirements-development.txt requirements/source/requirements-development.in
# pip-compile --no-annotate --output-file=requirements/generated/requirements-development.txt requirements/source/requirements-development.in
#
alembic==1.13.2
# via
# -r requirements/source/requirements-base.in
# alembic-postgresql-enum
alembic-postgresql-enum==1.3.0
# via -r requirements/source/requirements-base.in
annotated-types==0.7.0
# via pydantic
anyio==3.7.1
# via
# httpx
# starlette
# watchfiles
argon2-cffi==23.1.0
# via -r requirements/source/requirements-base.in
argon2-cffi-bindings==21.2.0
# via argon2-cffi
attrs==20.3.0
# via trufflehog3
certifi==2024.7.4
# via
# httpcore
# httpx
# sentry-sdk
cffi==1.17.0
# via argon2-cffi-bindings
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via
# typer
# uvicorn
distlib==0.3.8
# via virtualenv
dnspython==2.7.0
# via email-validator
email-validator==2.2.0
# via fastapi
fastapi[standard]==0.115.2
# via
# -r requirements/source/requirements-base.in
# sentry-sdk
fastapi-cli[standard]==0.0.5
# via fastapi
filelock==3.15.4
# via virtualenv
freezegun==1.5.1
# via -r requirements/source/requirements-testing.in
gitdb==4.0.11
# via gitpython
gitpython==3.1.41
# via trufflehog3
greenlet==3.0.3
# via sqlalchemy
h11==0.14.0
# via
# httpcore
# uvicorn
httpcore==1.0.6
# via httpx
httptools==0.6.1
# via uvicorn
httpx==0.27.2
# via fastapi
identify==2.6.0
# via pre-commit
idna==3.7
# via
# anyio
# email-validator
# httpx
iniconfig==2.0.0
# via pytest
jinja2==3.1.4
# via
# fastapi
# trufflehog3
mako==1.3.5
# via alembic
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via
# jinja2
# mako
mdurl==0.1.2
# via markdown-it-py
nodeenv==1.9.1
# via pre-commit
packaging==24.1
# via pytest
passlib==1.7.4
# via -r requirements/source/requirements-base.in
platformdirs==4.2.2
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.7.1
# via -r requirements/source/requirements-development.in
psycopg2-binary==2.9.9
# via -r requirements/source/requirements-base.in
pycparser==2.22
# via cffi
pydantic==2.8.2
# via
# fastapi
# sqlmodel
pydantic-core==2.20.1
# via pydantic
pygments==2.18.0
# via rich
pyjwt==2.9.0
# via -r requirements/source/requirements-base.in
pytest==7.4.4
# via -r requirements/source/requirements-testing.in
python-dateutil==2.9.0.post0
# via freezegun
python-dotenv==1.0.1
# via uvicorn
python-multipart==0.0.12
# via fastapi
pyyaml==6.0.1
# via
# pre-commit
# trufflehog3
# uvicorn
rich==13.9.2
# via typer
ruff==0.6.2
# via -r requirements/source/requirements-linting.in
sentry-sdk[fastapi]==2.11.0
# via -r requirements/source/requirements-base.in
shellingham==1.5.4
# via typer
six==1.16.0
# via python-dateutil
smmap==5.0.1
# via gitdb
sniffio==1.3.1
# via
# anyio
# httpx
sqlalchemy[asyncio]==2.0.31
# via
# -r requirements/source/requirements-base.in
# alembic
# alembic-postgresql-enum
# sqlmodel
sqlmodel==0.0.22
# via -r requirements/source/requirements-base.in
starlette==0.40.0
# via
# -r requirements/source/requirements-base.in
# fastapi
trufflehog3==3.0.10
# via -r requirements/source/requirements-linting.in
typer==0.12.5
# via fastapi-cli
typing-extensions==4.12.2
# via
# -r requirements/source/requirements-base.in
# alembic
# fastapi
# pydantic
# pydantic-core
# sqlalchemy
# typer
urllib3==2.2.2
# via sentry-sdk
uvicorn[standard]==0.31.0
# via
# fastapi
# fastapi-cli
uvloop==0.20.0
# via uvicorn
virtualenv==20.26.3
# via pre-commit
watchfiles==0.24.0
# via uvicorn
websockets==13.1
# via uvicorn
11 changes: 1 addition & 10 deletions requirements/generated/requirements-linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,14 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/generated/requirements-linting.txt requirements/source/requirements-linting.in
# pip-compile --no-annotate --output-file=requirements/generated/requirements-linting.txt requirements/source/requirements-linting.in
#
attrs==20.3.0
# via trufflehog3
gitdb==4.0.11
# via gitpython
gitpython==3.1.41
# via trufflehog3
jinja2==3.1.4
# via trufflehog3
markupsafe==2.1.5
# via jinja2
pyyaml==6.0.1
# via trufflehog3
ruff==0.6.2
# via -r requirements/source/requirements-linting.in
smmap==5.0.1
# via gitdb
trufflehog3==3.0.10
# via -r requirements/source/requirements-linting.in
88 changes: 1 addition & 87 deletions requirements/generated/requirements-production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,139 +2,53 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/generated/requirements-production.txt requirements/source/requirements-production.in
# pip-compile --no-annotate --output-file=requirements/generated/requirements-production.txt requirements/source/requirements-production.in
#
alembic==1.13.2
# via
# -r requirements/source/requirements-base.in
# alembic-postgresql-enum
alembic-postgresql-enum==1.3.0
# via -r requirements/source/requirements-base.in
annotated-types==0.7.0
# via pydantic
anyio==4.4.0
# via
# httpx
# starlette
# watchfiles
argon2-cffi==23.1.0
# via -r requirements/source/requirements-base.in
argon2-cffi-bindings==21.2.0
# via argon2-cffi
certifi==2024.7.4
# via
# httpcore
# httpx
# sentry-sdk
cffi==1.17.0
# via argon2-cffi-bindings
click==8.1.7
# via
# typer
# uvicorn
dnspython==2.7.0
# via email-validator
email-validator==2.2.0
# via fastapi
fastapi[standard]==0.115.2
# via
# -r requirements/source/requirements-base.in
# sentry-sdk
fastapi-cli[standard]==0.0.5
# via fastapi
greenlet==3.0.3
# via sqlalchemy
h11==0.14.0
# via
# httpcore
# uvicorn
httpcore==1.0.6
# via httpx
httptools==0.6.1
# via uvicorn
httpx==0.27.2
# via fastapi
idna==3.7
# via
# anyio
# email-validator
# httpx
jinja2==3.1.4
# via fastapi
mako==1.3.5
# via alembic
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via
# jinja2
# mako
mdurl==0.1.2
# via markdown-it-py
passlib==1.7.4
# via -r requirements/source/requirements-base.in
psycopg2-binary==2.9.9
# via -r requirements/source/requirements-base.in
pycparser==2.22
# via cffi
pydantic==2.8.2
# via
# fastapi
# sqlmodel
pydantic-core==2.20.1
# via pydantic
pygments==2.18.0
# via rich
pyjwt==2.9.0
# via -r requirements/source/requirements-base.in
python-dotenv==1.0.1
# via uvicorn
python-multipart==0.0.12
# via fastapi
pyyaml==6.0.2
# via uvicorn
rich==13.9.2
# via typer
sentry-sdk[fastapi]==2.11.0
# via -r requirements/source/requirements-base.in
shellingham==1.5.4
# via typer
sniffio==1.3.1
# via
# anyio
# httpx
sqlalchemy[asyncio]==2.0.31
# via
# -r requirements/source/requirements-base.in
# alembic
# alembic-postgresql-enum
# sqlmodel
sqlmodel==0.0.22
# via -r requirements/source/requirements-base.in
starlette==0.40.0
# via
# -r requirements/source/requirements-base.in
# fastapi
typer==0.12.5
# via fastapi-cli
typing-extensions==4.12.2
# via
# -r requirements/source/requirements-base.in
# alembic
# fastapi
# pydantic
# pydantic-core
# sqlalchemy
# typer
urllib3==2.2.2
# via sentry-sdk
uvicorn[standard]==0.31.0
# via
# fastapi
# fastapi-cli
uvloop==0.20.0
# via uvicorn
watchfiles==0.24.0
# via uvicorn
websockets==13.1
# via uvicorn
Loading

0 comments on commit 4fdb63a

Please sign in to comment.