[BUG] Running `make test` adds untracked files/folders to sktime directory
Describe the bug
When running the tests using the make test command on local. Untracked dataset folders/files are getting created/downloaded.
To Reproduce
Run make test in the terminal.
make test
git status will show the following additions to the sktime directory:
Untracked files:
(use "git add <file>..." to include in what will be committed)
UnitTest/
sktime/datasets/data/australian_electricity_demand_dataset/
sktime/datasets/data/m4_hourly_dataset/
sktime/datasets/data/solar_10_minutes_dataset/
sktime/datasets/data/wind_4_seconds_dataset/
Expected behavior If no changes have been made to dataset class, tests downloading these files from the internet should not run.
Thanks for reporting!
I suspect this relates to the loaders @jgyasu added recently.
I think they should be decorated with pytest.mark.datadownload, in this case the tests should be skipped, unless tests for downloaders are explicitly requested.
I suspect this relates to the loaders @jgyasu added recently.
I experienced the same even before writing the new loaders, I think we simply missed adding the decorator to this test.
hm, which tests? We need to identify which tests downloads the files, and why they are triggered by the make test full run.
hm, which tests?
Ah, my bad! I meant the tests, not this test, we need to identify them.
Can i take this issue up
Can i take this issue up
Sure! You will need to identify the particular tests which download these files as make test run the entire test suite. I suspect these tests should be in sktime/datasets.
Should I use git-based detection to check if any changes have been made to the dataset?
Hi everyone,
while going through, I found these responsible tests:
test_load_forecastingdata
test_load_forecastingdata_hier
However, they already have @pytest.mark.datadownload, yet running them still leaves the repository with the four untracked dataset directories: sktime/datasets/data/australian_electricity_demand_dataset/
sktime/datasets/data/m4_hourly_dataset/
sktime/datasets/data/solar_10_minutes_dataset/
sktime/datasets/data/wind_4_seconds_dataset/
I also noticed that the dataset CI workflow already separates datadownload tests (-m "datadownload" / -m "not datadownload"), whereas make test runs all tests without a marker filter. Any suggestions, how to proceed?
Current main still has this problem. The download tests are already marked with pytest.mark.datadownload, but the Makefile test target runs python -m pytest without a marker expression. A pytest marker classifies tests; it does not skip them by default. The dataset CI already demonstrates the intended split with -m "not datadownload" and -m "datadownload".
I am preparing a focused fix: the default make test target will pass -m "not datadownload", while full_test will stay unchanged as the explicit all-tests path. I verified that the exclusion deselects all 15 tests in test_datadownload.py, while explicit datadownload selection still collects all 15. I will keep the PR limited to the Makefile unless maintainers prefer a dedicated target.
@Nishthajain7 and @vortex-wq, this builds on your earlier investigation. Please say if either of you already has work in progress so I do not duplicate it.