Repository navigation
Download PETSc from Zenodo, with the DataverseNL mirror as the fallback - #20
Merged
Merged
Conversation
get_petsc.sh fetches the PETSc 3.19.0 source archive from Zenodo 15805756 instead of OSF, falls back to the DataverseNL mirror when Zenodo fails, and accepts only a file with the pinned SHA-256. The mirror URL stays empty until the mirror is published; PETSC_URL and PETSC_MIRROR_URL override the sources.
The PETSc archive is mirrored as DataverseNL 10.34894/BZDJPU (one file, petsc.zip, same bytes as Zenodo 15805756), so get_petsc.sh falls back to that file when the Zenodo download fails or its SHA-256 does not match.
fetch_verified stops before any download when the SHA-256 pin is empty, and curl gives up on a connection or a stalled transfer so the next source is tried.
Merged
8 tasks done
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Checksum-tool availability and the per-test edge-case requirement remain unresolved.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Updates PETSc installation to use verified Zenodo and DataverseNL downloads.
Changes:
- Adds SHA-256 verification and mirror fallback.
- Adds offline download-path tests.
- Updates installer documentation.
| File | Description |
|---|---|
tools/get_petsc.sh |
Implements verified downloads and fallback. |
tests/test_get_petsc.py |
Tests download and integrity behavior. |
.github/copilot-instructions.md |
Documents the new sources. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fetch_verified stops before any download, naming shasum and sha256sum, when neither is installed, instead of failing inside the hash step. The pin assertions are part of the test that stops on a blank pin or a missing hash tool.
timlichtenberg
added a commit
to FormingWorlds/PROTEUS
that referenced
this pull request
Oct 8, 2026
…ck (#965) tools/get_petsc.sh downloads the PETSc 3.19.0 source archive from Zenodo (record 15805756) instead of OSF, checks its SHA-256, and falls back to the DataverseNL copy of the same archive (doi:10.34894/BZDJPU) when Zenodo does not serve it. When neither source serves the pinned file, the script stops and names both. Closes #856. The URL, the mirror and the SHA-256 live in pyproject.toml under [tool.proteus.modules.petsc]; PETSC_URL and PETSC_MIRROR_URL override the two sources. The pins are read before the previous installation is removed, so an unreadable pin leaves the old build in place. SPIDER's copy of the script changes in the same window (FormingWorlds/SPIDER#20).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


tools/get_petsc.shdownloads the PETSc 3.19.0 source archive from Zenodo (record 15805756) instead of OSF, checks its SHA-256, and falls back to the DataverseNL copy of the same archive (doi:10.34894/BZDJPU) when Zenodo does not serve it. When neither source serves the pinned file, or the pin is empty, the script stops and names the cause.PETSC_URLandPETSC_MIRROR_URLoverride the two sources, and curl has connect and stall timeouts.The URL, the mirror and the hash are the same as in PROTEUS, where the same change is FormingWorlds/PROTEUS#965; the two copies change together.
Testing:
tests/test_get_petsc.pyandtests/test_get_petsc_ldflags.pypass (7). WithPETSC_URLpointed at a missing file, the archive comes from DataverseNL with the pinned SHA-256. Tested on macOS (Apple Silicon).