Skip to content

[ENH] Add downwards compatibility CI workflow for deep_equals (#532)#1

Open
sid200727 wants to merge 3 commits intomainfrom
claude/youthful-kirch
Open

[ENH] Add downwards compatibility CI workflow for deep_equals (#532)#1
sid200727 wants to merge 3 commits intomainfrom
claude/youthful-kirch

Conversation

@sid200727
Copy link
Copy Markdown
Owner

@sid200727 sid200727 commented Mar 25, 2026

Reference Issues/PRs

Fixes sktime#532.

What does this implement/fix? Explain your changes.

Adds a new GitHub Actions workflow (.github/workflows/test_compat.yml) that tests deep_equals against older dependency versions using uv's --exclude-newer flag:

  • numpy 1.x + pandas 1.x (resolved as of 2023-04-02)
  • numpy 1.x + pandas 2.x (resolved as of 2024-06-15)

Runs on push/PR to main, weekly on Mondays, and manually via workflow dispatch.

Does your contribution introduce a new dependency? If yes, which one?

No. uv is already used in the project.

What should a reviewer concentrate their feedback on?

  • The chosen cutoff dates for each matrix entry
  • Whether python-version: "3.11" is appropriate for both jobs

Any other comments?

Existing CI covers numpy 2 + pandas 3. This fills the gap for older combinations legacy users may still rely on.

PR checklist

For all contributions
  • I've reviewed the project documentation on contributing
  • I've added myself to the list of contributors
  • PR title starts with [CI/CD]
For code contributions
  • N/A — CI/CD only change, no new Python code added.

Summary by Sourcery

CI:

  • Introduce a dedicated GitHub Actions workflow to run deep_equals tests against legacy NumPy/pandas dependency combinations on pushes, pull requests, a weekly schedule, and manual dispatch.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 25, 2026

Reviewer's Guide

Adds a new GitHub Actions workflow that runs targeted deep_equals tests against older NumPy/Pandas dependency combinations using uv with --exclude-newer, triggered on main branch pushes/PRs, weekly schedule, and manual dispatch, with concurrency and matrix-based job configuration.

File-Level Changes

Change Details Files
Introduce a new downwards-compatibility CI workflow for deep_equals using uv and a dependency-date matrix.
  • Add a GitHub Actions workflow configured to run on pushes and pull requests to main, a weekly cron schedule, and manual workflow dispatch
  • Configure workflow permissions to read-only and enable concurrency cancellation per-ref
  • Define a matrix job that runs deep_equals tests against two dependency sets differentiated by uv --exclude-newer cutoff dates to approximate numpy 1.x + pandas 1.x and numpy 1.x + pandas 2.x on Python 3.11
  • Set up steps to check out the repository, install uv, install the specified Python version, install project test dependencies with uv pip and the matrix-specific exclude-newer date, print the resolved dependency versions, and run pytest only for skbase/utils/tests/test_deep_equals.py
.github/workflows/test_compat.yml

Assessment against linked issues

Issue Objective Addressed Explanation
sktime#532 Add a CI workflow that performs downwards compatibility testing for the deep_equals utility only, using older versions of numpy and pandas via uv's time-based cutoff functionality.
sktime#532 Configure the compatibility tests to cover environments representing: (a) pre-NumPy 2.0, and (b) at least one time point each corresponding to pandas 1.x and pandas 2.x, while existing CI continues to cover NumPy 2.x and pandas 3.x.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The uv python install ${{ matrix.python-version }} step doesn’t actually guarantee that Python 3.11 is the interpreter used for uv pip install --system and pytest (they will likely use the runner’s default Python); consider either using actions/setup-python for 3.11 or pinning/selecting the uv-managed interpreter explicitly before installing/running tests.
  • Since all matrix entries currently use the same Python version, you could simplify the matrix by moving python-version: "3.11" to the job level and only varying name and exclude_newer in the matrix, unless you expect to add differing Python versions soon.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `uv python install ${{ matrix.python-version }}` step doesn’t actually guarantee that Python 3.11 is the interpreter used for `uv pip install --system` and `pytest` (they will likely use the runner’s default Python); consider either using `actions/setup-python` for 3.11 or pinning/selecting the `uv`-managed interpreter explicitly before installing/running tests.
- Since all matrix entries currently use the same Python version, you could simplify the matrix by moving `python-version: "3.11"` to the job level and only varying `name` and `exclude_newer` in the matrix, unless you expect to add differing Python versions soon.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
@sid200727 sid200727 force-pushed the claude/youthful-kirch branch from 25df238 to 38a4234 Compare April 12, 2026 19:36
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.

[ENH] add downwards compatibility testing at earlier version states

1 participant