-
Notifications
You must be signed in to change notification settings - Fork 5
v0.3.0: Modern stack, RTD docs, and optimized CI/CD #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
786a1c5
Enhance README with additional badges
mwyau ac87ae3
chore: Remove deprecated scripts and notebooks
mwyau aefd95a
fix: Support N-dimensional arrays, valid_time, and empty centers in E…
mwyau 377df82
feat: Export tracked cyclones to IMILAST format
mwyau 3172c08
test: Integrate pooch for ERA5 test datasets and refactor tests
mwyau e923f1f
chore: Bump version to v0.3.0, update documentation and dependencies
mwyau bac6aa6
docs: Add IMILAST Intercomparison Protocol
mwyau 124a70c
Add IMILAST output support and legacy regression integration test
mwyau d0428fb
Refactor integration test comparison to use explicit tolerances
mwyau 45ae7a6
Ignore .vscode directory
mwyau 9d526b8
Fix all ruff and mypy issues and ensure all tests pass
mwyau 0bb9332
Refactor track handling to Tracks class and remove all CSV references
mwyau e136140
Merge pull request #8 from mwyau/feature/imilast-output-and-pooch-tes…
mwyau e705098
Add GitHub Actions CI workflow and update pre-commit configuration
mwyau ba3c9fd
Remove deprecated ANN rules from ruff config
mwyau cebbf4d
Add IMILAST data download link to README
mwyau 274bb7f
Update README with CI/CD feature
mwyau 666b87f
Optimize CI workflow and refactor Center to dataclass
mwyau 605ef2e
Refactor codebase for modern Python 3.10+ standards and optimize CI
mwyau 1c53a6f
Simplify output extension handling to only use .txt
mwyau 3e9d1bd
Remove hardcoded Windows paths and improve test portability
mwyau 7c768e5
Optimize integration tests for speed: use direct calls, streamline co…
mwyau 91754f2
Standardize integration test IDs and tiered coverage logic
mwyau 3404664
Restore Python matrix (3.10, 3.11, 3.12) for CI testing
mwyau af1dff0
Install MPI dependencies in CI runner
mwyau 58632af
Potential fix for code scanning alert no. 1: Workflow does not contai…
mwyau 9026719
Add unit tests for Tracks IMILAST I/O and finalize CI/CD enhancements
mwyau d4a8137
Add Development section to README
mwyau 38662a5
Further granularize CI: split linting and type-checking into separate…
mwyau d62ffe3
Introduce TimeRange dataclass and refactor time tracking logic
mwyau 2dae06e
Implement structural pattern matching in get_var and finalize moderni…
mwyau ff3b71d
Clean up Grid protocol signature: remove default values
mwyau 1feb956
Refactor head and tail to use object references for a more Pythonic i…
mwyau 0db3316
Enforce strict types in Track model and eliminate remaining isinstanc…
mwyau 31afee9
Make Tracks.compare order-independent and clean up redundant test sor…
mwyau cefd36c
Centralize track sorting logic in Tracks.sort and reuse in from_imila…
mwyau c3b87ff
Final README refinements for modernization and project structure
mwyau ad5964e
Default pytest to skip slow tests locally and override in CI
mwyau 413fcab
Merge pull request #9 from mwyau/feature/cicd-improvements
mwyau a8714c3
WIP: Migrate to xarray, update tiered testing logic, and clean up dep…
mwyau eb73342
Migrate to xarray, update TimeRange, and optimize integration tests
mwyau 468641f
style: run ruff format
mwyau 48e0a24
WIP: Rename chart_buffer to time_chunk_size and optimize detector
mwyau b31c644
Replace netCDF4 with h5netcdf and remove unused xdist
mwyau 947a708
Modernize codebase: rename chart to frame, optimize regression tests,…
mwyau 684950e
Fix: Explicitly add h5py dependency for CI
mwyau cd6d807
Fix: Remove unused type ignore in detector.py
mwyau 22c5ff3
ci: increase pytest verbosity
mwyau a9207e3
Fix: Explicitly use h5netcdf engine and remove redundant h5py dependency
mwyau 3de8b39
modernize: achieve 100% strict typing without Any or type:ignore
mwyau c6edc6e
build: drop support for python <3.12 and target only 3.12
mwyau 66a03d8
ci: use strategy matrix for python 3.12
mwyau 9f20ceb
build: refine tiered testing logic with --run-slow and --run-all
mwyau 3ac2474
Merge pull request #10 from mwyau/feature/migrate-to-xarray
mwyau c026bac
feat: add code coverage reporting with pytest-cov
mwyau 21330e4
feat: add support for python 3.13 and 3.14
mwyau cf8086f
feat: complete modernization with Python 3.14 Docker base
mwyau 753cca7
docs: organize README badges
mwyau cea0543
docs: fix typo in usage table
mwyau 445285b
docs: finalize Codecov reporting and CI workflow
mwyau ad5fdf4
fix: CI coverage reports
mwyau 8255d09
Merge pull request #11 from mwyau/feature/modernize-env-and-coverage
mwyau 41cfe97
fix: Docker GitHub Actions
mwyau 06ac1d1
ci: simplify docker tagging logic with pattern input
mwyau 41cc6cc
fix: setup-buildx-action
mwyau 413c810
ci: use vars.DOCKER_HUB_USERNAME for Docker Hub login
mwyau e736120
Merge pull request #12 from mwyau/fix/docker-publish
mwyau 6f4151a
Configure Dependabot for pip and GitHub Actions
mwyau 634c929
build(deps): bump docker/build-push-action from 5 to 7
dependabot[bot] 9c8d002
build(deps): bump actions/setup-python from 5 to 6
dependabot[bot] 37993c9
build(deps): bump actions/download-artifact from 4 to 8
dependabot[bot] fe6b9be
build(deps): bump docker/login-action from 3 to 4
dependabot[bot] d759431
build(deps): bump actions/upload-artifact from 4 to 7
dependabot[bot] e19ab09
Merge pull request #13 from mwyau/dependabot/github_actions/docker/bu…
mwyau 70c0b1a
Merge pull request #14 from mwyau/dependabot/github_actions/actions/s…
mwyau f3050dd
Merge pull request #15 from mwyau/dependabot/github_actions/actions/d…
mwyau b9fc1d8
Merge pull request #16 from mwyau/dependabot/github_actions/docker/lo…
mwyau ce1abd0
Merge pull request #17 from mwyau/dependabot/github_actions/actions/u…
mwyau 9e16d5f
fix: resolve 0% coverage and restore python 3.11 support
mwyau 3e23fc6
docs: update docker badge and python version support
mwyau 05bbeb2
docs: update docker badge to show image name
mwyau 0fafb10
docs: update GHCR link to organization URL
mwyau d576750
refactor: use TypeAlias for Python 3.11 compatibility
mwyau f422f07
docs: rearrange README badges
mwyau e7571ca
docs: fix typo in CLI arguments table
mwyau e5ac70f
Merge pull request #19 from mwyau/fix/codecov-python-311
mwyau 1a533e6
feat: add Read the Docs documentation scaffolding
mwyau 2206b64
docs: add Read the Docs badge and section to README
mwyau d659959
docs: fix unused imports and add link to intercomparison protocol
mwyau 8616894
Merge pull request #20 from mwyau/feature/add-docs
mwyau 2946eb0
ci: optimize Docker Publish trigger to avoid redundant builds
mwyau 1de468a
ci: optimize triggers and use shared matrix versions
mwyau 3620b3d
Merge pull request #21 from mwyau/fix/docker-publish-trigger
mwyau 4f77c34
chore: update pre-commit hooks and switch to pre-push
mwyau bdec886
style: automatic fixes from pre-commit
mwyau 5c86781
security: prevent checkout of untrusted code in trusted context
mwyau ca37cff
feat: switch to uv for dependency management and local dev
mwyau 7f73477
chore: streamline dependencies to 18-month window (NEP-29 adjusted)
mwyau b2b6d90
chore: use dependency-groups for dev dependencies
mwyau e856a25
chore: add uv.lock for deterministic builds
mwyau 06c4e99
chore: align numpy and scipy with xarray 2024.9.0 minimums
mwyau 2116dcb
docs: move documentation badge next to CI badge
mwyau be341b5
docs: move DOI badge to the end
mwyau 9f025b7
docs: refine Xarray feature description
mwyau 0cce512
Merge pull request #22 from mwyau/feature/dependency-management
mwyau e7c42d1
chore: update release date in CITATION.cff
mwyau dc960bf
fix: resolve double CI trigger and README formatting
mwyau 5849d7a
ci: disable Codecov status checks to only report coverage
mwyau 9edbccd
feat: increase test coverage and add documentation comments
mwyau a7d1ef3
Merge branch 'chore/release-update' into fix/final-touches
mwyau 25c7973
Merge pull request #23 from mwyau/fix/final-consolidated
mwyau 4672769
docs: lowercase GHCR organization name
mwyau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +0,0 @@ | ||
| data/test/*.nc filter=lfs diff=lfs merge=lfs -text export-ignore | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "pip" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, dev] | ||
| pull_request: | ||
| branches: [main, dev] | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| prepare: | ||
| runs-on: ubuntu-latest | ||
| # Skip PR CI if the head branch is 'dev' to avoid double runs (push trigger covers it) | ||
| if: github.event_name == 'push' || github.event.pull_request.head.ref != 'dev' | ||
| outputs: | ||
| python-versions: ${{ steps.versions.outputs.value }} | ||
| steps: | ||
| - id: versions | ||
| run: echo 'value=["3.11", "3.12", "3.13", "3.14"]' >> $GITHUB_OUTPUT | ||
|
|
||
| ruff-lint: | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'push' || github.event.pull_request.head.ref != 'dev' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: "pip" | ||
| - name: Install dependencies | ||
| run: pip install ruff | ||
| - name: Lint with Ruff | ||
| run: ruff check . | ||
|
|
||
| ruff-format: | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'push' || github.event.pull_request.head.ref != 'dev' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: "pip" | ||
| - name: Install dependencies | ||
| run: pip install ruff | ||
| - name: Check formatting with Ruff | ||
| run: ruff format --check . | ||
|
|
||
| mypy-typecheck: | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'push' || github.event.pull_request.head.ref != 'dev' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: "pip" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install .[dev] | ||
| - name: Type check with Mypy | ||
| run: mypy src/ tests/ | ||
|
|
||
| unit-tests: | ||
| name: unit-tests (Python ${{ matrix.python-version }}) | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ${{ fromJSON(needs.prepare.outputs.python-versions) }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install .[dev] | ||
| - name: Run Unit Tests | ||
| run: | | ||
| pytest -vv | ||
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| integration-tests: | ||
| name: integration-tests (Python ${{ matrix.python-version }}) | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ${{ fromJSON(needs.prepare.outputs.python-versions) }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - name: Install MPI | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y openmpi-bin libopenmpi-dev | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install .[dev] | ||
| - name: Run Integration Tests | ||
| run: | | ||
| pytest -vv tests/test_integration.py --run-all | ||
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Docker Publish | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["CI"] | ||
| types: [completed] | ||
|
|
||
| env: | ||
| DOCKER_HUB_REPO: xddd/pystormtracker | ||
| GHCR_REPO: ghcr.io/xddd/pystormtracker | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| # Only run if CI was successful AND it was a push event to main or dev | ||
| # Added head_repository check to prevent checkout of untrusted code in trusted context | ||
| if: > | ||
| github.event.workflow_run.conclusion == 'success' && | ||
| github.event.workflow_run.head_repository.full_name == github.repository && | ||
| (github.event.workflow_run.event == 'push' || github.event.workflow_run.event == 'workflow_dispatch') && | ||
| (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'dev') | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| # Use the commit from the completed workflow run | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.workflow_run.head_sha }} | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v4 | ||
|
|
||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| username: ${{ vars.DOCKER_HUB_USERNAME }} | ||
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
|
||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GHCR_PAT }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: | | ||
| ${{ env.DOCKER_HUB_REPO }} | ||
| ${{ env.GHCR_REPO }} | ||
| tags: | | ||
| type=raw,value=dev,pattern=dev | ||
| type=raw,value=latest,pattern=main | ||
| type=semver,pattern={{version}},pattern=main | ||
| type=semver,pattern={{major}}.{{minor}},pattern=main | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v7 | ||
| with: | ||
| context: . | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| version: 2 | ||
|
|
||
| build: | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "3.14" | ||
|
|
||
| python: | ||
| install: | ||
| - method: pip | ||
| path: . | ||
| extra_requirements: | ||
| - dev | ||
|
|
||
| sphinx: | ||
| configuration: docs/conf.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Use Python 3.14 slim as the base image | ||
| FROM python:3.14-slim | ||
|
|
||
| # Install system dependencies for MPI and building packages | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| libopenmpi-dev \ | ||
| openmpi-bin \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Create data directory for mounting | ||
| RUN mkdir /data && chmod 777 /data | ||
|
|
||
| # Copy the project files | ||
| COPY . . | ||
|
|
||
| # Install the package and its dependencies | ||
| RUN pip install --no-cache-dir . | ||
|
|
||
| # Add a non-root user for security | ||
| RUN useradd -m pst | ||
| USER pst | ||
|
|
||
| # Volume for data persistence | ||
| VOLUME /data | ||
|
|
||
| # Default command | ||
| ENTRYPOINT ["stormtracker"] | ||
| CMD ["--help"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.