Repository navigation
Download PETSc from Zenodo, with the DataverseNL mirror as the fallback - #965
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 sources and the hash are pinned in pyproject.toml [tool.proteus.modules.petsc]; the mirror field stays empty until the mirror is published, and PETSC_URL and PETSC_MIRROR_URL override the sources. The download helper fetch_verified lives in tools/_get_common.sh.
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 returns 1 instead of exiting, so the ERR trap of get_petsc.sh prints its troubleshooting text, including the PETSC_URL and PETSC_MIRROR_URL overrides. An empty SHA-256 pin stops before any download, and curl gives up on a connection or a stalled transfer so the next source is tried. The tests pin the Zenodo-then-mirror order, the overrides and the skip of an empty source; the optional-modules page describes the Zenodo download.
get_petsc.sh reads url, mirror and sha256 before it removes the previous installation and stops with the cause when one cannot be read, which needs python 3.11 or newer. The pin page gains a PETSc case (the three values change together, SPIDER holds its own copy, and the mirror can be checked alone with PETSC_URL broken). The test file is formatted with ruff 0.15.18 and its step strings name the current download.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #965 +/- ##
==========================================
- Coverage 93.97% 93.65% -0.33%
==========================================
Files 128 128
Lines 20891 20891
Branches 3515 3666 +151
==========================================
- Hits 19633 19566 -67
- Misses 908 914 +6
- Partials 350 411 +61
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fetch_verified stops before any download, naming shasum and sha256sum, when neither is installed, instead of failing inside the hash step; the test covers it next to the blank-pin case.
timlichtenberg
added a commit
to FormingWorlds/SPIDER
that referenced
this pull request
Oct 8, 2026
…ck (#20) 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, or the pin is empty, the script stops and names the cause. PETSC_URL and PETSC_MIRROR_URL override the two sources, and curl has connect and stall timeouts. The URL, the mirror and the hash are the same as in PROTEUS (FormingWorlds/PROTEUS#965); the two copies change together.
IKisvardai
added a commit
that referenced
this pull request
Oct 9, 2026
Brings in the prescribed orbital migration (#937), the CALLIOPE cold-start seed (#958), the fwl-io dataset fetch and stellar spectra changes (#960, #964, #967, #968), the PETSc download (#965), Zalmoxis Anderson acceleration with fwl-aragog 26.10.08 (#971) and the CI changes (#955, #970). The schema invariant tests keep both the trapping and the migration validators, and the golden trajectory is main's re-recorded one with the trapping columns added.
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.
Description
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, the script stops and names both. Closes #856.pyproject.tomlunder[tool.proteus.modules.petsc]and are read throughtools/_module_pins.py.PETSC_URLandPETSC_MIRROR_URLoverride the two sources.fetch_verifiedintools/_get_common.shtries each source in order with connect and stall timeouts and accepts a file only when its SHA-256 matches. A failed download reaches the troubleshooting text, which names the pins and the overrides.Validation of changes
tests/tools/test_install_scripts.pypasses (111). The tests run the download block with stub tools and check the order of the sources, both overrides, an empty pin, an unreadable pin and the troubleshooting text; accepting a file with any checksum makes 5 of them fail. With the real pins, the Zenodo download has the pinned SHA-256, and withPETSC_URLpointed at a missing file the archive comes from DataverseNL with the same SHA-256 (11,618 files).Tested on macOS (Apple Silicon) with Python 3.12.
Checklist