From 4fdb63a34bb8b701ed219554aff7667530a68900 Mon Sep 17 00:00:00 2001 From: said-moj <45761276+said-moj@users.noreply.github.com> Date: Mon, 4 Nov 2024 08:55:17 +0000 Subject: [PATCH] Add --no-annotate flag to the pip-compile pre-commit hook (#58) 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 --- .pre-commit-config.yaml | 8 +- .trufflehog3.yml | 2 + .../generated/requirements-development.txt | 114 +----------------- .../generated/requirements-linting.txt | 11 +- .../generated/requirements-production.txt | 88 +------------- .../generated/requirements-testing.txt | 95 +-------------- 6 files changed, 10 insertions(+), 308 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 733d005..d592da1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/.trufflehog3.yml b/.trufflehog3.yml index ab75566..88dc97e 100644 --- a/.trufflehog3.yml +++ b/.trufflehog3.yml @@ -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 diff --git a/requirements/generated/requirements-development.txt b/requirements/generated/requirements-development.txt index 03f60da..ac47ed6 100644 --- a/requirements/generated/requirements-development.txt +++ b/requirements/generated/requirements-development.txt @@ -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 diff --git a/requirements/generated/requirements-linting.txt b/requirements/generated/requirements-linting.txt index 24e79d6..80dabc2 100644 --- a/requirements/generated/requirements-linting.txt +++ b/requirements/generated/requirements-linting.txt @@ -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 diff --git a/requirements/generated/requirements-production.txt b/requirements/generated/requirements-production.txt index e063fd2..98138d3 100644 --- a/requirements/generated/requirements-production.txt +++ b/requirements/generated/requirements-production.txt @@ -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 diff --git a/requirements/generated/requirements-testing.txt b/requirements/generated/requirements-testing.txt index e262f56..4811ff4 100644 --- a/requirements/generated/requirements-testing.txt +++ b/requirements/generated/requirements-testing.txt @@ -2,153 +2,60 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --output-file=requirements/generated/requirements-testing.txt requirements/source/requirements-testing.in +# pip-compile --no-annotate --output-file=requirements/generated/requirements-testing.txt requirements/source/requirements-testing.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 freezegun==1.5.1 - # via -r requirements/source/requirements-testing.in 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 iniconfig==2.0.0 - # via pytest 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 packaging==24.1 - # via pytest passlib==1.7.4 - # via -r requirements/source/requirements-base.in pluggy==1.5.0 - # via pytest 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.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 six==1.16.0 - # via python-dateutil 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