Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to remote data files while JSOC is unavailable #346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nabobalis
Copy link
Contributor

@nabobalis nabobalis commented Dec 11, 2024

Due to JSOC being down, we have to resort to files online from SSWIDL or making tests as xfail.

@nabobalis nabobalis force-pushed the pointing branch 8 times, most recently from 381a6de to 536ed51 Compare December 11, 2024 20:09
Copy link
Contributor

@wtbarnes wtbarnes left a comment

Choose a reason for hiding this comment

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

I've not left very many useful comments here, but my high-level suggestion would be to refactor this such that get_response_table is unchanged and to instead just pass in the appropriate paths (using the appropriate version number) in the functions that call get_response_table. The same goes for get_error_table.

This is making me realize that all of the logic around how this information is pulled into the higher-level functions is overly complex which is largely my fault. However, this refactor should be independent of what is going on with the JSOC currently.

pyproject.toml Outdated Show resolved Hide resolved
Comment on lines +37 to +46
try:
keys = drms.Client().query(
f"aia.lev1[{(t - 3*u.s).utc.isot}/6s]",
key="T_OBS, HAEX_OBS, HAEY_OBS, HAEZ_OBS",
)
except Exception as e:
msg = "Unable to query the JSOC for SDO location.\n" f"Error message: {e}"
raise OSError(msg) from e
Copy link
Contributor

Choose a reason for hiding this comment

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

This try...except is in multiple places. Could we add a decorator instead that returns some standard error message about the JSOC being down? That would also make it significantly easier to remove all of this logic once it comes back up.

aiapy/psf/psf.py Outdated Show resolved Hide resolved
aiapy/data/_manager.py Outdated Show resolved Hide resolved
Comment on lines +332 to +361
@manager.require("response_table_v10", *URL_HASH_RESPONSE_TABLE[10])
def fetch_response_table_v10():
return manager.get("response_table_v10")


@manager.require("response_table_v9", *URL_HASH_RESPONSE_TABLE[9])
def fetch_response_table_v9():
return manager.get("response_table_v9")


@manager.require("response_table_v8", *URL_HASH_RESPONSE_TABLE[8])
def fetch_response_table_v8():
return manager.get("response_table_v8")


@manager.require("response_table_v7", *URL_HASH_RESPONSE_TABLE[7])
def fetch_response_table_v7():
return manager.get("response_table_v7")


@manager.require("response_table_v6", *URL_HASH_RESPONSE_TABLE[6])
def fetch_response_table_v6():
return manager.get("response_table_v6")


@manager.require("response_table_v4", *URL_HASH_RESPONSE_TABLE[4])
def fetch_response_table_v4():
return manager.get("response_table_v4")


@manager.require("response_table_v3", *URL_HASH_RESPONSE_TABLE[3])
def fetch_response_table_v3():
return manager.get("response_table_v3")


@manager.require("response_table_v2", *URL_HASH_RESPONSE_TABLE[2])
def fetch_response_table_v2():
return manager.get("response_table_v2")
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is what is necessary to use the data manager for these files, then I think we should not use the data manager. We could always use it later using the delayed aspect that will make it into 6.1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well the issue is that I don't know how best to handle having 8 different versions of the file depending on user input.

@nabobalis nabobalis force-pushed the pointing branch 2 times, most recently from 0cde18c to fafdbb8 Compare December 17, 2024 01:23
@nabobalis nabobalis changed the title Pointing table Fallback to remote data files while JSOC is unavailable Dec 17, 2024
@LM-SAL LM-SAL deleted a comment from sourcery-ai bot Dec 17, 2024
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