Skip to content

Commit 8bafbd4

Browse files
authored
File formatting and fix contributing docs (#664)
1 parent bb527a2 commit 8bafbd4

14 files changed

Lines changed: 265 additions & 268 deletions

.github/copilot-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Bootstrap, build, and test the repository:
2424

2525
**Interactive Development Shell:**
2626

27-
- `hatch shell [ENV_NAME]` - Enter an interactive shell environment with all dependencies installed. ENV_NAME is optional and defaults to the main environment. Use `hatch shell functional` for the functional test environment, `hatch shell lint` for the linting environment, etc.
27+
- `hatch shell [ENV_NAME]` - Enter an interactive shell environment with all dependencies installed. ENV_NAME is optional and defaults to the main environment. Use `hatch shell functional` for the functional test environment.
2828

2929
Build documentation:
3030

@@ -101,14 +101,14 @@ Modern development process using Hatch:
101101
2. **Make your changes** to the codebase
102102
3. **Run unit tests**: `hatch test` (≈30s) **All must pass - failures are never expected or allowed.**
103103
4. **Run functional tests**: `hatch run functional:all -v` (≈10–15s)
104-
5. **Run linting**: `hatch run lint:check` (5 seconds)
104+
5. **Run linting**: `hatch fmt --check` (2 seconds)
105105
6. **Auto-format code**: `hatch fmt` (2 seconds)
106106
7. **Test documentation**: `hatch run docs:build` (2 seconds)
107107
8. **Update documentation** when making changes to Python source code (required)
108108
9. **Add changelog entry** for all significant changes (bug fixes, new features, breaking changes) to `CHANGELOG.md` under the "Unreleased" section.
109109
10. **Lint the changelog** by running `python scripts/validate_changelog.py` (or inside any hatch shell) to ensure format correctness
110110

111-
Always run `hatch run lint:check` before committing. The CI (.github/workflows/build.yml) includes comprehensive checks across all supported Python/Django combinations.
111+
Always run `hatch fmt --check` before committing. The CI (.github/workflows/ci.yml) includes comprehensive checks across all supported Python/Django combinations.
112112

113113
**IMPORTANT**: Documentation must be updated whenever changes are made to Python source code. This is enforced as part of the development workflow.
114114

@@ -226,7 +226,7 @@ Development dependencies (managed by hatch):
226226

227227
## CI/CD Pipeline
228228

229-
Modern GitHub Actions workflow (.github/workflows/build.yml):
229+
Modern GitHub Actions workflow (.github/workflows/ci.yml):
230230

231231
- **Lint Python**: Code quality checks (temporarily set to pass)
232232
- **Test Python**: Matrix testing across Python 3.9-3.13 with coverage

.pre-commit-config.yaml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
---
22
repos:
3-
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: "v5.0.0"
5-
hooks:
6-
- id: check-merge-conflict
7-
- id: end-of-file-fixer
8-
exclude: ^docs/[^/]*\.svg$
9-
- id: requirements-txt-fixer
10-
- id: trailing-whitespace
11-
types: [python]
12-
- id: check-case-conflict
13-
- id: check-json
14-
- id: check-xml
15-
- id: check-toml
16-
- id: check-xml
17-
- id: check-yaml
18-
- id: debug-statements
19-
- id: check-added-large-files
20-
- id: check-symlinks
21-
- id: debug-statements
22-
- id: detect-aws-credentials
23-
args: ["--allow-missing-credentials"]
24-
- id: detect-private-key
25-
exclude: ^examples|(?:tests/ssl)/
26-
- repo: https://github.com/hadialqattan/pycln
27-
rev: v2.5.0
28-
hooks:
29-
- id: pycln
30-
args: ["--all"]
31-
- repo: https://github.com/asottile/yesqa
32-
rev: v1.5.0
33-
hooks:
34-
- id: yesqa
35-
- repo: https://github.com/pycqa/isort
36-
rev: "6.0.1"
37-
hooks:
38-
- id: isort
39-
args: ["--profile", "black"]
40-
- repo: https://github.com/psf/black
41-
rev: "25.1.0"
42-
hooks:
43-
- id: black
44-
- repo: https://github.com/asottile/pyupgrade
45-
rev: "v3.20.0"
46-
hooks:
47-
- id: pyupgrade
48-
args: ["--py39-plus", "--keep-mock"]
49-
- repo: https://github.com/hhatto/autopep8
50-
rev: "v2.3.2"
51-
hooks:
52-
- id: autopep8
53-
- repo: https://github.com/PyCQA/flake8
54-
rev: "7.2.0"
55-
hooks:
56-
- id: flake8
57-
exclude: "^docs/"
58-
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
59-
rev: "v1.0.1"
60-
hooks:
61-
- id: rst-linter
62-
files: ^[^/]+[.]rst$
63-
- repo: https://github.com/adrienverge/yamllint
64-
rev: "v1.37.1"
65-
hooks:
66-
- id: yamllint
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: "v5.0.0"
5+
hooks:
6+
- id: check-merge-conflict
7+
- id: end-of-file-fixer
8+
exclude: ^docs/[^/]*\.svg$
9+
- id: requirements-txt-fixer
10+
- id: trailing-whitespace
11+
types: [python]
12+
- id: check-case-conflict
13+
- id: check-json
14+
- id: check-xml
15+
- id: check-toml
16+
- id: check-xml
17+
- id: check-yaml
18+
- id: debug-statements
19+
- id: check-added-large-files
20+
- id: check-symlinks
21+
- id: debug-statements
22+
- id: detect-aws-credentials
23+
args: ["--allow-missing-credentials"]
24+
- id: detect-private-key
25+
exclude: ^examples|(?:tests/ssl)/
26+
- repo: https://github.com/hadialqattan/pycln
27+
rev: v2.5.0
28+
hooks:
29+
- id: pycln
30+
args: ["--all"]
31+
- repo: https://github.com/asottile/yesqa
32+
rev: v1.5.0
33+
hooks:
34+
- id: yesqa
35+
- repo: https://github.com/pycqa/isort
36+
rev: "6.0.1"
37+
hooks:
38+
- id: isort
39+
args: ["--profile", "black"]
40+
- repo: https://github.com/psf/black
41+
rev: "25.1.0"
42+
hooks:
43+
- id: black
44+
- repo: https://github.com/asottile/pyupgrade
45+
rev: "v3.20.0"
46+
hooks:
47+
- id: pyupgrade
48+
args: ["--py39-plus", "--keep-mock"]
49+
- repo: https://github.com/hhatto/autopep8
50+
rev: "v2.3.2"
51+
hooks:
52+
- id: autopep8
53+
- repo: https://github.com/PyCQA/flake8
54+
rev: "7.2.0"
55+
hooks:
56+
- id: flake8
57+
exclude: "^docs/"
58+
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
59+
rev: "v1.0.1"
60+
hooks:
61+
- id: rst-linter
62+
files: ^[^/]+[.]rst$
63+
- repo: https://github.com/adrienverge/yamllint
64+
rev: "v1.37.1"
65+
hooks:
66+
- id: yamllint

0 commit comments

Comments
 (0)