-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utils to cleanup docs downloads #2384
Conversation
cc @pllim - let me know if you think this would be useful upstream, too. |
Codecov Report
@@ Coverage Diff @@
## main #2384 +/- ##
==========================================
+ Coverage 63.29% 63.31% +0.01%
==========================================
Files 132 133 +1
Lines 17256 17271 +15
==========================================
+ Hits 10923 10935 +12
- Misses 6333 6336 +3
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
fec0444
to
9283715
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While convenient, this does make the cleanup less explicit in the doc itself and the rmtree
might accidentally remove things we want to keep if someone pass the wrong input to the function? Still, maybe worth bringing up at the next infrastructure tag-up; do you want to add it to the agenda?
If we decide to move this upstream, maybe over at... pytest-doctestplus or sphinx-astropy ?
Yeah, I'm not that much worried about the misuse of it, folks would notice if something from the git tree is removed accidentally before committing it, and users shouldn't use the function. |
Why don't you add it to astroquery for now and we can always move it upstream later? Then, the upstream decision won't hold off this work for astroquery. Thanks for the ping! |
I need to add this to astroquery even in the case it ends up upstream, as we cannot just bump the required version numbers for the dependencies. So it's more like a heads up to see whether it maybe useful for others. If not, then I would rather keep and maintain it here permanently. |
After a pytest run I ended up with a lot of files yet again, so dived into adding
testcleanup
to the end of the offending narrative docs. Rather than repeating the same code for all of them I opted for adding a new utilitycleanup_saved_downloads
. I'm open for suggestions if anyone has a better idea for naming it or for its namespace.This is to address some parts of #2058