Skip to content

Adjustments for new productID inventory keyword#549

Merged
Cadair merged 26 commits intoDKISTDC:mainfrom
SolarDrew:productid
Apr 23, 2025
Merged

Adjustments for new productID inventory keyword#549
Cadair merged 26 commits intoDKISTDC:mainfrom
SolarDrew:productid

Conversation

@SolarDrew
Copy link
Contributor

Closes #547

@SolarDrew
Copy link
Contributor Author

We should also regenerate the sample data as part of this PR so the productID gets included in the docstring.

@SolarDrew SolarDrew marked this pull request as ready for review April 3, 2025 09:05
@Cadair
Copy link
Member

Cadair commented Apr 3, 2025

We should also regenerate the sample data as part of this PR so the productID gets included in the docstring.

It seems that not all the ASDF files have been regenerated to add it yet, so no point.

@Cadair
Copy link
Member

Cadair commented Apr 16, 2025

Poking about with search results I noticed that spectralLines is weird:

In [4]: Fido.search(a.Instrument.visp)["dkist"]["spectralLines"]
Out[4]: 
<QueryResponseColumn name='spectralLines' dtype='object' length=300>
                                           None
                                           None
                                           None
                                           None
                                           None
                                           None
                                           None
                                           None
                           ['Fe I (630.25 nm)']
                                           None
                                           None
                           ['Fe I (630.25 nm)']
                           ['Fe I (630.25 nm)']

Looks like we might need to do some post-processing here to make this not-terrible.

@Cadair
Copy link
Member

Cadair commented Apr 16, 2025

Also we should probably add a test which fails if the return columns change so we know to update them. We shouldn't keep un-mapped ones around for long as it's a breaking change when we eventually map them.

Files are stored in ...VISP_BKPLX
<BLANKLINE>
This calibration has Dataset ID BKPLX.
The unique identifier for the input observe frames (Product ID) is (no ProductID).
Copy link
Contributor

Choose a reason for hiding this comment

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

is "(no ProductID)" a placeholder?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Member

Choose a reason for hiding this comment

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

Any metadata ASDFs without a product Id in them will show this

consists of 9 frames.
Files are stored in ...

This calibration has Dataset ID AJQWW and the original frames have Product ID ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Is "..." a placeholder?

Copy link
Member

Choose a reason for hiding this comment

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

Ellipsis in doc tests ignore a section of the output for matching reasons. So in this case we ignore the path so the test isn't hard coded to a specific directory

Copy link
Contributor Author

@SolarDrew SolarDrew left a comment

Choose a reason for hiding this comment

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

Couple of suggestions but otherwise I think this is good to go.

Dataset Status
==============

The status of a Dataset indicates if it's the latest calibration for that Product (``ACTIVE``), if it's an older calibration but still available (``DEPRECATED``) or no longer available (``REMOVED``).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

May not be for this PR but I wonder if there's a way to inject this status into the dataset repr so that it's immediately obvious to users if they're using an old dataset.

Copy link
Member

Choose a reason for hiding this comment

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

yeah we need to do something around that.

Doing that would involve refreshing the dataset inventory record in the meta dict with the latest from the DC like we now do in .download().

@Cadair Cadair merged commit 0f24eee into DKISTDC:main Apr 23, 2025
25 of 26 checks passed
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.

Add new productId field to inventory key translation, and add attr for search

5 participants