Skip to content

Add caching of CHIANTI files to GHA #262

Open
samaloney wants to merge 8 commits intosunpy:mainfrom
samaloney:task-ci-cache
Open

Add caching of CHIANTI files to GHA #262
samaloney wants to merge 8 commits intosunpy:mainfrom
samaloney:task-ci-cache

Conversation

@samaloney
Copy link
Copy Markdown
Member

@samaloney samaloney commented Apr 16, 2026

PR Description

Use openastronomy GHA templates caching features to cache the CHIANTI files.

So what should ideally happen with this PR is that once it's merge to main it will run and generate the cache entries for each os with keys ending in refs/heads/main e.g. sunpy-data-linux-refs/heads/main then any subsequent run will restore the cache from these keys

AI Assistance Disclosure

AI tools were used for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding
  • No AI tools were used

Regardless of AI use, the human contributor remains fully responsible for correctness, design choices, licensing compatibility, and long-term maintainability.

@samaloney samaloney added the No Changelog Entry Needed Skip all changelog checks. label Apr 16, 2026
Comment thread .github/workflows/ci.yml Outdated
@samaloney
Copy link
Copy Markdown
Member Author

samaloney commented Apr 16, 2026

Since these should not change maybe use broader cache key sunny-data-<os> that way once cached should always be there - or maybe on update to main sunny-data-main-<os> that way they are updated once in while?

Can also maybe cache the same data for the doc builds?

Comment thread .github/workflows/ci.yml
envs: |
- linux: py314
cache-path: $HOME/sunpy/data_manager
cache-key: sunpy-data-linux-${{ github.ref }}
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.

Is there not a github context var for OS name?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Maybe I could use runner.os and have single cache block for the all the envs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nope doesn't have access to the runner info at that stage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Changelog Entry Needed Skip all changelog checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants