Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ py -m install -v -e .[dev]

# Post setup

You should prepare pre-commit, which will help you by checking that commits pass required checks:
You should prepare prek, which will help you by checking that commits pass required checks:

```bash
pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # Will install a pre-commit hook into the git repo
pip install prek # or brew install prek on macOS
prek install # Will install a prek hook into the git repo
```

You can also/alternatively run `pre-commit run` (changes only) or `pre-commit run --all-files` to check even without installing the hook.
You can also/alternatively run `prek run` (changes only) or `prek run --all-files` to check even without installing the hook.

# Testing

Expand Down Expand Up @@ -77,10 +77,10 @@ nox -s docs -- --serve

# Pre-commit

This project uses pre-commit for all style checking. While you can run it with nox, this is such an important tool that it deserves to be installed on its own. Install pre-commit and run:
This project uses prek for all style checking. While you can run it with nox, this is such an important tool that it deserves to be installed on its own. Install prek and run:

```bash
pre-commit run -a
prek run --all-files
```

to check all files.
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ result = jnp.sqrt(d) # Uses registered sqrt_p rule
uv run nox -s all
```
- Common sessions:
- `nox -s lint`: pre-commit + pylint
- `nox -s lint`: prek + pylint
- `nox -s test`: pytest suite
- `nox -s docs`: build documentation (add `--serve` to preview)
- `nox -s pytest_benchmark`: run CodSpeed benchmarks
Expand Down
2 changes: 1 addition & 1 deletion .github/skills/gitmoji-commit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Use [the full type reference](./references/types.md) to pick the most specific t
| ♻️ | `refactor` | Internal restructure, no behaviour change |
| ✅ | `test` | Add or update tests |
| 🧹 | `chore` | Miscellaneous maintenance |
| 🔧 | `config` | pyproject.toml, noxfile, pre-commit, config files |
| 🔧 | `config` | pyproject.toml, noxfile, prek, config files |
| 💚 | `ci` | GitHub Actions, CI workflows |
| 👷 | `build` | Build system changes |
| ⬆️ | `dep-bump` | Upgrade dependencies |
Expand Down
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
ci:
autoupdate_schedule: "monthly"
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"

default_stages: [pre-commit, pre-push]

repos:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a href="https://codecov.io/gh/GalacticDynamics/coordinax"> <img alt="codecov" src="https://codecov.io/gh/GalacticDynamics/coordinax/graph/badge.svg" /> </a>
<a href="https://scientific-python.org/specs/spec-0000/"> <img alt="ruff" src="https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038" /> </a>
<a href="https://docs.astral.sh/ruff/"> <img alt="ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" /> </a>
<a href="https://pre-commit.com"> <img alt="pre-commit" src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit" /> </a>
<a href="https://github.com/j178/prek"> <img alt="prek" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json" /> </a>
</p>

---
Expand Down Expand Up @@ -180,7 +180,7 @@ If you found this library to be useful in academic work, then please cite.

## Development

[![Actions Status][actions-badge]][actions-link] [![Documentation Status][rtd-badge]][rtd-link] [![codecov][codecov-badge]][codecov-link] [![SPEC 0 — Minimum Supported Dependencies][spec0-badge]][spec0-link] [![pre-commit][pre-commit-badge]][pre-commit-link] [![ruff][ruff-badge]][ruff-link]
[![Actions Status][actions-badge]][actions-link] [![Documentation Status][rtd-badge]][rtd-link] [![codecov][codecov-badge]][codecov-link] [![SPEC 0 — Minimum Supported Dependencies][spec0-badge]][spec0-link] [![prek][prek-badge]][prek-link] [![ruff][ruff-badge]][ruff-link]

We welcome contributions!

Expand All @@ -191,8 +191,8 @@ For the local development workflow, see `docs/dev.md`. For pull request expectat
[actions-link]: https://github.com/GalacticDynamics/coordinax/actions
[codecov-badge]: https://codecov.io/gh/GalacticDynamics/unxt/graph/badge.svg
[codecov-link]: https://codecov.io/gh/GalacticDynamics/unxt
[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
[pre-commit-link]: https://pre-commit.com
[prek-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json
[prek-link]: https://github.com/j178/prek
[pypi-link]: https://pypi.org/project/coordinax/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/coordinax
[pypi-version]: https://img.shields.io/pypi/v/coordinax
Expand Down
6 changes: 3 additions & 3 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cd coordinax
uv sync --group dev --extra workspace
```

This installs the local development toolchain, including `nox`, `pytest`, `pre-commit`, docs dependencies, and the workspace packages used by the full contributor workflow.
This installs the local development toolchain, including `nox`, `pytest`, `prek`, docs dependencies, and the workspace packages used by the full contributor workflow.

If you prefer to run tools without activating a shell environment, use `uv run ...` directly. For example:

Expand Down Expand Up @@ -78,13 +78,13 @@ The authoritative session definitions live in the repository root `noxfile.py`.
### Main Sessions

- `uv run nox -s all`: runs the default contributor gate: lint, test, and docs.
- `uv run nox -s lint`: runs `precommit`, `pylint`, and `ty`.
- `uv run nox -s lint`: runs `prek`, `pylint`, and `ty`.
- `uv run nox -s test`: runs the default test session.
- `uv run nox -s docs`: builds the documentation.

### Linting and Type Checks

- `uv run nox -s precommit`: runs all pre-commit hooks.
- `uv run nox -s precommit`: runs all prek/pre-commit hooks.
- `uv run nox -s "pylint(package='coordinax')"`: run Pylint for the main package.
- `uv run nox -s "pylint(package='api')"`: run Pylint for `coordinax.api`.
- `uv run nox -s "pylint(package='astro')"`: run Pylint for `coordinax.astro`.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def lint(s: nox.Session, /) -> None:
@session(uv_groups=["lint"], reuse_venv=True)
def precommit(s: nox.Session, /) -> None:
"""Run the linter."""
s.run("pre-commit", "run", "--all-files", *s.posargs)
s.run("prek", "run", "--all-files", *s.posargs)


@session(uv_groups=["lint"], reuse_venv=True)
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ docs = [
"sphinxext-rediraffe>=0.2.7",
]
ide = ["ipykernel>=7.1.0", "jaxmore>=0.2.0"]
lint = ["pre-commit>=4.5.0", "pylint>=3.3.2", "ty>=0.0.19"]
lint = ["prek>=0.4.0", "pylint>=3.3.2", "ty>=0.0.19"]
nox = ["nox>=2024.10.9", "nox-uv>=0.6.3"]
test = [
"coordinax.curveframes",
Expand Down Expand Up @@ -156,7 +156,12 @@ skip = ["uv.lock"]


[tool.repo-review]
ignore = ["PC140"] # ty is run via nox, not pre-commit
ignore = [
"PC140", # ty is run via prek, not pre-commit
"PC901", # custom autoupdate_commit_msg set in .pre-commit-config.yaml
"PC902", # custom autofix_commit_msg set in .pre-commit-config.yaml
"PC903", # autoupdate_schedule set in .pre-commit-config.yaml
Comment on lines +161 to +163
]


[tool.commitizen]
Expand Down
67 changes: 24 additions & 43 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading