Skip to content
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

Add workflow to test PyBaMM develop branch nightly #291

Merged
merged 14 commits into from
Apr 18, 2024

Conversation

BradyPlanden
Copy link
Member

@BradyPlanden BradyPlanden commented Apr 13, 2024

Description

Adds a workflow to nightly test PyBOP against PyBaMM@develop. This should be used to capture how breaking changes from PyBaMM affect PyBOP.

This workflow can be viewed here: https://github.com/pybop-team/PyBOP/actions/runs/8672602634

Issue reference

Fixes #290

Review

Before you mark your PR as ready for review, please ensure that you've considered the following:

  • Updated the CHANGELOG.md in reverse chronological order (newest at the top) with a concise description of the changes, including the PR number.
  • Noted any breaking changes, including details on how it might impact existing functionality.

Type of change

  • New Feature: A non-breaking change that adds new functionality.
  • Optimization: A code change that improves performance.
  • Examples: A change to existing or additional examples.
  • Bug Fix: A non-breaking change that addresses an issue.
  • Documentation: Updates to documentation or new documentation for new features.
  • Refactoring: Non-functional changes that improve the codebase.
  • Style: Non-functional changes related to code style (formatting, naming, etc).
  • Testing: Additional tests to improve coverage or confirm functionality.
  • Other: (Insert description of change)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All unit tests pass: $ nox -s tests
  • The documentation builds: $ nox -s doctest

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.

Further checks:

  • Code is well-commented, especially in complex or unclear areas.
  • Added tests that prove my fix is effective or that my feature works.
  • Checked that coverage remains or improves, and added tests if necessary to maintain or increase coverage.

Thank you for contributing to our project! Your efforts help us to deliver great software.

@BradyPlanden BradyPlanden linked an issue Apr 13, 2024 that may be closed by this pull request
Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.49%. Comparing base (433d10c) to head (37f00e4).
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #291      +/-   ##
===========================================
+ Coverage    95.47%   95.49%   +0.01%     
===========================================
  Files           36       38       +2     
  Lines         2034     2040       +6     
===========================================
+ Hits          1942     1948       +6     
  Misses          92       92              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 5 to 6
schedule:
- cron: "0 23 * * *"
Copy link
Member

Choose a reason for hiding this comment

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

A daily schedule should be alright for now, but when we implement the nightlies on the PyBaMM side, I will suggest matching that (which will most likely be weekly) to run a few hours after PyBaMM's wheels will have been uploaded

Copy link
Member

Choose a reason for hiding this comment

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

It will most likely be weekly or fortnightly, and I will further recommend adding a job that needs this job and creates an issue for you. Here's how xarray started doing it, which is a bit complicated: pydata/xarray#4583 but it seems to work well: pydata/xarray#8844

We can use a similar workflow based on this, or implement a simpler job that doesn't need to parse the logs and so on. and use existing third-party GitHub Actions that can do the same task (opening an issue, adding the workflow URL in the contents, etc.)

Copy link

Choose a reason for hiding this comment

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

since I saw the cross-link: we've since moved on to using xarray-contrib/issue-from-pytest-log, which abstracts away a lot of the complex code and in general is a lot more robust.

Copy link
Member

Choose a reason for hiding this comment

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

That looks wonderful – thanks a lot, @keewis!

.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
BradyPlanden and others added 3 commits April 17, 2024 11:40
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

I think GitHub is a bit buggy today so I'm not sure if the diffs I suggested are loading correctly. But I think these should be all of the necessary changes.

.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/nightly_dependency_tests.yaml Outdated Show resolved Hide resolved
BradyPlanden and others added 2 commits April 18, 2024 13:17
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@BradyPlanden BradyPlanden merged commit 6f594de into develop Apr 18, 2024
28 checks passed
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.

Test nightly against PyBaMM develop
3 participants