Skip to content

Commit 504f90c

Browse files
authored
Format quilt3 (#4541)
1 parent 59a29f0 commit 504f90c

40 files changed

+1431
-1144
lines changed

.github/workflows/py-ci.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,44 @@ on:
99
env:
1010
UV_LOCKED: 1
1111
jobs:
12-
# Lint the entire Python codebase (except catalog/ and api/python/)
13-
lint-root:
12+
lint-quilt3:
1413
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: api/python
1517
steps:
1618
- uses: actions/checkout@v5
1719
- uses: astral-sh/setup-uv@v6
18-
- name: Run Ruff linter on entire codebase
19-
run: uvx [email protected] check . --exclude catalog/ --exclude api/python/
20+
- name: Lint
21+
run: uv run poe lint
2022

21-
lint:
23+
format-quilt3:
2224
runs-on: ubuntu-latest
2325
defaults:
2426
run:
2527
working-directory: api/python
2628
steps:
2729
- uses: actions/checkout@v5
2830
- uses: astral-sh/setup-uv@v6
29-
- name: Lint
30-
run: uv run poe lint
31+
- name: Check formatting (quilt3)
32+
run: uv run poe fmt --check
33+
34+
lint-rest:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v5
38+
- uses: astral-sh/setup-uv@v6
39+
- name: Run Ruff linter on entire codebase
40+
run: uvx [email protected] check . --exclude catalog/ --exclude api/python/
3141

32-
# Formatting check disabled until codebase is reformatted
33-
# format:
42+
# Enable once the rest of the codebase is formatted
43+
# format-rest:
3444
# runs-on: ubuntu-latest
35-
# defaults:
36-
# run:
37-
# working-directory: api/python
3845
# steps:
3946
# - uses: actions/checkout@v5
4047
# - uses: astral-sh/setup-uv@v6
41-
# - name: Check formatting
42-
# run: uv run poe fmt --check
48+
# - name: Check formatting (rest of codebase)
49+
# run: uvx [email protected] format --check --exclude catalog/ --exclude api/python/
4350

4451
test-gendocs:
4552
runs-on: ubuntu-latest

api/python/pyproject.toml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ conflicts = [
8888
[tool.ruff]
8989
# Extends from root configuration
9090
extend = "../../ruff.toml"
91-
# Exclude auto-generated files specific to quilt3
92-
extend-exclude = [
93-
"quilt3/admin/_graphql_client",
94-
]
9591

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

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

115+
_gql-gen.cmd = "uv run ariadne-codegen client"
116+
_gql-gen.cwd = "quilt3-admin"
117+
118+
_gql-fmt.cmd = "ruff format quilt3/admin/_graphql_client"
119+
119120
gql-gen.help = "Generate GraphQL client code for quilt3.admin"
120-
gql-gen.deps = ["_gql-clean"]
121-
gql-gen.cmd = "uv run ariadne-codegen client"
122-
gql-gen.cwd = "quilt3-admin"
121+
gql-gen.sequence = [
122+
"_gql-clean",
123+
"_gql-gen",
124+
"_gql-fmt",
125+
]
123126

124127
gql-check.help = "Check if GraphQL client code is up-to-date"
125128
gql-check.sequence = [

api/python/quilt3-admin/base_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# https://github.com/mirumee/ariadne-codegen/blob/5bfd63c5e7e3a8cc5293eb94deee638b7adab98d/ariadne_codegen/client_generators/dependencies/base_client.py
33
# modified to use our requests session instead of httpx.
44
# pylint: disable=relative-beyond-top-level
5+
# fmt: off
56
import json
67
from typing import IO, Any, Dict, List, Optional, Tuple, TypeVar, cast
78

api/python/quilt3/admin/_graphql_client/base_client.py

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/python/quilt3/admin/_graphql_client/bucket_tabulator_table_rename.py

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/python/quilt3/admin/_graphql_client/bucket_tabulator_table_set.py

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/python/quilt3/admin/_graphql_client/bucket_tabulator_tables_list.py

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)