Open fkiraly opened 10 months ago
Can you please explain a bit more details please? I want to understand it better first.
When I first read, I interpreted following happens.
git
__all__
of these modules (are these always present?)After a second read, I am not sure at all. Can you please share the steps you are planning (in python and in CI yaml)?
If possible, please tell me at what step my above understanding went wrong and it'll be easier for me to follow.
Yes, I think you got it right what I meat, except for step 7. Sorry for not explaining clearly.
The dynamic output should be:
Part 1: find all estimators that are affected by the change (affected, e.g., via inheritance etc)
Part 2: create enviroments ad run tests
In most cases, only one estimator is affected, and then it is run for the product of python version and OS, with the current primary satisfying environment, i.e., package versios installed satisfyig the estimator's requirements.
2. Detect modified modules using
git
Here's an idea to achieve this from a different discussion:
What I was thinking is very optimistic, and may have other problems. What I was thinking is to do this:
- start CI with a python 3.11+ job, which has
tomllib
.- read current
pyproject.toml
and that frommain
.- specifically compare which sets of dependency specifications vary, which will be available as dictionaries if I am not mistaken.
- identify mismatched specifications.
- identify names of packages from mismatches, and python requirements if any.
- use it to find affected estimators, and affected environments if any.
- trigger CI only for those environment-estimator combinations (related to #5719)
It's very different from the current PR I think, probably not worth considering. We can close this conversation.
_Originally posted by @yarnabrina in https://github.com/sktime/sktime/pull/5727#discussion_r1479231782_
This ideally should work with definite guarantee with correct parsin of only dedidated blocks, but with a slight chance of false positive is already addressed by @fkiraly in #5727 using git diff
.
An orthogonal idea for testing, FYI @yarnabrina:
If I write you python code that retrieves:
Would it be easy to set up CI that runs tests specific to these estimators? Say, if this is controllable via a
pytest
flag?I think this is the only setup that truly scales with number of estimators going to infinity, because ultimately task specific modules will have the same problem of interacting dependency trees.