Add support for Astra model files#96
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for additional Astra model spectra products and augments Astra pipeline metadata so clients can tell whether a product file exists and whether it contains any data, alongside dependency/runtime bumps intended to support newer library versions (notably NumPy/Astropy).
Changes:
- Extend the model spectra datamodel JSON to include Astra
astraStar*andastraVisit*products. - Update Astra pipeline metadata (
get_pipe_meta) to include ahas_dataflag per product and to only include files with data in the returned file list. - Bump runtime/dependency requirements (Python >= 3.11, Astropy >= 7.2) and adjust byte-order handling in spectral extraction for NumPy 2.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| python/valis/io/spectra.py | Updates endianness handling when extracting spectral arrays (NumPy 2 compatibility). |
| python/valis/io/model_spectra_info.json | Adds datamodel entries for new Astra model file products. |
| python/valis/db/queries.py | Expands Astra products returned by get_pipe_meta and adds has_data detection via FITS inspection; adjusts path-existence behavior for BOSS/APOGEE. |
| python/valis/db/models.py | Adds has_data to the Astra product response model. |
| pyproject.toml | Raises minimum Python version and bumps Astropy dependency floor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think this is ready for review and merging. The tests are failing because of this issue in pylama. Not sure if pylama is used in valis, and it seems it has not seen any releases in 4 years. |
Not directly. It's a dev dependency from linting/testing. You can try removing it from the pyproject.toml file and see if things pass. Some of those dev deps are from back in the |
|
I removed pylama. Ruff produces 103 errors, most of them line lengths and import order which are probably easy to fix, but that seems like a different PR. I had to change |
Yeah that can be a different PR.
Interesting. Likely so. As long as the test still passes. |
astraVisit[pipeline]andastraStar[pipeline]model files.AstraProductsto indicate files that exist but don't have data.Currently the
uv.lockfile is out of date because dependency resolution fails due to an incompatibility between thesolaraversions insdss-solaraandsdss-explorer.