Skip to content

CLI fixes and updates#4115

Open
rosteen wants to merge 17 commits intospacetelescope:mainfrom
rosteen:deconfigged-cli-load
Open

CLI fixes and updates#4115
rosteen wants to merge 17 commits intospacetelescope:mainfrom
rosteen:deconfigged-cli-load

Conversation

@rosteen
Copy link
Copy Markdown
Collaborator

@rosteen rosteen commented Mar 30, 2026

This enables loading multiple files with format specified through CLI. The user needs to be able to specify the file format for the loader to load files in deconfigged from the CLI. This enables that with a file_format argument, which should be specified for each file, e.g.:

jdaviz --layout=flexible -fp /Users/rosteen/Data/NIRCam/jw02727-o002_t062_nircam_clear-f277w_i2d.fits -ff Image -fp /Users/rosteen/Data/NIRCam/jw02727-o002_t062_nircam_clear-f150w_i2d.fits -ff Image

This PR also fixes the faulty rendering of extra file-browser and file-drop elements above the app when specifying a --layout argument from the command line.

@rosteen rosteen added this to the 4.6 milestone Mar 30, 2026
@rosteen rosteen added the 💤 enhancement New feature or request label Mar 30, 2026
@rosteen rosteen marked this pull request as ready for review March 31, 2026 17:13
@rosteen
Copy link
Copy Markdown
Collaborator Author

rosteen commented Mar 31, 2026

Right now it feels inelegant to have to provide the (keyword argument) file formats all before the (positional argument) filenames, e.g.:

jdaviz --layout=flexible --file_formats=Image --file_formats=Image /Users/rosteen/Data/NIRCam/jw02727-o002_t062_nircam_clear-f277w_i2d.fits /Users/rosteen/Data/NIRCam/jw02727-o002_t062_nircam_clear-f150w_i2d.fits

It might make more sense to change filenames to a keyword argument as well so you could provide each filename/format pair in a sensible order. Thoughts?

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 17.07317% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.53%. Comparing base (41148b8) to head (5f51b3d).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
jdaviz/solara.py 22.58% 24 Missing ⚠️
jdaviz/cli.py 0.00% 10 Missing ⚠️

❌ Your patch check has failed because the patch coverage (17.07%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4115      +/-   ##
==========================================
- Coverage   84.55%   84.53%   -0.02%     
==========================================
  Files         204      204              
  Lines       29833    29979     +146     
==========================================
+ Hits        25225    25344     +119     
- Misses       4608     4635      +27     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rosteen rosteen force-pushed the deconfigged-cli-load branch from b5cd0da to 7e3e19c Compare April 2, 2026 15:15
@rosteen rosteen changed the title Enable loading multiple files with format specified through CLI CLI fixes and updates Apr 2, 2026
Comment on lines +35 to +47
for example, using either the image loader or the catalog loader. The current list of supported file formats is:

* Image
* Catalog
* 1D Spectrum
* 2D Spectrum
* 3D Spectrum
* Ramp
* Ramp Integration
* Subset
* Trace
* Line List
* Footprint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some auto-generated place we can point to for this (perhaps index on the formats page) so we don't risk this getting out-of-date?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to do that. There's definitely an error message that pops up in the UI if a compatible format isn't found listing them all, I'll find where that comes from.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, the list in the formats index page is hard coded as well, not auto generated. I'll link there so at least we only have to update one place.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💤 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants