Skip to content

Upstream PR Checklist

s-sasaki-earthsea-wizard edited this page Apr 26, 2026 · 1 revision

Upstream PR Checklist

When considering submitting changes from this fork to insarlab/MintPy, follow the upstream's CONTRIBUTING.md. This page captures what we need on top of (or different from) the conventions used inside this fork.

Before opening a PR

  1. Decide whether the change belongs upstream. Fork-only scaffolding stays here and must not be included in the upstream PR:
    • benchmark/ (per-step --dostep harness, baseline reports, raw *.log / *.time / summary.tsv)
    • The [gpu] extras layout and requirements-gpu.txt as currently structured (the layout is fork-tailored; discuss in an issue before proposing upstream)
    • benchmark/.gitignore (only needed because we track our own .log files)
    • CLAUDE.md, .claude-notes/ (already local-only via .git/info/exclude)
  2. Open a GitHub issue first for new features or behavior changes. Bug fixes and doc updates can skip this. Upstream tracker: https://github.com/insarlab/MintPy/issues.
  3. Add the upstream remote (one-time):
    git remote add upstream https://github.com/insarlab/MintPy.git
    git fetch upstream
  4. Branch from upstream/main, not from our fork's main (ours may carry fork-only commits):
    git fetch upstream
    git checkout -b <feature-name> upstream/main

Branch naming for upstream-bound branches

Upstream's example uses plain descriptive names (e.g. seasonal_fitting) — not the chore/ / feat/ prefixes we use inside this fork. Use the upstream style on upstream-bound branches.

Local checks (run before pushing)

  1. Install pre-commit hooks (one-time):
    uv pip install -e ".[test]"   # brings in pre-commit
    .venv/bin/pre-commit install
  2. Run all hooks until clean:
    .venv/bin/pre-commit run --all-files
    Config: .pre-commit-config.yaml. Notable: check-added-large-files enforces a 20 KB max for newly added non-image files — keep test data tiny.
  3. Run the overall test (~15 min, needs the FernandinaSenDT128 dataset under ${MINTPY_HOME}/FernandinaSenDT128/):
    .venv/bin/python ${MINTPY_HOME}/tests/smallbaselineApp.py

PR scope rules (from upstream)

  • Small + logical collection of changes per PR; split larger work.
  • Do not commit unrelated files (.gitignore, IDE configs, benchmark logs, fork-only docs).
  • Clear PR description: what changed and why.

Commit conventions for upstream-bound commits

  • English, descriptive imperative summary. Examples from git log: Add NISAR loading and auxiliary stack support, bugfix in subset.subset_input_dict2box(), readfile: support \float16` data type via gdal`.
  • The Assisted-by: Claude ... trailer used inside this fork is not upstream policy. Either omit it on upstream-bound commits, or rebase/squash to strip it — verify with git log before pushing.

Syncing the PR branch with upstream

If the branch falls behind upstream/main, rebase (don't merge):

git fetch upstream
git rebase upstream/main
git push --force-with-lease origin <branch>

What does NOT apply to us

Upstream's "never modify main's commit history" rule applies only to those with push rights to insarlab/MintPy. We push to our fork only.

References