Skip to content

Add CI#38

Merged
jemrobinson merged 28 commits intomainfrom
add-ci
Aug 1, 2025
Merged

Add CI#38
jemrobinson merged 28 commits intomainfrom
add-ci

Conversation

@jemrobinson
Copy link
Copy Markdown
Member

@jemrobinson jemrobinson commented Jul 28, 2025

Add some basic continuous-integration steps.

  • Style checks with ruff
  • User-written tests with pytest
  • Static type-checking with mypy
  • Automated test-coverage GitHub comment bot

If you want to ensure your code passes locally before opening a PR you can run the tests locally following the instructions in CONTRIBUTING.md.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jemrobinson jemrobinson changed the title Add CI WIP: Add CI Jul 28, 2025
@jemrobinson jemrobinson marked this pull request as draft July 28, 2025 10:58
@jemrobinson jemrobinson changed the title WIP: Add CI Add CI Jul 29, 2025
@jemrobinson jemrobinson marked this pull request as ready for review July 29, 2025 15:55
@jemrobinson jemrobinson requested review from a team, IFenton and Copilot July 29, 2025 15:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds basic continuous integration and development tooling to the project, including code style checks, testing infrastructure, and CI workflows.

Key changes include:

  • Added development dependencies for testing and type checking (mypy, pytest, pre-commit)
  • Set up automated CI workflows for code style checks, testing, and coverage reporting
  • Updated Python version constraints to exclude 3.13 due to TensorFlow compatibility
  • Applied consistent code formatting across all notebook files

Reviewed Changes

Copilot reviewed 28 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Added build system configuration, dev dependencies, and tool configurations
tests/test_cli.py New CLI test suite with custom runner for testing zebra commands
.github/workflows/ CI workflows for code style, testing, and coverage reporting
.pre-commit-config.yaml Pre-commit hooks configuration for automated code quality checks
ice_station_zebra/ Type hint improvements and code style fixes across Python modules
notebook/ Code formatting and style improvements in Jupyter notebooks
README.md, CONTRIBUTING.md Updated documentation with development setup instructions
Comments suppressed due to low confidence (3)

pyproject.toml:2

  • The package 'uv_build' does not appear to be a valid Python package. This should likely be 'uv' or another valid build backend package name.
requires = ["uv_build>=0.8.3,<0.9.0"]

pyproject.toml:3

  • The build backend 'uv_build' does not appear to be valid. Consider using a standard build backend like 'hatchling.build' or 'setuptools.build_meta'.
build-backend = "uv_build"

tests/test_cli.py:93

  • [nitpick] The method name 'test_train_help' is inconsistent with other test methods in the class which use 'test_help'. Consider renaming to 'test_help' for consistency.
    def test_train_help(self):

@github-actions
Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  ice_station_zebra
  types.py 23-24, 28, 32
  ice_station_zebra/cli
  hydra.py
  ice_station_zebra/data/anemoi
  zebra_dataset.py 41-45
  ice_station_zebra/data/lightning
  __init__.py
  combined_dataset.py 20, 24
  zebra_data_module.py 22-25
  ice_station_zebra/evaluation
  cli.py
  evaluator.py 29-35
  ice_station_zebra/evaluation/callbacks
  metric_summary_callback.py 1-4, 18-20, 35-45
  plotting_callback.py 4-12, 44-61, 71-76
  ice_station_zebra/models
  encode_process_decode.py 22-43
  zebra_model.py 25-32, 48
  ice_station_zebra/models/decoders
  naive_latent_space_decoder.py 21-27
  ice_station_zebra/models/encoders
  naive_latent_space_encoder.py 21-27
  ice_station_zebra/training
  cli.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Copy Markdown
Contributor

@IFenton IFenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally it looks fine, but I hit a couple of problems when trying to test the pre-commit / pytest functionality (see the relevant notes). So I haven't yet managed to get them running.

Comment thread pyproject.toml
Comment thread CONTRIBUTING.md
Comment thread pyproject.toml
Copy link
Copy Markdown
Contributor

@IFenton IFenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jemrobinson jemrobinson merged commit d5d6a79 into main Aug 1, 2025
3 checks passed
@jemrobinson jemrobinson deleted the add-ci branch August 1, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants