Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9170d4b
refactor: align standards with the rest of the codebase
lispandfound Nov 12, 2025
1ab2830
fix: swap git extension workflow
lispandfound Nov 12, 2025
8e5076b
fix: target branches correctly
lispandfound Nov 12, 2025
2ac1f00
fix: remove GMT installation
lispandfound Nov 12, 2025
716c604
fix: use python 3.13
lispandfound Nov 12, 2025
73d83ba
fix: add coverage extension to pytest
lispandfound Nov 12, 2025
3db0a8d
fix: use python 3.13 for deptry
lispandfound Nov 12, 2025
d4c24f2
fix: make deptry happy
lispandfound Nov 12, 2025
225e7cc
fix: types should target master
lispandfound Nov 12, 2025
66e1cc6
fix: satisfy ty checks
lispandfound Nov 12, 2025
ddf4278
tests: improve test coverage for cli + coordinates
lispandfound Nov 12, 2025
b9c06a8
fix: better python gitignore
lispandfound Nov 12, 2025
dfc7fd8
ci: disable coverage for a bunch of modules
lispandfound Nov 12, 2025
9a6c2a2
trigger ci
lispandfound Nov 12, 2025
027d15e
tests(distributions): add distribution testing
lispandfound Nov 13, 2025
ab985eb
docs(distributions): improve typing and docstrings
lispandfound Nov 13, 2025
72b4b5c
fix: add test coverage for NZGMDB function
lispandfound Nov 13, 2025
8f82186
tests(distributions): add missing distributions tests
lispandfound Nov 13, 2025
052836c
refactor(timeseries): remove unused function
lispandfound Nov 13, 2025
34bfe8d
tests: add test coverage for non-omitted modules (#359)
Copilot Nov 13, 2025
20be0d9
tests(geo): fix tests for geo module
lispandfound Nov 13, 2025
a3ede1c
fix(test_geo): be a little more relaxed with floating point comparisons
lispandfound Nov 13, 2025
c937a1e
tests: add test coverage for omitted modules (#360)
Copilot Nov 13, 2025
78f7682
ci: add coverage checks for the remaining modules
lispandfound Nov 13, 2025
e6427b8
Merge branch 'type_checking' of github.com:ucgmsim/qcore into type_ch…
lispandfound Nov 13, 2025
400d5b9
docs: appease numpydoc
lispandfound Nov 13, 2025
0a43886
fix: add basic check for `load_nhm`
lispandfound Nov 13, 2025
5de292b
fix: coverage exclude numba functions
lispandfound Nov 13, 2025
33581b7
fix: type check fixes
lispandfound Nov 20, 2025
6718b2b
ci: remove unused filelock dependency
lispandfound Nov 20, 2025
830061d
fix: revert removal of gc2 distance calculations
lispandfound Nov 20, 2025
e927575
fix: type-checking fixes
lispandfound Nov 20, 2025
f536979
fix: add typing stubs
lispandfound Nov 21, 2025
4339ec9
fix: deptry install and dependencies
lispandfound Nov 23, 2025
e449dc9
fix(geo): typo in arctan2 compute
lispandfound Nov 23, 2025
4ab1d6c
fix(point_in_polygon): better type variable assignment
lispandfound Nov 23, 2025
f55b975
deps: remove unused requests dependency
lispandfound Nov 23, 2025
5a68036
fix(geo): avg_wbearing does not need quartile correction
lispandfound Nov 23, 2025
4d5a99b
ci: update version number
lispandfound Dec 3, 2025
d1ea806
Merge branch 'master' into type_checking
lispandfound Dec 18, 2025
551be61
chore: update pyproject.toml to fix duplicate and conflicting fields
lispandfound Dec 18, 2025
7af5c87
fix: backport deprecated decorator
lispandfound Jan 6, 2026
a678f64
deps: fix numba bounds
lispandfound Jan 6, 2026
ad9dc9d
fix: type checking fixes
lispandfound Jan 6, 2026
aa54cc8
tests(cli): clean docstrings before comparison
lispandfound Jan 6, 2026
eb047a5
fix: add typing module
lispandfound Jan 6, 2026
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
20 changes: 20 additions & 0 deletions .github/workflows/deptry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deptry Dependency Check

on: [pull_request]

jobs:
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup the minimum required python distribution
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Setup uv
uses: astral-sh/setup-uv@v5
- run: uv sync --dev --all-extras
# Install deptry
- run: uv pip install deptry
# Run deptry to check that all dependencies are present.
- run: uv run deptry . -ddg test,dev,types
61 changes: 47 additions & 14 deletions .github/workflows/git-extension.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
name: Check requirements.txt git URLs are properly formatted

on: pull_request

permissions:
contents: read
pull-requests: write
name: Check Git Dependencies

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
check-git-deps:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: sed -i '/git\+/ { /\.git$/! s/$/.git/ }' requirements.txt
- uses: parkerbxyz/suggest-changes@v2
with:
comment: 'Please change the following dependencies for consistency.'
event: 'REQUEST_CHANGES'
- name: Checkout repository
uses: actions/checkout@v4


- name: Set up Python
uses: actions/setup-python@v4

- name: Run Git dependency check
run: |
import tomllib
from pathlib import Path
import sys

pyproject_path = Path("pyproject.toml")
if not pyproject_path.exists():
print("Error: pyproject.toml not found in the current directory.")
sys.exit(1)

with open(pyproject_path, "rb") as f:
config = tomllib.load(f)

issues = []
for section in ["project", "project.optional-dependencies"]:
if section in config and "dependencies" in config[section]:
deps = config[section]["dependencies"]
for dep in deps:
if "git+https://" in dep and not dep.endswith(".git"):
issues.append(dep)

if issues:
print("The following git dependencies are missing the .git extension:")
for issue in issues:
print(f" - {issue}")
sys.exit(1)
else:
print("All git dependencies are correctly formatted.")
shell: python
36 changes: 36 additions & 0 deletions .github/workflows/numpydoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Numpydoc Lint

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
numpydoc-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: fd-find
version: 1.0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13' # Adjust version as needed

- name: Install dependencies
run: |
pip install numpydoc
sudo apt-get install

- name: Run Numpydoc Lint
run: |
fdfind . qcore/ -E "__init__.py" --extension py | xargs numpydoc lint
77 changes: 77 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Pytest Check

on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
run: |
source .venv/bin/activate
pytest --cov=qcore --cov-report=html tests

- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: .coverage
include-hidden-files: true
if-no-files-found: ignore

coverage:
needs: test
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade coverage[toml]

- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: coverage-data

- name: Combine coverage and fail it it’s under 100 %
run: |
python -m coverage html --skip-covered --skip-empty

# Report and write to summary.
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY

# Report again and fail if under 95%.
python -Im coverage report --fail-under=95

- name: Upload HTML report if check failed
uses: actions/upload-artifact@v4

with:
name: html-report
path: htmlcov

if: ${{ failure() }}
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
32 changes: 32 additions & 0 deletions .github/workflows/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Type Check

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
typecheck:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"


- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Install project with types
run: uv sync --all-extras --dev

- name: Run type checking with ty
run: uv run ty check
Loading
Loading