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
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ jobs:
enable-cache: true
python-version: ${{ env.PYTHON_VERSION }}

- name: Run pre-commit hooks
if: ${{ !cancelled() }}
run: >-
uvx prek run --all-files
check-json check-merge-conflict check-toml check-yaml
end-of-file-fixer fix-byte-order-marker mixed-line-ending
trailing-whitespace mdformat

- name: Check lockfile
if: ${{ !cancelled() }}
run: uv lock --check

- name: Install type-checking environment
if: ${{ !cancelled() }}
run: uv sync --frozen --all-extras
Expand All @@ -142,15 +154,17 @@ jobs:

- name: Ty
if: ${{ !cancelled() }}
run: uv run --no-sync ty check
run: >-
uv check --quiet --preview-features=check-command
--ty-version=0.0.91 --all-extras --isolated

- name: Mypy
if: ${{ !cancelled() }}
run: uv run --no-sync mypy

- name: Check SPDX headers
if: ${{ !cancelled() }}
run: uvx prek run spdx --all-files
uses: mwyau/spdx-header-check@v0.1.0

unit-tests:
name: Unit tests (${{ matrix.os }}, Python ${{ matrix.python-version }}${{ matrix.mode != 'normal' && format(', {0}', matrix.mode) || '' }})
Expand Down
16 changes: 4 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
types_or: [ python ]

- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.89
rev: v0.0.91
hooks:
- id: ty
args: [ --all-extras, --isolated ]
Expand All @@ -43,15 +43,7 @@ repos:
- mdformat-simple-breaks
- mdformat-web

- repo: local
- repo: https://github.com/mwyau/spdx-header-check
rev: v0.1.0
hooks:
- id: spdx
name: Add SPDX headers
entry: uvx reuse==6.2.0 annotate
language: system
args:
- --copyright=Albert M. W. Yau
- --license=BSD-3-Clause
- --merge-copyrights
- --skip-unrecognised
files: '^(pyproject\.toml|(?:src|tests)/.*\.(?:py|pyi))$'
- id: spdx-header-check
4 changes: 4 additions & 0 deletions benchmarks/run_benchmark_detailed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause

"""Run one explicit, reproducible PyStormTracker Hodges benchmark.

The runner accepts a user-supplied input and configuration and writes the
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause

# Configuration file for the Sphinx documentation builder.

import posixpath
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dev = [
"mypy>=2.3.0",
"prek>=0.4.12",
"ruff>=0.16.1",
"ty==0.0.89",
"ty==0.0.91",
]
docs = [
"myst-parser>=5.1.0",
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate_trackjson_schema.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause

"""Generate or check the committed TrackJSON schema."""

from __future__ import annotations
Expand Down
3 changes: 0 additions & 3 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/parity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/parity/legacy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/parity/ncl_spherepack/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/healpix/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/hodges/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/preprocessing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
3 changes: 0 additions & 3 deletions tests/unit/simple/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2026 Albert M. W. Yau
#
# SPDX-License-Identifier: BSD-3-Clause
46 changes: 23 additions & 23 deletions uv.lock

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

Loading