Skip to content

Commit 7945a16

Browse files
authored
Copier update (lint config) (#53)
Pull in upstream changes and also update nginx config to use variable
1 parent 64c886a commit 7945a16

15 files changed

+94
-36
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.0.56
2+
_commit: v0.0.57
33
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
44
description: A web app that is hosted within a local intranet. Nuxt frontend, python
55
backend, docker-compose

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@
6161
"initializeCommand": "sh .devcontainer/initialize-command.sh",
6262
"onCreateCommand": "sh .devcontainer/on-create-command.sh",
6363
"postStartCommand": "sh .devcontainer/post-start-command.sh"
64-
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): b4089c49 # spellchecker:disable-line
64+
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): afe5e8f8 # spellchecker:disable-line
6565
}

.devcontainer/install-ci-tooling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pathlib import Path
99

1010
UV_VERSION = "0.7.12"
11-
PNPM_VERSION = "10.12.4"
11+
PNPM_VERSION = "10.13.1"
1212
COPIER_VERSION = "9.7.1"
1313
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
1414
PRE_COMMIT_VERSION = "4.2.0"

.pre-commit-config.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242

4343
# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
4444
- repo: https://github.com/crate-ci/typos
45-
rev: 0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # frozen: v1.32.0
45+
rev: 392b78fe18a52790c53f42456e46124f77346842 # frozen: v1.34.0
4646
hooks:
4747
- id: typos
4848
exclude:
@@ -84,17 +84,21 @@ repos:
8484
.*devcontainer.json|
8585
.*pyrightconfig.json|
8686
.*tsconfig.json|
87+
.*biome.jsonc|
8788
.*/vendor_files/.*|
8889
)$
8990
args: [--autofix, --no-sort-keys]
9091

9192
- repo: https://github.com/biomejs/pre-commit
92-
rev: 748e40d32e076a6aaaf3353a2564c8fe43764f79 # frozen: v2.0.0-beta.1
93+
rev: a450e9c04887b1305951c298db5999cd30155f74 # frozen: v2.1.1
9394
hooks:
9495
- id: biome-check
96+
# exclude generated files from codegen and strawberry
9597
exclude: |
9698
(?x)^(
9799
.*generated/graphql.ts|
100+
.*/schema.graphql|
101+
.*pyrightconfig\.json|
98102
)$
99103
100104
- repo: https://github.com/pre-commit/mirrors-prettier # TODO: switch to a different approach...this was archived in 2024
@@ -109,13 +113,17 @@ repos:
109113
.*devcontainer.json|
110114
.*pyrightconfig.json|
111115
.*tsconfig.json|
116+
.*/__snapshots__/.*|
112117
.*.min.js|
113118
.*.min.css|
114119
.*.umd.js|
115120
.*.yaml|
116121
.*.yml|
117122
.*.md|
123+
.*.jsonc|
118124
.*/vendor_files/.*|
125+
.*/schema.graphql|
126+
.*generated/graphql.ts|
119127
)$
120128
files: (.*.json)|(.*.ts)|(.*.jsx)|(.*.tsx)|(.*.yaml)|(.*.yml)|(.*.md)|(.*.html)|(.*.css)|(.*.scss)|(.*.less)|(.*.vue)|(.*.graphql)|(.*.gql)
121129

@@ -214,7 +222,7 @@ repos:
214222
description: Runs hadolint to lint Dockerfiles
215223

216224
- repo: https://github.com/astral-sh/ruff-pre-commit
217-
rev: 24e02b24b8ab2b7c76225602d13fa60e12d114e6 # frozen: v0.11.9
225+
rev: 3d44372123ca5e8617fdb65d9f11facd159b9e95 # frozen: v0.12.3
218226
hooks:
219227
- id: ruff
220228
name: ruff-src

biome.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

biome.jsonc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"formatter": {
3+
"enabled": false,
4+
},
5+
"linter": {
6+
"enabled": false,
7+
},
8+
"files": {
9+
"includes": [
10+
"**",
11+
"!template/template/biome.jsonc",
12+
"!template/biome.jsonc",
13+
"!**/*.css", // still too many false positives, so we exclude CSS files
14+
],
15+
},
16+
}

extensions/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class ContextUpdater(ContextHook):
1111
@override
1212
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
1313
context["uv_version"] = "0.7.12"
14-
context["pnpm_version"] = "10.12.4"
14+
context["pnpm_version"] = "10.13.1"
1515
context["pre_commit_version"] = "4.2.0"
16-
context["pyright_version"] = "1.1.402"
16+
context["pyright_version"] = "1.1.403"
1717
context["pytest_version"] = "8.4.0"
1818
context["pytest_randomly_version"] = "3.16.0"
1919
context["pytest_cov_version"] = "6.2.1"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies = [
99
"pytest>=8.4.0",
1010
"pytest-cov>=6.2.1",
1111
"pytest-randomly>=3.16.0",
12-
"pyright[nodejs]>=1.1.402",
12+
"pyright[nodejs]>=1.1.403",
1313
"copier>=9.7.1",
1414
"copier-templates-extensions>=0.3.1"
1515

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ ignore = [
6161
"TD002", # Adding author names to TODOs erodes shared ownership of codebase. Git history provides information about who originally created the TODO if that information is vitally needed
6262
"TD003", # Up to the author's judgement whether a TODO requires a link to an issue or not
6363
"TID252", # Sometimes it makes sense to use relative imports, that's a judgement call for us, not ruff
64+
"TC006", # Adding quotes around classes unnecessarily confuses the IDE for automatic refactoring
6465
]
6566

6667
# Allow fix for all enabled rules (when `--fix`) is provided.

template/.pre-commit-config.yaml.jinja

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,25 @@ repos:
4141

4242
# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
4343
- repo: https://github.com/crate-ci/typos
44-
rev: 2300ad1b6b5c37da54bcafb1a06211196503eac9 # frozen: v1
44+
rev: 392b78fe18a52790c53f42456e46124f77346842 # frozen: v1.34.0
4545
hooks:
4646
- id: typos
47+
exclude:
48+
|
49+
(?x)^(
50+
.*\.min.js|
51+
.*\.min.css|
52+
.*\.umd.js|
53+
)$
4754
- repo: https://github.com/pre-commit/pre-commit-hooks
4855
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
4956
hooks:
5057
- id: trailing-whitespace
58+
exclude:
59+
|
60+
(?x)^(
61+
.*/vendor_files/.*|
62+
)$
5163
- id: end-of-file-fixer
5264
# the XML formatter hook doesn't leave a blank line at the end, so excluding XML files from this hook to avoid conflicts
5365
exclude:
@@ -71,18 +83,21 @@ repos:
7183
.*devcontainer.json|
7284
.*pyrightconfig.json|
7385
.*tsconfig.json|
86+
.*biome.jsonc|
87+
.*/vendor_files/.*|
7488
)$
7589
args: [--autofix, --no-sort-keys]
7690

7791
- repo: https://github.com/biomejs/pre-commit
78-
rev: 748e40d32e076a6aaaf3353a2564c8fe43764f79 # frozen: v2.0.0-beta.1
92+
rev: a450e9c04887b1305951c298db5999cd30155f74 # frozen: v2.1.1
7993
hooks:
8094
- id: biome-check
8195
# exclude generated files from codegen and strawberry
8296
exclude: |
8397
(?x)^(
8498
.*generated/graphql.ts|
8599
.*/schema.graphql|
100+
pyrightconfig\.json|
86101
)$
87102

88103
- repo: https://github.com/pre-commit/mirrors-prettier # TODO: switch to a different approach...this was archived in 2024
@@ -97,18 +112,22 @@ repos:
97112
.*devcontainer.json|
98113
.*pyrightconfig.json|
99114
.*tsconfig.json|
115+
.*/__snapshots__/.*|
100116
.*.min.js|
101117
.*.min.css|
102118
.*.umd.js|
103119
.*.yaml|
104120
.*.yml|
105121
.*.md|
122+
.*/vendor_files/.*|
106123
.*/schema.graphql|
124+
.*generated/graphql.ts|
107125
)$
126+
files: (.*.json)|(.*.ts)|(.*.jsx)|(.*.tsx)|(.*.yaml)|(.*.yml)|(.*.md)|(.*.html)|(.*.css)|(.*.scss)|(.*.less)|(.*.vue)|(.*.graphql)|(.*.gql)
108127

109128
- repo: https://github.com/myint/docformatter
110129
# black seems to be working on formatting docstrings, but use this for now
111-
rev: eb1df347edd128b30cd3368dddc3aa65edcfac38 # tip of main that is compatible with pre-commit v4
130+
rev: e73b8ba0c1316be565983236c72e653ad44e6b66 # frozen: v1.7.7
112131
hooks:
113132
- id: docformatter
114133
exclude: (tests*)|(exceptions\.py)|(warnings\.py)
@@ -145,7 +164,13 @@ repos:
145164
.*tsconfig.json|
146165
)$
147166
- id: check-yaml
148-
exclude: .copier-answers.yml # This is an autogenerated YAML file by Copier that throws 'found unhashable key' errors
167+
# .copier-answers.yml is an autogenerated YAML file by Copier that throws 'found unhashable key' errors
168+
# Helm charts contain other non-YAML markers that cause errors here. they should be checked with helm-lint instead
169+
exclude: |
170+
(?x)^(
171+
.copier-answers.yml|
172+
(.*/helm/.*)|
173+
)$
149174
- id: check-xml
150175
- id: check-merge-conflict
151176
- id: check-case-conflict
@@ -219,10 +244,11 @@ repos:
219244
hooks:
220245
- id: hadolint-docker
221246
name: Lint Dockerfiles
247+
exclude: .*\.jinja$
222248
description: Runs hadolint to lint Dockerfiles
223249

224250
- repo: https://github.com/astral-sh/ruff-pre-commit
225-
rev: e84319e627902e1b348574ecf3238dc511933dc7 # frozen: v0.11.7
251+
rev: 3d44372123ca5e8617fdb65d9f11facd159b9e95 # frozen: v0.12.3
226252
hooks:
227253
- id: ruff
228254
name: ruff-src
@@ -235,7 +261,7 @@ repos:
235261
- id: ruff-format{% endraw %}{% if has_backend %}{% raw %}
236262

237263
- repo: https://github.com/pylint-dev/pylint
238-
rev: 7ac5a4d4f77576df3a00e63f86ca86e0e1780b47 # frozen: v3.3.6
264+
rev: f798a4a3508bcbb8ad0773ae14bf32d28dcfdcbe # frozen: v3.3.7
239265
hooks:
240266
- id: pylint
241267
name: pylint

0 commit comments

Comments
 (0)