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

SPICE - Download and cache kernel files #792

Closed
Tracked by #975
subagonsouth opened this issue Aug 28, 2024 · 1 comment
Closed
Tracked by #975

SPICE - Download and cache kernel files #792

subagonsouth opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
SPICE Related to SPICE

Comments

@subagonsouth
Copy link
Contributor

subagonsouth commented Aug 28, 2024

Algorithm Description:

In order to be able to run processing locally, it is desirable to have some code that will download kernels to a cache location so that they can be furnished from there. There are multiple sources to download from including IMAP SDC and NAIF website.

Proposed general SPICE workflow:

  • Try to furnish the latest metakernel
    • Catch any spiceypy.utils.exceptions.NotFoundError exceptions and
      1. Try to download the kernel from IMAP spice files
      2. If 1. fails, try to download the kernel from NAIF
    • Once we are able to furnish the full metakerel, processing should have everything it needs
    • A more proactive solution would be to parse the metakernel and check for existence of the kernel files
    • One issue is that all downloads will need to exactly match the metakernel directory structure. How can we accomplish this in the production EFS mount?

Questions to figure out:

  • How will this work alongside kernels that are checked in to the repo as test data? For example, do we manually furnish each kernel or keep the current scheme where there is a template metakernel that gets modified with correct local paths at test run time?

Requirements:

  • Files should be downloaded to where environment variable IMAP_SPICE_DIR points if files don't already exist there.
  • Setup spice tests with @pytest.mark.spice to they can easily be avoided in CI jobs

Code:

Reference/reuse Libera code for doing this here: https://lasp.colorado.edu/nucleus/projects/LIBSDC/repos/libera_utils/browse/libera_utils/spice_utils.py

@subagonsouth subagonsouth added the SPICE Related to SPICE label Aug 28, 2024
@subagonsouth subagonsouth self-assigned this Aug 28, 2024
@subagonsouth subagonsouth changed the title Download and cache kernel files SPICE - Download and cache kernel files Aug 28, 2024
@subagonsouth subagonsouth added this to the Sept 2024 milestone Sep 6, 2024
@subagonsouth subagonsouth moved this to In Progress in IMAP Sep 10, 2024
@subagonsouth
Copy link
Contributor Author

It was decided that this ticket as described might be too much. The final implementation was to add test fixtures that can download files from NAIF if needed and only if the tests marked with external_kernel are run.

@subagonsouth subagonsouth moved this from In Progress to Done in IMAP Sep 16, 2024
@tech3371 tech3371 modified the milestones: Sept 2024, Oct 2024 Sep 30, 2024
@bourque bourque removed this from the Sept 2024 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SPICE Related to SPICE
Projects
Status: Done
Development

No branches or pull requests

3 participants