Summary
test/gunw_azimuth_test_data/weather_files/ holds four HRRR weather-model files of ~32 MB each (128 MB total) that are tracked in git even though .gitignore already declares they should not be:
| file |
size |
test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T01_00_00_33N_36N_120W_115W.nc |
32 MB |
test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T02_00_00_33N_36N_120W_115W.nc |
32 MB |
test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_23_T01_00_00_33N_36N_120W_115W.nc |
32 MB |
test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_23_T02_00_00_33N_36N_120W_115W.nc |
32 MB |
.gitignore:29 contains gunw_azimuth_test_data/, and the rule does match these paths:
$ git check-ignore --no-index -v test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T01_00_00_33N_36N_120W_115W.nc
.gitignore:29:gunw_azimuth_test_data/ test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T01_00_00_33N_36N_120W_115W.nc
They are tracked only because tracking overrides .gitignore — they were committed before the rule existed, or force-added. So the repository currently disagrees with its own stated intent.
For scale: tracked .nc files total 340 MB, and these four are 38% of that.
Why this is awkward
Unlike the derived _timeInterp_ products removed in #814, these four are genuine inputs, not byproducts. They are consumed by weather_model_dict_for_azimuth_time_test and weather_model_dict_for_center_time_test in test/conftest.py, which feed test_azimuth_timing_interp_against_center_time_interp in test/test_GUNW.py. They cannot simply be deleted — removing them from the working tree breaks that test, and it is not marked long, so it runs by default.
That is why they were left alone in #814: untracking them needs a way to obtain them, which is a larger change than that PR's scope.
Recommendation
Untrack the four files and fetch them on demand, in this order of preference:
-
Download-on-demand fixture (preferred). Host the four files as a release asset or in an S3 bucket alongside the other test data, and have a session-scoped fixture download-and-cache them into a scratch directory on first use (skipping the test with a clear message when the fetch fails or the network is unavailable). This keeps the repo small, removes the .gitignore contradiction, and makes the provenance explicit. conftest.py already documents how the files were generated, so a regeneration path exists.
-
Git LFS. Simpler to implement and keeps git clone working unchanged, but adds an LFS dependency for all contributors and CI, and LFS bandwidth quotas can bite on a public repo.
-
Mark the test long and untrack. Cheapest, but it removes real coverage of azimuth-time interpolation from the default suite, so I would not recommend it on its own.
Whichever route is chosen, git rm --cached on the four paths is enough to stop tracking them; .gitignore:29 already covers them afterwards, so no ignore change is needed.
Note that untracking does not shrink the repository history on its own — the blobs stay in the object database. Reclaiming that space would need a history rewrite, which is almost certainly not worth it here; the goal is to stop future growth and to make the tree consistent with .gitignore.
Related
Summary
test/gunw_azimuth_test_data/weather_files/holds four HRRR weather-model files of ~32 MB each (128 MB total) that are tracked in git even though.gitignorealready declares they should not be:test/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T01_00_00_33N_36N_120W_115W.nctest/gunw_azimuth_test_data/weather_files/HRRR_2021_07_11_T02_00_00_33N_36N_120W_115W.nctest/gunw_azimuth_test_data/weather_files/HRRR_2021_07_23_T01_00_00_33N_36N_120W_115W.nctest/gunw_azimuth_test_data/weather_files/HRRR_2021_07_23_T02_00_00_33N_36N_120W_115W.nc.gitignore:29containsgunw_azimuth_test_data/, and the rule does match these paths:They are tracked only because tracking overrides
.gitignore— they were committed before the rule existed, or force-added. So the repository currently disagrees with its own stated intent.For scale: tracked
.ncfiles total 340 MB, and these four are 38% of that.Why this is awkward
Unlike the derived
_timeInterp_products removed in #814, these four are genuine inputs, not byproducts. They are consumed byweather_model_dict_for_azimuth_time_testandweather_model_dict_for_center_time_testintest/conftest.py, which feedtest_azimuth_timing_interp_against_center_time_interpintest/test_GUNW.py. They cannot simply be deleted — removing them from the working tree breaks that test, and it is not markedlong, so it runs by default.That is why they were left alone in #814: untracking them needs a way to obtain them, which is a larger change than that PR's scope.
Recommendation
Untrack the four files and fetch them on demand, in this order of preference:
Download-on-demand fixture (preferred). Host the four files as a release asset or in an S3 bucket alongside the other test data, and have a session-scoped fixture download-and-cache them into a scratch directory on first use (skipping the test with a clear message when the fetch fails or the network is unavailable). This keeps the repo small, removes the
.gitignorecontradiction, and makes the provenance explicit.conftest.pyalready documents how the files were generated, so a regeneration path exists.Git LFS. Simpler to implement and keeps
git cloneworking unchanged, but adds an LFS dependency for all contributors and CI, and LFS bandwidth quotas can bite on a public repo.Mark the test
longand untrack. Cheapest, but it removes real coverage of azimuth-time interpolation from the default suite, so I would not recommend it on its own.Whichever route is chosen,
git rm --cachedon the four paths is enough to stop tracking them;.gitignore:29already covers them afterwards, so no ignore change is needed.Note that untracking does not shrink the repository history on its own — the blobs stay in the object database. Reclaiming that space would need a history rewrite, which is almost certainly not worth it here; the goal is to stop future growth and to make the tree consistent with
.gitignore.Related
_timeInterp_GMAO products from version control and redirects test output away from the repo tree via symlinked scratch directories. It deliberately leaves these four input files alone.