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

Add utilities to automatically download external data #178

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

WilliamJamieson
Copy link

webbpsf and the galsim catalog data have to be downloaded independently of installing romanisim[test]. These however are required for the tests. I find this rather annoying so, this PR contrives some utilities that download the data if it hasn't been already.

WEBBPSF has the annoying issue that it requires a
manual download of external data fils to be able to
function along with an environment variable set to
point at that data. This is a huge pain, so I am
adding a little utility to check for the environment
variable, set it to the recommended default if it
is not present and then download the data files
if they do not exist. This is done in a way that
the files will persist on disk and not be downloaded
more than once.
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.15%. Comparing base (81028a8) to head (7a0a110).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
romanisim/util.py 97.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
+ Coverage   89.24%   91.15%   +1.91%     
==========================================
  Files          17       16       -1     
  Lines        2073     2137      +64     
==========================================
+ Hits         1850     1948      +98     
+ Misses        223      189      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@schlafly
Copy link
Collaborator

This is going to start running these a few times for every test run? I get a little worried we're going to get rate limited eventually, but maybe that's okay.

I don't understand the build system well, but is there an alternative where the [test] dependency triggers automatically grabbing these files and putting them in some romanisim-specific directory? I'm also a little leery of messing with $HOME/data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants