Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in uv.lock and update workflows #416

Merged
merged 11 commits into from
Dec 25, 2024
4 changes: 2 additions & 2 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
PYTHON_VERSION: "3.12"
UV_VERSION: "0.4.x"
UV_VERSION: "0.5.x"

jobs:
bump-version:
Expand All @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ on:

env:
PYTHON_VERSION: "3.12"
UV_VERSION: "0.4.x"
UV_VERSION: "0.5.x"
UV_FROZEN: "1"
UV_NO_SYNC: "1"

concurrency:
group: "deploy-docs"
Expand All @@ -31,7 +33,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -41,7 +43,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install the project
run: uv sync
run: uv sync --no-dev --group docs

- name: Set up Git
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:

env:
PYTHON_VERSION: "3.12"
UV_VERSION: "0.4.x"
UV_VERSION: "0.5.x"
UV_FROZEN: "1"
UV_NO_SYNC: "1"

jobs:
create-tag:
Expand All @@ -20,7 +22,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand Down Expand Up @@ -52,7 +54,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand Down Expand Up @@ -101,7 +103,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -111,7 +113,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install the project
run: uv sync
run: uv sync --no-dev --group docs

- name: Set up Git
run: |
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ concurrency:

env:
PYTHON_VERSION: "3.12"
UV_VERSION: "0.4.x"
UV_VERSION: "0.5.x"
UV_FROZEN: "1"
UV_NO_SYNC: "1"

jobs:
ruff:
Expand Down Expand Up @@ -40,7 +42,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -49,7 +51,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install the project
run: uv sync
run: uv sync --no-dev --group typing

- name: Run mypy
run: uv run -- mypy .
Expand All @@ -61,7 +63,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -70,7 +72,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install the project
run: uv sync
run: uv sync --no-dev --group docs

- name: Build docs
run: uv run -- mkdocs build
Expand Down Expand Up @@ -99,7 +101,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -109,7 +111,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install the project
run: uv sync
run: uv sync --no-dev --group testing

- name: Run pytest
run: uv run -- coverage run --source=./capsula -m pytest ./tests --import-mode importlib
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ poetry.lock
.pdm.toml

# uv
uv.lock
# uv.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ repos:
- id: fix-byte-order-marker
- id: forbid-submodules
- id: no-commit-to-branch

- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.5.8
hooks:
- id: uv-lock
16 changes: 12 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,21 @@ dev = [
"pre-commit==4.0.1",
{ include-group = "lint" },
{ include-group = "typing" },
{ include-group = "test" },
{ include-group = "testing" },
{ include-group = "docs" },
{ include-group = "examples" },
{ include-group = "scripts" },
]

lint = ["ruff==0.8.4", "deptry==0.21.1"]
typing = ["mypy==1.14.0"]
test = ["pytest==8.3.4", "coverage==7.6.9", "genbadge[coverage]==1.1.1"]
typing = [
"mypy==1.14.0",
"pytest",
"mkdocs-gen-files",
{ include-group = "examples" },
{ include-group = "scripts" },
]
testing = ["pytest==8.3.4", "coverage==7.6.9", "genbadge[coverage]==1.1.1"]
docs = [
"mkdocs-material==9.5.49",
"mkdocstrings[python]==0.27.0",
Expand All @@ -69,7 +76,8 @@ docs = [
"griffe-typingdoc==0.2.7",
"black==24.10.0",
]
examples = ["click==8.1.8", "rich==13.9.4", "tomlkit==0.13.2"]
examples = ["click==8.1.8", "rich==13.9.4"]
scripts = ["rich", "typer", "tomli; python_version<'3.11'", "tomlkit==0.13.2"]

[tool.coverage.report]
exclude_also = [
Expand Down
Loading
Loading