spacetelescope / webbpsf

James Webb Space Telescope PSF simulation tool
https://webbpsf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
119 stars 63 forks source link

Check the version number in the WebbPSF data package on startup #76

Closed mperrin closed 6 years ago

mperrin commented 6 years ago

Issue by josePhoenix Tuesday Aug 18, 2015 at 15:21 GMT Originally opened as https://github.com/mperrin/webbpsf/pull/76


Adds a constant in webbpsf.__init__ called DATA_VERSION_MIN to check against, and some logic that runs at import.


josePhoenix included the following code: https://github.com/mperrin/webbpsf/pull/76/commits

mperrin commented 6 years ago

Comment by mperrin Tuesday Aug 18, 2015 at 15:38 GMT


Looks good. Although it breaks the Travis build entirely so my next order of business is updating the minimal-data.tar.gz file.

mperrin commented 6 years ago

Comment by mperrin Tuesday Aug 18, 2015 at 15:39 GMT


Let me know when you've gotten a chance to update the data files on Central Store accordingly and I will update the tar files.

mperrin commented 6 years ago

Comment by josePhoenix Tuesday Aug 18, 2015 at 15:54 GMT


Made the following changes to /itar/jwst/tel/share/webbpsf/webbpsf-data-source:

mperrin commented 6 years ago

Comment by mperrin Tuesday Aug 18, 2015 at 16:18 GMT


I have updated the minimal-data.tar.gz file and kicked Travis to try again. If that works I will put up the new public data tar file so it's ready later whenever the next code release is, or for anyone using master directly from Github, and then merge this.

mperrin commented 6 years ago

Comment by mperrin Tuesday Aug 18, 2015 at 16:23 GMT


Wait, no, even after updating the data files these changes break the code. See https://travis-ci.org/mperrin/webbpsf/jobs/76130411

The issue is all the usages of get_webbpsf_data_path() by the instrument classes in __init__ now fail since the function call is expecting the minimum version tuple. Suggestion: make data_version_min optional, and if it's None then just don't perform that check.

mperrin commented 6 years ago

Comment by josePhoenix Tuesday Aug 18, 2015 at 17:05 GMT


Ah, whoops, serves me right for trying to rush to lunch.

mperrin commented 6 years ago

Comment by josePhoenix Tuesday Oct 27, 2015 at 15:13 GMT


Merging so we can see how this behaves in JupyterHub cc @cslocum