Skip to content

Commit 2d34d4f

Browse files
authored
Merge branch 'main' into feature/ty
2 parents 0ff42cd + f4ad664 commit 2d34d4f

File tree

20 files changed

+345
-32
lines changed

20 files changed

+345
-32
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"extensions": [
1515
"astral-sh.ty",
1616
"charliermarsh.ruff",
17+
"dorzey.vscode-sqlfluff",
1718
"exiasr.hadolint",
1819
"kevinrose.vsc-python-indent",
1920
"mosapride.zenkaku",

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ pytest-coverage.txt
182182
.coveragerc
183183
.env.local
184184
.pre-commit-config.yaml
185+
.sqlfluff
185186
assets
186187
LICENSE
187188
noxfile.py

.github/workflows/format.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
- ".github/actions/setup-python-with-uv/action.yml"
77
- ".github/workflows/format.yml"
88
- "**.py"
9+
- "**.sql"
910
- ".python-version"
11+
- ".sqlfluff"
1012
- "pyproject.toml"
1113
- "ruff.toml"
1214
- "uv.lock"
@@ -23,4 +25,17 @@ jobs:
2325
uses: ./.github/actions/setup-python-with-uv
2426

2527
- name: Format by Ruff
26-
run: uv run nox -s fmt
28+
run: uv run nox -s fmt -- --ruff
29+
30+
sqlfluff:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v6
36+
37+
- name: Setup Python with uv
38+
uses: ./.github/actions/setup-python-with-uv
39+
40+
- name: Format by SQLFluff
41+
run: uv run nox -s fmt -- --sqlfluff

.github/workflows/lint.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
- ".github/actions/setup-python-with-uv/action.yml"
77
- ".github/workflows/lint.yml"
88
- "**.py"
9+
- "**.sql"
910
- ".python-version"
11+
- ".sqlfluff"
1012
- "pyproject.toml"
1113
- "ruff.toml"
1214
- "ty.toml"
@@ -26,6 +28,19 @@ jobs:
2628
- name: Lint by Ruff
2729
run: uv run nox -s lint -- --ruff
2830

31+
sqlfluff:
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v6
37+
38+
- name: Setup Python with uv
39+
uses: ./.github/actions/setup-python-with-uv
40+
41+
- name: Lint by SQLFluff
42+
run: uv run nox -s lint -- --sqlfluff
43+
2944
ty:
3045
runs-on: ubuntu-latest
3146

@@ -37,4 +52,4 @@ jobs:
3752
uses: ./.github/actions/setup-python-with-uv
3853

3954
- name: Lint by ty
40-
run: uv run nox -s lint -- --ty
55+
run: uv run nox -s lint -- --ty

.github/workflows/publish-app.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ jobs:
4949
type=sha,prefix={{branch}}-
5050
type=raw,value=latest,enable={{is_default_branch}}
5151
labels: |
52-
maintainer=a5chin <a5chin.origin+contact@gmain.com>
52+
maintainer=a5chin <a5chin.origin+contact@gmail.com>
5353
org.opencontainers.image.url=https://github.com/${{ github.repository }}
5454
org.opencontainers.image.source=https://github.com/${{ github.repository }}
55-
org.opencontainers.image.vendor=a5chin <a5chin.origin+contact@gmain.com>
55+
org.opencontainers.image.vendor=a5chin <a5chin.origin+contact@gmail.com>
5656
org.opencontainers.image.title=python-uv
5757
org.opencontainers.image.description=App for Python development with uv-based dependency management and environment configuration.
5858
org.opencontainers.image.documentation=https://a5chin.github.io/python-uv/
59-
org.opencontainers.image.authors=a5chin <a5chin.origin+contact@gmain.com>
59+
org.opencontainers.image.authors=a5chin <a5chin.origin+contact@gmail.com>
6060
org.opencontainers.image.licenses=MIT
6161
6262
- name: Build and Push App Image

.github/workflows/publish-devcontainer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ jobs:
4949
type=sha,prefix={{branch}}-
5050
type=raw,value=latest,enable={{is_default_branch}}
5151
labels: |
52-
maintainer=a5chin <a5chin.origin+contact@gmain.com>
52+
maintainer=a5chin <a5chin.origin+contact@gmail.com>
5353
org.opencontainers.image.url=https://github.com/${{ github.repository }}
5454
org.opencontainers.image.source=https://github.com/${{ github.repository }}
55-
org.opencontainers.image.vendor=a5chin <a5chin.origin+contact@gmain.com>
55+
org.opencontainers.image.vendor=a5chin <a5chin.origin+contact@gmail.com>
5656
org.opencontainers.image.title=python-uv
5757
org.opencontainers.image.description=Dev Container for Python development with uv-based dependency management and environment configuration.
5858
org.opencontainers.image.documentation=https://a5chin.github.io/python-uv/
59-
org.opencontainers.image.authors=a5chin <a5chin.origin+contact@gmain.com>
59+
org.opencontainers.image.authors=a5chin <a5chin.origin+contact@gmail.com>
6060
org.opencontainers.image.licenses=MIT
6161
6262
- name: Build and Push Devcontainer Image

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,18 @@ repos:
6262
types: ["dockerfile"]
6363
entry: hadolint
6464

65+
- repo: https://github.com/sqlfluff/sqlfluff
66+
rev: 3.5.0
67+
hooks:
68+
- id: sqlfluff-lint
69+
name: SQLFluff Lint
70+
description: "Lints sql files with `SQLFluff`"
71+
types: [sql]
72+
73+
- id: sqlfluff-fix
74+
name: SQLFluff Fix
75+
description: "Fixes sql lint errors with `SQLFluff`"
76+
types: [sql]
77+
6578
ci:
6679
autoupdate_schedule: weekly

.sqlfluff

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[sqlfluff]
2+
dialect = bigquery
3+
max_line_length = 80
4+
5+
exclude_rules =
6+
7+
[sqlfluff:indentation]
8+
tab_space_size = 2
9+
10+
[sqlfluff:rules:ambiguous.join]
11+
fully_qualify_join_types = both
12+
13+
[sqlfluff:rules:structure.unused_join]
14+
forbid_unused_join = True

.vscode/cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@
9797
"spyderproject",
9898
"spyproject",
9999
"sqlalchemy",
100+
"sqlfluff",
100101
"stmts",
101102
"superfences",
102103
"tamasfe",
104+
"templater",
103105
"testpaths",
104106
"timemachine",
105107
"toolsai",

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"astral-sh.ty",
44
"charliermarsh.ruff",
55
"codezombiech.gitignore",
6+
"dorzey.vscode-sqlfluff",
67
"eamodio.gitlens",
78
"exiasr.hadolint",
89
"kevinrose.vsc-python-indent",

0 commit comments

Comments
 (0)