Instruction file imported from stac-utils/pgstac (
.github/instructions/scripts.instructions.md). Copyright stays with the author.
Build Scripts
See CLAUDE.md "Development Workflow" for usage. All scripts require the Docker compose environment.
runinpypgstacis the foundation — most scripts delegate to itloadsampledatahas a host wrapper atscripts/loadsampledata; prefer that wrapper over callingruninpypgstacdirectlyruninpypgstacuses the published-package path by default; setPGPKG_LOCAL_REPO_DIRto mount a localpgpkgcheckout at/pgpkgwhen you need an overridescripts/container-scripts/contains the in-container script payload copied into the pypgstac image; keep host wrappers inscripts/stageversionmodifies version files AND generates migrations — see CLAUDE.md "Migration Process"stageversionregenerates*unreleased*migrations each run; if you hand-edit incremental SQL, rebuild the baked artifact withuv run --directory src/pgstac-migrate pgstac-migrate build-artifactand avoid rerunningstageversionunless you intend to overwrite editsscripts/container-scripts/stageversionandscripts/container-scripts/makemigrationnow shell throughpgpkginside the container rather than assembling/diffing SQL directly- Set
PGPKG_LOCAL_REPO_DIRon the host when you need to force a local pgpkg checkout forstageversion,makemigration, or related container-script testing - Tagged releases run
.github/workflows/release.yml, which publishespgstac-migrateandpypgstac-rsto PyPI via the GitHubpypienvironment (and the Rust crate to crates.io); PyPI trusted publishers must exist for both projects - DO NOT run
stageversionwithout understanding its side effects