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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 16ecf4e
_commit: 1.0.0
_src_path: gh:pdhall99/python-project-template
author_email: 20580126+pdhall99@users.noreply.github.com
author_name: PD Hall
Expand Down
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ updates:
patterns: ["*"]

# When this bumps ruff-pre-commit, bump ruff in pyproject.toml's check-code
# group to the same version in the same pull request.
# group to the same version in the same pull request: the ruff-version hook
# fails until you do.
- package-ecosystem: "pre-commit"
directory: "/"
schedule:
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ __marimo__/
# Streamlit
.streamlit/secrets.toml

src/rocheometry/_version.py

# Not covered above
.pyrefly_cache/
# macOS
.DS_Store

src/rocheometry/_version.py
23 changes: 18 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ default_language_version:
# Generated by docs/figures.py, and checked byte for byte by docs:check.
exclude: ^docs/site/recipes/figures/

# Remote hooks are pinned to commit SHAs, like the workflow's actions, with the
# version in a "frozen" comment. Dependabot updates both together.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
Expand All @@ -27,12 +29,12 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.31.2
rev: 02ef6d1c28994054a843e58604e1a343faa42987 # frozen: v2.31.2
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.6 # keep consistent with hatch config
rev: 9026c9127e153371d7a78dfcb0c45ae2046a3d10 # frozen: v0.17.6
hooks:
# Run the linter
- id: ruff-check
Expand All @@ -44,17 +46,28 @@ repos:
args: [--config=pyproject.toml]

- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
- id: actionlint

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.33.1
rev: c7d31dc612dffdd4d3b2f2b88b9660d3ab057ee8 # frozen: v1.33.1
hooks:
- id: zizmor

- repo: local
hooks:
# Dependabot bumps ruff-pre-commit, but not ruff in pyproject.toml.
- id: ruff-version
name: ruff version matches pyproject.toml
language: system
entry: >-
bash -c 'v=$(grep -A1 "repo: https://github.com/astral-sh/ruff-pre-commit" .pre-commit-config.yaml
| grep -oE "v[0-9]+[.][0-9]+[.][0-9]+" | head -1 | tr -d v);
grep -q "\"ruff==$v\"" pyproject.toml ||
{ echo "Set ruff==$v in the check-code group in pyproject.toml, to match ruff-pre-commit"; exit 1; }'
files: ^(\.pre-commit-config\.yaml|pyproject\.toml)$
pass_filenames: false
- id: check-types
name: check types
entry: hatch check types
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Agent instructions

Follow the [contributor guide](docs/CONTRIBUTING.md), in particular [running commands](docs/CONTRIBUTING.md#running-commands).
Follow the [contributor guide](docs/CONTRIBUTING.md), in particular [Running commands](docs/CONTRIBUTING.md#running-commands).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Rocheometry is a dependency-free Python library that computes these surfaces dir

## Installation

`rocheometry` requires Python 3.11 or later (see [compatibility and versioning](#compatibility-and-versioning)).
`rocheometry` requires Python 3.11 or later (see [Compatibility and versioning](#compatibility-and-versioning)).
It has no runtime dependencies by default.

`rocheometry` is available from [PyPI](https://pypi.org/project/rocheometry/).
Expand Down
8 changes: 4 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ Once a version is on PyPI it cannot be uploaded again, so release any fix as a n

### Updating from the template

This project was generated from a [Copier](https://copier.readthedocs.io/) template, recorded with your answers to its questions in `.copier-answers.yml`.
This project was generated from a [Copier](https://copier.readthedocs.io/) template, recorded with your answers to its questions in `.copier-answers.yml`, where `_src_path` is the template's location.

To apply a newer version of the template, run
To apply a newer version of the template, run this from a clone of the template, giving the path to this project:

```shell
uvx copier update --defaults
hatch run update PATH
```

Review the changes and resolve any conflicts, where the project has changed the same lines as the template, then commit them through a pull request.
Expand All @@ -278,7 +278,7 @@ Run every development command through Hatch, which manages the environments for

- Don't skip pre-commit hooks or checks, for example with `git commit --no-verify`
- Don't edit `src/rocheometry/_version.py`: it is generated from the git tag
- Commit any changes the checks make, as described in [checking your changes](#checking-your-changes)
- Commit any changes the checks make, as described in [Checking your changes](#checking-your-changes)

```shell
hatch run pre-commit:install # Set up the pre-commit hooks
Expand Down
2 changes: 1 addition & 1 deletion docs/site/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Install Rocheometry from PyPI: it needs Python 3.11 or later, has

# Installation

`rocheometry` requires Python 3.11 or later (see [compatibility and versioning](../project/compatibility-and-versioning.md)).
`rocheometry` requires Python 3.11 or later (see [Compatibility and versioning](../project/compatibility-and-versioning.md)).
It has no runtime dependencies by default.

`rocheometry` is available from [PyPI](https://pypi.org/project/rocheometry/).
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ accuracy = [
"pyyaml>=6,<7",
]
check-code = [
"ruff==0.17.6", # keep consistent with pre-commit-config.yaml
"ruff==0.17.6", # checked by the ruff-version pre-commit hook
]
check-fmt = [
{ include-group = "check-code" },
Expand Down Expand Up @@ -131,9 +131,6 @@ local_scheme = "no-local-version"
[tool.hatch.version]
source = "vcs"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.hooks.vcs]
version-file = "src/rocheometry/_version.py"

Expand Down Expand Up @@ -182,7 +179,7 @@ dependencies = []
dependency-groups = [ "docs" ]

[tool.hatch.envs.docs.scripts]
build = "zensical build"
build = "zensical build --strict"
check = "python docs/figures.py check {args}"
figures = "python docs/figures.py write {args}"
serve = "zensical serve"
Expand Down Expand Up @@ -308,9 +305,6 @@ quote-style = "double"
# their provenance, so it waits for the next rebuild.
"fits/common.py" = [ "D401" ]

[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"

[tool.ruff.lint.pydocstyle]
convention = "google"

Expand Down
1 change: 1 addition & 0 deletions zensical.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ pymdownx.mark = {}
pymdownx.smartsymbols = {}
pymdownx.snippets.base_path = ["."]
# pymdownx.snippets.base_path = "includes"
pymdownx.snippets.check_paths = true
pymdownx.superfences.custom_fences = [
{ name = "mermaid", class = "mermaid", format = "pymdownx.superfences.fence_code_format" },
]
Expand Down