Skip to content

[MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow - #95

Draft
siddharth7113 wants to merge 2 commits into
sktime:mainfrom
siddharth7113:mnt/ci-split-weekly
Draft

[MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow#95
siddharth7113 wants to merge 2 commits into
sktime:mainfrom
siddharth7113:mnt/ci-split-weekly

Conversation

@siddharth7113

@siddharth7113 siddharth7113 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Follows the CI design of sktime (conditional PR jobs + scheduled full runs).

What does this implement/fix? Explain your changes.

Restructures CI into a lean PR workflow and a weekly full workflow:

  • New test_all.yml: runs the weekly cron (Sun 05:00 UTC) and workflow_dispatch, runs the full job set including benchmarks. Scheduled runs are only on sktime/pycaret.

  • test.yml (PR CI): cron is removed, test-benchmarks are moved to weekly-only, and a new detect job diffs the PR against its merge base and skips test jobs when no relevant files changed (e.g. docs-only PRs run only code-quality). Skipped jobs still report a status, so required checks stay satisfied. Pushes to main always run everything.

  • New test-core job: installs pycaret with core dependencies only (no [full]) and checks that all modules import and the test suite passes without soft dependencies. Supporting test changes: pytest.importorskip guards in 7 test files that imported soft dependencies (mlflow, fugue, boto3/moto) at module level, and a skip for the catboost iterative imputer cases when catboost is not installed.

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

No.

@siddharth7113
siddharth7113 marked this pull request as ready for review August 24, 2026 23:06
@siddharth7113

siddharth7113 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@fkiraly probably a good idea to get this reviewed in priority, I think the current CI workflow is consuming a lot of action minutes as well as unecessary slow

@amotl amotl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for this cleanup. I'd tend to run simpler CI/GHA setups, but if it's the way sktime favours it, please go ahead. To detect any hiccups, I am humbly asking @fkiraly to validate this. Thanks!

Comment on lines +18 to +32
- name: Run black
uses: psf/black@stable
with:
src: pycaret tests
version: 24.8.0
- name: Check imports
uses: jamescurtin/isort-action@master
with:
sort-paths: pycaret tests
isort-version: 5.13.2
- name: Run flake8
uses: py-actions/flake8@v2
with:
path: pycaret tests
flake8-version: 7.1.1

@amotl amotl Aug 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we ready to switch to ruff and ty in any future iteration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was thinking the same, I think ty is still in beta (I might be wrong) , but yes switching to ruff is a good idea.

@siddharth7113

Copy link
Copy Markdown
Contributor Author

Thank you for this cleanup. I'd tend to run simpler CI/GHA setups, but if it's the way sktime favours it, please go ahead. To detect any hiccups, I am humbly asking @fkiraly to validate this. Thanks!

Yep, I am also new to this 😅, and @fkiraly is much well versed in CI matrix , but my attempt idea is to make sure we aren't running complete CI everytime there is a small change in documentation or parts of code that don't intersect.

@siddharth7113 siddharth7113 changed the title [MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow [MNT] restructure CI: conditional PR jobs, move full runs to daily test-all workflow Aug 25, 2026
@siddharth7113 siddharth7113 changed the title [MNT] restructure CI: conditional PR jobs, move full runs to daily test-all workflow [MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow Aug 25, 2026

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Questions:

  • this seems to delete the tests for the benchmark marker in test without a replacement, except in test_all. That also seems to be the only major coverage change. You mention this in the PR description, but why exactly those? They do not seem to be the major runtime sink?
  • the importorskip statements do not isolate imports further down at module level, correct? So, would the test file not fail at test collection, if, say, mlflow is not present?

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Aug 25, 2026
@siddharth7113

Copy link
Copy Markdown
Contributor Author

Questions:

  • this seems to delete the tests for the benchmark marker in test without a replacement, except in test_all. That also seems to be the only major coverage change. You mention this in the PR description, but why exactly those? They do not seem to be the major runtime sink?

My assumption with this was benchmarking is something we would check only once a week and not always? Is this something we wish to check at every run time.

@WilliamJudge94

Copy link
Copy Markdown
Contributor

I think the PyCaret Team should make avoiding regressions the top priority. Tests should run close to when code is pushed so issues are caught while the change is still fresh. If a regression is found a week later, the developer has likely moved on and additional code may already depend on it.

My suggestions for reducing GitHub Actions minutes would be:

  1. Docs-only changes: Use paths-ignore within the GitHub Actions workflow so CI does not run when only documentation files are changed.

  2. On push: Run the full test suite on only the latest supported Python version.

  3. Before merge: Have a maintainer trigger the remaining supported Python versions as a required final check.

This keeps regression feedback fast while reducing unnecessary CI usage.

@amotl

amotl commented Aug 26, 2026

Copy link
Copy Markdown
Member

I agree with @WilliamJudge94. This patch adds ~500 lines to the CI setup, and might lead to regressions. Maybe we should just NOT do it?

My suggestions for reducing GitHub Actions minutes would be [...]

My question is: Do they have to be reduced, or are we chasing ghosts? What is actually the problem?

@siddharth7113

Copy link
Copy Markdown
Contributor Author

I agree with @WilliamJudge94. This patch adds ~500 lines to the CI setup, and might lead to regressions. Maybe we should just NOT do it?

My suggestions for reducing GitHub Actions minutes would be [...]

My question is: Do they have to be reduced, or are we chasing ghosts? What is actually the problem?

I think I bundled 2 things together , 1. idea about only relevant parts of CI should run when a change is made, for e.g. when a small readme or documentation is changed, the tests that do not concern them i.e. plotting etc should not run, which in theory might sounds nice, but requires clear boundaries of what should and should not run for parts of code.

  1. Reducing some tests to a weekly cron to save CI runtime (which I inherently assumed is needed) .

I think after this discussion I think , it is better to keep the CI as is for now, and revisit at a later point when we have a larger test suite.

@WilliamJudge94

WilliamJudge94 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

I agree with @WilliamJudge94. This patch adds ~500 lines to the CI setup, and might lead to regressions. Maybe we should just NOT do it?

My suggestions for reducing GitHub Actions minutes would be [...]

My question is: Do they have to be reduced, or are we chasing ghosts? What is actually the problem?

The main issue is that every push to a PR triggers 20+ CI jobs, which does exceed sktime’s 20 simultaneous runners by itself. This is already causing CI jobs across the organization to sit queued. Especially when multiple PRs are being worked on at the same time.

I agree with @siddharth7113 that the CI needs updating to tackle this problem. We only differ on the implementation.

@fkiraly

fkiraly commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

reopening as a draft since we may do a variant of this sometime in the future.

@fkiraly fkiraly reopened this Sep 6, 2026
@fkiraly
fkiraly marked this pull request as draft September 6, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Continuous integration, unit testing & package distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants