Skip to content

Add qualityDataObjectKey to the inventory pretty names - #748

Merged
Cadair merged 2 commits into
DKISTDC:mainfrom
sr-dash:humanize-quality-data-key
Aug 20, 2026
Merged

Cadair merged 2 commits into
DKISTDC:mainfrom
sr-dash:humanize-quality-data-key

Conversation

@sr-dash

@sr-dash sr-dash commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #649.

Adds "qualityDataObjectKey": "Quality Data Filename" to INVENTORY_KEY_MAP, so the key is translated in search results and gets a quality_data_filename path interpolation key, matching the existing qualityReportObjectKey -> "Quality Report Filename".

I checked what the API actually returns for the key before picking the name:

'qualityReportObjectKey' = 'pid_1_123/BDNEK/BDNEK_quality_report.pdf'
'qualityDataObjectKey'   = 'pid_1_123/BDNEK/BDNEK_quality_data.json'

so "Quality Data Filename" seemed like the natural counterpart, but I'm happy to rename it if you'd prefer something that makes the PDF/JSON distinction more explicit.

Extended test_humanize_loop to round-trip the new key rather than adding a separate test, since it's exactly what that test is for. The fixed keymap in test_path_format_table is deliberately untouched — it's independent of INVENTORY_KEY_MAP so adding entries doesn't churn it.

Two things I noticed but left out of scope, tell me if you'd like either as a follow-up:

  • tileCount is also returned by the search API and isn't in INVENTORY_KEY_MAP.
  • DKISTFileManager._download_dataset adds qualityReportObjectKey to the Globus transfer file list; it doesn't add the new quality data file. That's a behaviour change rather than a naming one, so I've not touched it.

@sr-dash
sr-dash force-pushed the humanize-quality-data-key branch from 78c987d to 45eb503 Compare August 6, 2026 22:20

@Cadair Cadair left a comment

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.

Thanks!

The dataset search API now returns qualityDataObjectKey, the object key
of the JSON quality data file, alongside the existing PDF
qualityReportObjectKey. Give it a human readable name so it is
translated in search results and usable as a path interpolation key.

Closes DKISTDC#649
@Cadair
Cadair force-pushed the humanize-quality-data-key branch from 45eb503 to e9698f7 Compare August 20, 2026 13:25
@Cadair
Cadair enabled auto-merge (squash) August 20, 2026 13:28
@Cadair
Cadair merged commit 2876544 into DKISTDC:main Aug 20, 2026
40 of 41 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 qualityDataObjectKey to inventory pretty names

2 participants