[MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow - #95
[MNT] restructure CI: conditional PR jobs, move full runs to weekly test-all workflow#95siddharth7113 wants to merge 2 commits into
Conversation
|
@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 |
| - 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 |
There was a problem hiding this comment.
Are we ready to switch to ruff and ty in any future iteration?
There was a problem hiding this comment.
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.
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. |
fkiraly
left a comment
There was a problem hiding this comment.
Questions:
- this seems to delete the tests for the
benchmarkmarker intestwithout a replacement, except intest_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
importorskipstatements do not isolate imports further down at module level, correct? So, would the test file not fail at test collection, if, say,mlflowis not present?
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. |
|
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:
This keeps regression feedback fast while reducing unnecessary CI usage. |
|
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 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.
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. |
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. |
|
reopening as a draft since we may do a variant of this sometime in the future. |
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) andworkflow_dispatch, runs the full job set including benchmarks. Scheduled runs are only onsktime/pycaret.test.yml(PR CI): cron is removed,test-benchmarksare moved to weekly-only, and a newdetectjob 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 tomainalways run everything.New
test-corejob: 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.importorskipguards in 7 test files that imported soft dependencies (mlflow,fugue,boto3/moto) at module level, and a skip for thecatboostiterative imputer cases whencatboostis not installed.Does your contribution introduce a new dependency? If yes, which one?
No.