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

Reorganize the list of data files for caching #3171

Merged
merged 5 commits into from Apr 17, 2024
Merged

Reorganize the list of data files for caching #3171

merged 5 commits into from Apr 17, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Apr 15, 2024

Due to a likely upstream bug, we can't request multiple tiled grids in a single which call (xref: #3170). We have to call which multiple times and download a single tiled grid in each call, to make the "Cache data" workflow pass again.

I also take this opportunity to address the request in #3144.

Closes #3144.

Edit: With the workaround in PR #3174, now it's OK to download multiple tiled grids. So, this PR only reorganize the list of data files for caching to make it easy to maintain.

@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Apr 15, 2024
@seisman seisman added this to the 0.12.0 milestone Apr 15, 2024
@seisman seisman changed the title CI: Reorganized the list of data files for caching as a workaround for issue #3170 Reorganize the list of data files for caching Apr 16, 2024
@seisman seisman added the skip-changelog Skip adding Pull Request to changelog label Apr 16, 2024
@seisman seisman requested a review from a team April 16, 2024 14:30
@@ -100,4 +89,5 @@ def cache_data():
"@tut_ship.xyz",
"@usgs_quakes_22.txt",
]
which(fname=datasets, download="a")

which(fname=datasets + caches + tiles, download="a")
Copy link
Member

Choose a reason for hiding this comment

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

Can we continue to use just a single list?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can. I just feel that having three separate lists makes it easier to organize the file list.

Copy link
Member

Choose a reason for hiding this comment

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

Well, codecov is warning that there's missing code coverage for the extra two lists 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point to push me to merge them into a single list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 72fcaa1.

pygmt/helpers/caching.py Outdated Show resolved Hide resolved
@@ -100,4 +89,5 @@ def cache_data():
"@tut_ship.xyz",
"@usgs_quakes_22.txt",
]
which(fname=datasets, download="a")

which(fname=datasets + caches + tiles, download="a")
Copy link
Member

Choose a reason for hiding this comment

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

Well, codecov is warning that there's missing code coverage for the extra two lists 🙂

pygmt/helpers/caching.py Outdated Show resolved Hide resolved
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Apr 17, 2024
@seisman seisman merged commit 9da3ea3 into main Apr 17, 2024
22 checks passed
@seisman seisman deleted the caching branch April 17, 2024 16:32
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganize the list of cache files used in CI
2 participants