Skip to content
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

Merged
merged 7 commits into from
May 2, 2022

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Apr 29, 2022

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 utility cleanup_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

@pep8speaks
Copy link

pep8speaks commented Apr 29, 2022

Hello @bsipocz! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-04-29 06:26:57 UTC

@bsipocz
Copy link
Member Author

bsipocz commented Apr 29, 2022

cc @pllim - let me know if you think this would be useful upstream, too.

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #2384 (fec0444) into main (d40d316) will increase coverage by 0.01%.
The diff coverage is 80.00%.

❗ Current head fec0444 differs from pull request most recent head 9283715. Consider uploading reports for the commit 9283715 to get more accurate results

@@            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     
Impacted Files Coverage Δ
astroquery/utils/cleanup_downloads.py 80.00% <80.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bsipocz bsipocz changed the title Utils cleanup docs downloads Utils to cleanup docs downloads Apr 29, 2022
@bsipocz bsipocz force-pushed the utils_cleanup_docs_downloads branch from fec0444 to 9283715 Compare April 29, 2022 06:26
Copy link
Member

@pllim pllim left a 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 ?

@bsipocz
Copy link
Member Author

bsipocz commented Apr 29, 2022

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.
I just very much like to have something short and simple and copy pasteable for the modules than having to work around it separately.

@pllim
Copy link
Member

pllim commented Apr 29, 2022

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!

@bsipocz
Copy link
Member Author

bsipocz commented Apr 29, 2022

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.

@bsipocz bsipocz merged commit 105d232 into astropy:main May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants