Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ jobs:
pip install -e .[tests]
- name: Lint with pyink
run: |
echo "Lint check temporarily disabled"
# pyink --check .
pyink --check .
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/google/pyink
rev: v24.4.0
hooks:
- id: pyink
types_or: [python, pyi]
24 changes: 24 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ pixi run -e docs docs-check
`docs-build` builds the HTML docs, while `docs-check` runs a stricter Sphinx
build with warnings treated as errors.

### Code style & formatting

We use `pyink` to format Python code, enforcing a 2-space indentation style to
match Google standards. To automate this and ensure your changes pass CI lint
checks:

1. **Install pre-commit** (if not already installed):
```bash
pip install pre-commit
```
2. **Install the git hooks** in the repository:
```bash
pre-commit install
```

Once installed, `pyink` will automatically run on and format any files you
modify whenever you run `git commit`.

If you prefer to run it manually without committing, you can use:
```bash
pixi run -e tests pyink --check .
```
(Or specify individual files to check instead of `.`).

### Running tests

The Xee integration tests only pass on Xee branches (no forks). Please run the
Expand Down
Loading