Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions .github/workflows/py-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,44 @@ on:
env:
UV_LOCKED: 1
jobs:
# Lint the entire Python codebase (except catalog/ and api/python/)
lint-root:
lint-quilt3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api/python
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Run Ruff linter on entire codebase
run: uvx [email protected] check . --exclude catalog/ --exclude api/python/
- name: Lint
run: uv run poe lint

lint:
format-quilt3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api/python
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Lint
run: uv run poe lint
- name: Check formatting (quilt3)
run: uv run poe fmt --check

lint-rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Run Ruff linter on entire codebase
run: uvx [email protected] check . --exclude catalog/ --exclude api/python/

# Formatting check disabled until codebase is reformatted
# format:
# Enable once the rest of the codebase is formatted
# format-rest:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: api/python
# steps:
# - uses: actions/checkout@v5
# - uses: astral-sh/setup-uv@v6
# - name: Check formatting
# run: uv run poe fmt --check
# - name: Check formatting (rest of codebase)
# run: uvx [email protected] format --check --exclude catalog/ --exclude api/python/

test-gendocs:
runs-on: ubuntu-latest
Expand Down
17 changes: 10 additions & 7 deletions api/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ conflicts = [
[tool.ruff]
# Extends from root configuration
extend = "../../ruff.toml"
# Exclude auto-generated files specific to quilt3
extend-exclude = [
"quilt3/admin/_graphql_client",
]

[tool.poe.tasks]
_ensure-clean.cmd = "git diff --exit-code"
Expand All @@ -116,10 +112,17 @@ clean.shell = "rm -rf build dist *.egg-info .pytest_cache .coverage* coverage.*

_gql-clean.shell = "rm -rf quilt3/admin/_graphql_client"

_gql-gen.cmd = "uv run ariadne-codegen client"
_gql-gen.cwd = "quilt3-admin"

_gql-fmt.cmd = "ruff format quilt3/admin/_graphql_client"

gql-gen.help = "Generate GraphQL client code for quilt3.admin"
gql-gen.deps = ["_gql-clean"]
gql-gen.cmd = "uv run ariadne-codegen client"
gql-gen.cwd = "quilt3-admin"
gql-gen.sequence = [
"_gql-clean",
"_gql-gen",
"_gql-fmt",
]

gql-check.help = "Check if GraphQL client code is up-to-date"
gql-check.sequence = [
Expand Down
1 change: 1 addition & 0 deletions api/python/quilt3-admin/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://github.com/mirumee/ariadne-codegen/blob/5bfd63c5e7e3a8cc5293eb94deee638b7adab98d/ariadne_codegen/client_generators/dependencies/base_client.py
# modified to use our requests session instead of httpx.
# pylint: disable=relative-beyond-top-level
# fmt: off
import json
from typing import IO, Any, Dict, List, Optional, Tuple, TypeVar, cast

Expand Down
1 change: 1 addition & 0 deletions api/python/quilt3/admin/_graphql_client/base_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading