Skip to content

Commit

Permalink
Use more lockfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Feb 19, 2025
1 parent f6b8161 commit fb65350
Show file tree
Hide file tree
Showing 11 changed files with 2,456 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ jobs:

- name: Install dependencies
run: |
uv export --no-hashes --frozen --all-extras --group benchmark -o requirements.txt
uv pip install --system -r requirements.txt
uv pip install --system -r requirements/requirements.codspeed.txt
- uses: CodSpeedHQ/action@v3
with:
Expand Down
49 changes: 47 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,53 @@ repos:
- id: uv-lock
- id: uv-sync
- id: uv-export
args: ["--no-emit-project", "--frozen", "--no-dev", "--group", "docs", "--output-file=docs/requirements.txt"]

name: Export docs requirements
args:
- "--no-emit-project"
- "--frozen"
- "--no-dev"
- "--group"
- "docs"
- "--output-file"
- "requirements/requirements.docs.txt"
- id: uv-export
name: Export package requirements, including extras
args:
- "--no-emit-project"
- "--frozen"
- "--all-extras"
- "--no-dev"
- "--output-file"
- "requirements/requirements.txt"
- id: uv-export
name: Export testing requirements
args:
- "--no-emit-project"
- "--frozen"
- "--only-group"
- "testing"
- "--output-file"
- "requirements/requirements.test.txt"
- id: uv-export
name: Export typing requirements
args:
- "--no-emit-project"
- "--frozen"
- "--only-group"
- "typing"
- "--output-file"
- "requirements/requirements.typing.txt"
- id: uv-export
name: Export Codspeed requirements
args:
- "--no-emit-project"
- "--frozen"
- "--no-hashes"
- "--all-extras"
- "--only-group"
- "benchmark"
- "--output-file"
- "requirements/requirements.codspeed.txt"

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt
- requirements: requirements/requirements.docs.txt
40 changes: 22 additions & 18 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
"test_cookiecutter",
]

dependency_groups = nox.project.load_toml()["dependency-groups"]
test_dependencies: list[str] = dependency_groups["dev"]
typing_dependencies: list[str] = dependency_groups["typing"]


@nox.session(python=main_python_version)
def mypy(session: nox.Session) -> None:
"""Check types with mypy."""
args = session.posargs or ["singer_sdk"]
session.install(".[faker,jwt,parquet,s3,testing]")
session.install(*typing_dependencies)
session.install(
".[faker,jwt,parquet,s3,testing]",
"-c",
"requirements/requirements.txt",
)
session.install("-r", "requirements/requirements.typing.txt")
session.run("mypy", *args)
if not session.posargs:
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
Expand All @@ -65,8 +65,8 @@ def tests(session: nox.Session) -> None:
"s3",
]

session.install(f".[{','.join(extras)}]")
session.install(*test_dependencies)
session.install(f".[{','.join(extras)}]", "-c", "requirements/requirements.txt")
session.install("-r", "requirements/requirements.test.txt")

env = {"COVERAGE_CORE": "sysmon"} if session.python == "3.12" else {}

Expand All @@ -90,8 +90,8 @@ def tests(session: nox.Session) -> None:
@nox.session(python=main_python_version)
def benches(session: nox.Session) -> None:
"""Run benchmarks."""
session.install(".[jwt,s3]")
session.install(*test_dependencies)
session.install(".[jwt,s3]", "-c", "requirements/requirements.txt")
session.install("-r", "requirements/requirements.test.txt")
session.run(
"pytest",
"--benchmark-only",
Expand All @@ -103,7 +103,11 @@ def benches(session: nox.Session) -> None:
@nox.session(name="deps", python=main_python_version)
def dependencies(session: nox.Session) -> None:
"""Check issues with dependencies."""
session.install(".[faker,jwt,parquet,s3,ssh,testing]")
session.install(
".[faker,jwt,parquet,s3,ssh,testing]",
"-c",
"requirements/requirements.txt",
)
session.install("deptry")
session.run("deptry", "singer_sdk", *session.posargs)

Expand All @@ -113,8 +117,8 @@ def update_snapshots(session: nox.Session) -> None:
"""Update pytest snapshots."""
args = session.posargs or ["-m", "snapshot"]

session.install(".[faker,jwt,parquet]")
session.install(*test_dependencies)
session.install(".[faker,jwt,parquet]", "-c", "requirements/requirements.txt")
session.install("-r", "requirements/requirements.test.txt")
session.run("pytest", "--snapshot-update", *args)


Expand All @@ -128,7 +132,7 @@ def doctest(session: nox.Session) -> None:
if "FORCE_COLOR" in os.environ:
args.append("--xdoctest-colored=1")

session.install(".")
session.install(".", "-c", "requirements/requirements.txt")
session.install("pytest", "xdoctest[colors]")
session.run("pytest", "--xdoctest", *args)

Expand All @@ -153,8 +157,8 @@ def docs(session: nox.Session) -> None:
if not session.posargs and "FORCE_COLOR" in os.environ:
args.insert(0, "--color")

session.install(".")
session.install("-r", "docs/requirements.txt")
session.install(".", "-c", "requirements/requirements.txt")
session.install("-r", "requirements/requirements.docs.txt")

build_dir = Path("build")
if build_dir.exists():
Expand All @@ -176,8 +180,8 @@ def docs_serve(session: nox.Session) -> None:
"build",
"-W",
]
session.install(".")
session.install("-r", "docs/requirements.txt", "sphinx-autobuild")
session.install(".", "-c", "requirements/requirements.txt")
session.install("-r", "requirements/requirements.docs.txt", "sphinx-autobuild")

build_dir = Path("build")
if build_dir.exists():
Expand Down
27 changes: 16 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,27 @@ Documentation = "https://sdk.meltano.com/en/latest/"
[dependency-groups]
dev = [
{"include-group" = "docs"},
{"include-group" = "testing"},
{"include-group" = "typing"},
"coverage[toml]>=7.4",
"deptry>=0.15.0",
]
docs = [
"furo>=2024.5.6",
"myst-parser>=3",
"pytest>=7.2.1",
"sphinx>=7",
"sphinx-copybutton>=0.5.2",
"sphinx-inline-tabs>=2023.4.21",
"sphinx-notfound-page>=1.0.0",
"sphinx-reredirects>=0.1.5",
]
testing = [
"coverage[toml]>=7.4",
"duckdb>=0.8.0",
"duckdb-engine>=0.9.4; python_version<'4'",
"fastjsonschema>=2.19.1",
"moto>=5.0.14",
"pytest>=7.2.1",
"pytest-benchmark>=4.0.0",
"pytest-snapshot>=0.9.0",
"pytest-subtests>=0.13.1",
Expand All @@ -121,16 +135,6 @@ dev = [
"time-machine>=2.10.0",
"xdoctest>=1.1.1",
]
docs = [
"furo>=2024.5.6",
"myst-parser>=3",
"pytest>=7.2.1",
"sphinx>=7",
"sphinx-copybutton>=0.5.2",
"sphinx-inline-tabs>=2023.4.21",
"sphinx-notfound-page>=1.0.0",
"sphinx-reredirects>=0.1.5",
]
typing = [
"mypy>=1.9",
"types-jsonschema>=4.17.0.6",
Expand All @@ -140,6 +144,7 @@ typing = [
"types-PyYAML>=6.0.12",
]
benchmark = [
{"include-group" = "testing"},
"pytest-codspeed>=2.2.0",
]

Expand Down
59 changes: 59 additions & 0 deletions requirements/requirements.codspeed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This file was autogenerated by uv via the following command:
# uv export --no-emit-project --frozen --no-hashes --all-extras --only-group benchmark --output-file requirements/requirements.codspeed.txt
attrs==25.1.0
boto3==1.36.3
botocore==1.36.3
cattrs==24.1.2
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
colorama==0.4.6 ; sys_platform == 'win32'
coverage==7.6.12
cryptography==44.0.1
duckdb==1.2.0
duckdb-engine==0.15.0 ; python_full_version < '4'
exceptiongroup==1.2.2 ; python_full_version < '3.11'
fastjsonschema==2.21.1
greenlet==3.1.1 ; (python_full_version < '3.14' and platform_machine == 'AMD64') or (python_full_version < '3.14' and platform_machine == 'WIN32') or (python_full_version < '3.14' and platform_machine == 'aarch64') or (python_full_version < '3.14' and platform_machine == 'amd64') or (python_full_version < '3.14' and platform_machine == 'ppc64le') or (python_full_version < '3.14' and platform_machine == 'win32') or (python_full_version < '3.14' and platform_machine == 'x86_64')
idna==3.10
importlib-metadata==8.6.1 ; python_full_version < '3.10'
iniconfig==2.0.0
jinja2==3.1.5
jmespath==1.0.1
markdown-it-py==3.0.0
markupsafe==3.0.2
mdurl==0.1.2
moto==5.0.28
packaging==24.2
platformdirs==4.3.6
pluggy==1.5.0
py-cpuinfo==9.0.0
pycparser==2.22
pygments==2.19.1
pytest==8.3.4
pytest-benchmark==5.1.0
pytest-codspeed==3.2.0
pytest-snapshot==0.9.0
pytest-subtests==0.14.1
python-dateutil==2.9.0.post0
pytz==2025.1
pyyaml==6.0.2
requests==2.32.3
requests-cache==1.2.1
requests-mock==1.12.1
responses==0.25.6
rfc3339-validator==0.1.4
rich==13.9.4
s3transfer==0.11.2
six==1.17.0
sqlalchemy==2.0.38 ; python_full_version < '4'
time-machine==2.16.0
tomli==2.2.1 ; python_full_version <= '3.11'
typing-extensions==4.12.2 ; python_full_version < '4'
url-normalize==1.4.3
urllib3==1.26.20 ; python_full_version < '3.10'
urllib3==2.3.0 ; python_full_version >= '3.10'
werkzeug==3.1.3
xdoctest==1.2.0
xmltodict==0.14.2
zipp==3.21.0 ; python_full_version < '3.10'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv export --no-emit-project --frozen --no-dev --group docs --output-file=docs/requirements.txt
# uv export --no-emit-project --frozen --no-dev --group docs --output-file requirements/requirements.docs.txt
alabaster==0.7.16 ; python_full_version < '3.10' \
--hash=sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65 \
--hash=sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92
Expand Down
Loading

0 comments on commit fb65350

Please sign in to comment.