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: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.git_archival.txt export-subst
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ PASTE ERROR MESSAGE HERE
<!-- blacken-docs:on -->

**Info on your environment**
Paste the output of `polartoolkit.Report()` below:

<!-- blacken-docs:off -->
```
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ assignees: ''

## Update dependencies

- [ ] Check all the dependency changes since the last release are reflected in `environment.yml`, `pyproject.toml`, and the Scooby list in `__init__.py`
- [ ] Check all the dependency changes since the last release are reflected in `pyproject.toml` (both in `dependencies` and under `[tool.pixi.dependencies]`), and the Scooby list in `__init__.py`
- [ ] Check any new function are added to `__init__.py` and `docs/api/polartoolkit.rst`
- [ ] Update the backup environment file `env/environment.yml` with `make conda_export`
- [ ] Update the backup environment file `env/environment.yml` with `pixi run conda_export`
- [ ] update PolarToolkit version in `environment.yml` in [PolarToolkit-Binder repo](https://github.com/mdtanker/polartoolkit-binder) to the latest version number

## Update the changelog
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ updates:
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "chore"
groups:
actions:
patterns:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v7
- uses: actions/download-artifact@v8
with:
name: Packages
path: dist
Expand Down
62 changes: 26 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,76 +12,66 @@ concurrency:
cancel-in-progress: true

env:
# Many color libraries just need this variable to be set to any value.
# Set it to 3 to support 8-bit color graphics (256 colors per channel)
# for libraries that care about the value set.
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3

defaults:
run:
shell: bash -el {0}

jobs:
lint:
name: Pylint
style:
name: Style checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v7
- name: Run Pylint
run: uvx nox -s pylint -- --output-format=github

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
environments: dev

- run: pixi run style

test:
name: Python Tests ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
runs-on: [ubuntu-latest, windows-latest, macos-14]

env:
NUMBA_DISABLE_JIT: "1"
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}

- name: Get current week number of year
id: date
run: echo "date=$(date +%Y-W%W)" >> $GITHUB_OUTPUT # e.g., 2024-W19

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2
- uses: actions/setup-python@v6
with:
environment-file: environment.yml
post-cleanup: "all"
cache-downloads: false
# environment cache is persistent for one week.
cache-environment-key:
micromamba-environment-${{ steps.date.outputs.date }}
python-version: ${{ matrix.python-version }}

- name: Install package
run: pip install --no-deps -e .
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
environments: test

- name: Run the tests
run: >-
pytest -m "not fetch and not issue" -ra --cov --cov-report=xml
--cov-report=term --durations=20
- run: pixi run test_ci

- name: Upload coverage report
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ tmp*
.vscode*

docs/api/generated/
# pixi environments
.pixi/*
!.pixi/config.toml
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ci:
exclude: |
(?x)^(
.github/config.yml |
environment.yml |
env/environment.yml
env/environment.yml |
pixi.lock
)$

repos:
Expand All @@ -21,7 +21,7 @@ repos:
rev: "v6.0.0"
hooks:
- id: check-added-large-files
exclude: ^(docs/datasets/|docs/gallery/masking_and_subsetting_data.ipynb)
exclude: ^(pixi.lock|docs/datasets/|docs/gallery/masking_and_subsetting_data.ipynb)
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
Expand Down Expand Up @@ -90,7 +90,7 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.24.1"
rev: "v0.25"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
Expand Down
13 changes: 9 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "mambaforge-23.11"
python: "latest"
jobs:
create_environment:
- asdf plugin add pixi
- asdf install pixi latest
- asdf global pixi latest
install:
- pip install --no-deps -e .
conda:
environment: environment.yml
- pixi install -e docs
build:
html:
- pixi run -e docs sphinx-build -T -b html docs $READTHEDOCS_OUTPUT/html

sphinx:
configuration: docs/conf.py
Loading