Skip to content

CCD-1754 Update logic for reference file location to include full local cache exploration and server queries#1202

Merged
stscieisenhamer merged 5 commits into
spacetelescope:mainfrom
stscieisenhamer:ccd-1754-sync
May 11, 2026
Merged

CCD-1754 Update logic for reference file location to include full local cache exploration and server queries#1202
stscieisenhamer merged 5 commits into
spacetelescope:mainfrom
stscieisenhamer:ccd-1754-sync

Conversation

@stscieisenhamer
Copy link
Copy Markdown
Collaborator

@stscieisenhamer stscieisenhamer commented May 8, 2026

Resolves CCD-1754

This PR addresses a regression introduce by PR#1201, where syncing any references by name, i.e. the --files option, fails. The core issue is the disconnect between reference file retrieval, which can be just a file name, and where that file is in the CRDS database. The current logic was too simplistic and forced reference names into have a specific information in it. This PR adds the ability to derive the needed information from potentially already-existing files in the local cache or a server if present.

Tasks

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
news fragment change types...
  • changes/<PR#>.hst.rst: HST reference files
  • changes/<PR#>.jwst.rst: JWST reference files
  • changes/<PR#>.roman.rst: Roman reference files
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.testing.rst: change to tests or test automation
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

@stscieisenhamer stscieisenhamer self-assigned this May 8, 2026
@stscieisenhamer stscieisenhamer requested a review from a team as a code owner May 8, 2026 19:17
@stscieisenhamer stscieisenhamer requested a review from hbrown-ST May 11, 2026 18:31
@stscieisenhamer
Copy link
Copy Markdown
Collaborator Author

stscieisenhamer commented May 11, 2026

roman regression #1
Result: clean

jwst regression #1
Result: clean (1 unrelated error)

Comment thread crds/jwst/locate.py Outdated
log.verbose('Attempt to contact server for meta information', verbosity=80)

# If there is a server, get the instrument from there.
instrument = api.get_file_info(api.get_default_context(observatory='roman'), os.path.basename(refname))['instrument']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This would want observatory='jwst', no?

@stscieisenhamer stscieisenhamer merged commit 61f3de9 into spacetelescope:main May 11, 2026
10 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.

2 participants