Skip to content

Aliveness Test Script#1692

Open
york-stsci wants to merge 1 commit into
spacetelescope:developfrom
york-stsci:develop
Open

Aliveness Test Script#1692
york-stsci wants to merge 1 commit into
spacetelescope:developfrom
york-stsci:develop

Conversation

@york-stsci

Copy link
Copy Markdown
Collaborator

This change

  • Creates a "URLS" constant in constants.py
  • Adds to that the URLs that are called by active code (i.e. not URLs that are only accessible in links from webpages)
  • Changes existing places that use those URLs (except for MAST, at the moment) to use the entry in constants.py
  • Adds a try/except block to constants.py accessing the STScI schema pages to load instrument schemas, because otherwise if that page is down then the aliveness test won't be able to import constants.py (because it will fail to access that URL) and then won't be able to run its check to tell us that the URL is down.
  • Added an aliveness test script that goes through the URLS constant and attempts to access every site therein

@york-stsci york-stsci self-assigned this Jul 18, 2025

@bhilbert4 bhilbert4 left a comment

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.

Looks good to me. There are a couple hardcoded instances of the URLs in the repo that can be replaced with the new variables from constants.py

Comment thread jwql/utils/constants.py
URLS = {
"CRDS": "https://jwst-crds.stsci.edu",
"DATAMODEL_SCHEMA": "http://stsci.edu/schemas/jwst_datamodel/subarray.schema",
"STSCI_JWST_PHASE2": "https://www.stsci.edu/jwst/phase2-public",

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.

Looks like this URL is used in data_containers.py. Would be good to switch that hardcoded URL to this entry from constants.py

Comment thread jwql/utils/constants.py
"CRDS": "https://jwst-crds.stsci.edu",
"DATAMODEL_SCHEMA": "http://stsci.edu/schemas/jwst_datamodel/subarray.schema",
"STSCI_JWST_PHASE2": "https://www.stsci.edu/jwst/phase2-public",
"STSCI_JWST_PROGRAM_INFO": "https://www.stsci.edu/jwst-program-info",

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.

Looks like this URL is used in data_containers.py (line 2089). Would be good to switch that hardcoded URL to this entry from constants.py

Comment thread jwql/utils/constants.py
"DATAMODEL_SCHEMA": "http://stsci.edu/schemas/jwst_datamodel/subarray.schema",
"STSCI_JWST_PHASE2": "https://www.stsci.edu/jwst/phase2-public",
"STSCI_JWST_PROGRAM_INFO": "https://www.stsci.edu/jwst-program-info",
"STSCI_MAST": "https://mast.stsci.edu/",

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.

Looks like this URL is used in utils.py (line 320) and in claw_monitor.py. Would be good to switch those hardcoded URLs to this entry from constants.py

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