docs(quantecon): cherry-pick upstream model, batched tags#30
Merged
Conversation
Replace the "preserve feature branch, push as upstream PR" workflow
with "delete feature branch after merge; cherry-pick main squash
commits onto a fresh branch off upstream/main when upstreaming."
Why:
- Feature branches that depend on prior QuantEcon-only features were
awkward to branch from upstream/main (had to carry the dependency
inline or wait for it to upstream first).
- Branching from main lets dependencies just work; the squash commit
on main is already the upstream-ready artifact.
- Cherry-picking at upstream-PR time lets us bundle related squashes
into a coherent story ("book mode + section scope") when that's the
right unit for upstream review, or split them.
Tagging also moves from per-PR to batched: a `qe-vN` tag is cut at a
checkpoint covering multiple features, not on each merge.
Updates the diagram, branching-model table, "Develop a new feature",
"Opening an upstream PR" (now cherry-pick-driven), "When upstream
merges", "Resolving merge conflicts between features", and the
VERSION.yml comment block. Adds an `upstream/<topic>` branch type to
the branching model.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates QuantEcon fork-maintenance documentation to reflect a workflow shift toward short-lived feature branches, upstream PR preparation via cherry-picking main squash commits onto upstream/<topic>, and batching qe-vN tags at checkpoints (rather than per merged PR).
Changes:
- Revise branching model documentation (feature branches off
origin/main, upstream PR branches offupstream/mainvia cherry-pick). - Update upstreaming instructions (new “Opening an upstream PR” section and simplified post-upstream-merge steps).
- Clarify
qe-vNtagging as batched checkpoints in bothREADME.mdandVERSION.yml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
quantecon/README.md |
Updates the maintenance guide to the cherry-pick upstreaming model and batched tagging guidance. |
quantecon/VERSION.yml |
Updates the header comment to describe checkpoint-based tagging and per-PR feature recording. |
Comments suppressed due to low confidence (3)
quantecon/VERSION.yml:15
- "tag may be set later once the next
qe-v<N>cuts" is ambiguous/off-by-one (for a newly merged feature, the tag will be set when a newqe-v…tag is cut, i.e.qe-v<N+1>relative to the previous tag). Suggest rephrasing to something like "once the nextqe-vtag is cut" or "onceqe-v<N+1>is cut" to avoid confusion when following the workflow.
# Per-PR landing only adds the feature to `merged_features` with its squash
# `merge_sha`; `tag` may be set later once the next `qe-v<N>` cuts.
quantecon/README.md:16
- In the "cut a tag" instructions, step 3 says to "Append each newly-included feature to
merged_features", but later the README relies onmerged_featuresalready containing each feature'smerge_shaat upstream-PR time. This reads as two different sources of truth (record features at merge-time vs at tag-time) and could cause duplicated/missing entries. Consider updating step 3 to reflect the intended model (e.g., per-PR: add entry withmerge_sha; per-tag: bumpqe_versionand set/back-filltagon the already-merged entries).
Tags are cut at meaningful checkpoints, **not per-PR** — typically when a batch of features is ready for downstream dogfooding. To cut a tag:
1. Pick the `main` commit at the head of the batch
2. Tag it: `git tag qe-v<N+1> <sha> -m "qe-v<N+1>: <summary of features included>"` then `git push origin qe-v<N+1>`
3. Append each newly-included feature to `merged_features` in `VERSION.yml` and bump `qe_version`
quantecon/README.md:162
- In this conflict-resolution rebase snippet,
origin/mainmay be stale unless the user has fetched recently. Other snippets in this doc include an explicitgit fetch originfirst; consider adding it here as well so the instructions reliably rebase onto the latestmain.
```bash
git checkout feature/<later>
git rebase origin/main
# resolve conflicts, git add, git rebase --continue
git push --force-with-lease origin feature/<later>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ERSION.yml Two tracker files now record orthogonal facts, cross-referenced by squash-commit SHA: - VERSION.yml answers "what's in our main?" — diagnostic identifier for the integration build. Drops its `upstream:` block (was an always-`pending` placeholder). - UPSTREAM-PRS.yml answers "how do we plan to ship those squash commits upstream?" — bundles related squashes into logical upstream PR candidates (so a feature spanning multiple commits, or two features that form one upstream story, can be tracked as a single unit), records dependency order for cherry-pick, tracks status. Seeds UPSTREAM-PRS.yml with three candidates: myst-to-ipynb (#16), book-mode-with-section-scope (#22 + #28, bundled — they form one coherent upstream story since #28 builds on #22's auto-prefix hooks), and book-parts (#26, planned). Adds the missing book-proof-scope entry to VERSION.yml's merged_features. README updated to partition the two files' roles and reference UPSTREAM-PRS.yml from the cherry-pick workflow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- VERSION.yml header: remove double-accounting in the tag-cut steps. Per-PR landing already appends each feature to merged_features with tag: null; the tag-cut workflow just *sets* the tag field on those pre-existing entries and bumps qe_version. The old wording said "Append each newly-included feature" which contradicted the per-PR-landing description below it. - README "About this folder": the allow-list now contains README.md, VERSION.yml, UPSTREAM-PRS.yml, and .gitignore itself — the original text only mentioned the first two. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Two related doc / tracker updates so the fork-maintenance docs match how we actually work:
1. Cherry-pick upstream model (commit
5a1d455a)Updates
quantecon/README.mdandquantecon/VERSION.ymlto reflect two model shifts:origin/main, open PR, squash-merge, delete branch. The squash commit onmainis the canonical artifact.mainsquash commits onto a freshupstream/<topic>branch offupstream/main. Lets us bundle related features into a coherent upstream story (e.g. PR Book-style numbering: format, label, section-tagged TOC, auto-prefix #22 + feat(book): section-level scope for proof:* / figure / equation auto-prefix #28 as "book mode + section scope") or split them per upstream maintainer preference.qe-vNis cut at a checkpoint covering several merged features, not on each merge.2. UPSTREAM-PRS.yml tracker (commit
22c057b0)Adds a new tracked file
quantecon/UPSTREAM-PRS.ymlfor planning howmainsquash commits bundle into upstream PRs. The two tracker files now have crisp, orthogonal roles (cross-referenced by squash SHA):VERSION.ymlmainright now? (diagnostic / build identifier)UPSTREAM-PRS.ymlSeeds
UPSTREAM-PRS.ymlwith three candidates:myst-to-ipynb— feat(ipynb): CommonMark ipynb export + image attachment embedding #16, self-containedbook-mode-with-section-scope— Book-style numbering: format, label, section-tagged TOC, auto-prefix #22 + feat(book): section-level scope for proof:* / figure / equation auto-prefix #28 bundled (feat(book): section-level scope for proof:* / figure / equation auto-prefix #28 builds on Book-style numbering: format, label, section-tagged TOC, auto-prefix #22's auto-prefix hooks; reviewing them together saves upstream a confused pass)book-parts— Book parts: section: parts dividers with Roman labels #26, planned (still open against our main)Also drops the
upstream:block from eachVERSION.ymlmerged_featuresentry (was alwayspendingplaceholder, now lives in UPSTREAM-PRS.yml) and adds the missingbook-proof-scope(#28) entry there.Why
upstream/main, keep alive, push as upstream PR" workflow was awkward when features depended on prior QuantEcon-only features (e.g. feat(book): section-level scope for proof:* / figure / equation auto-prefix #28 building on Book-style numbering: format, label, section-tagged TOC, auto-prefix #22 — couldn't reasonably branch fromupstream/mainsince Book-style numbering: format, label, section-tagged TOC, auto-prefix #22 wasn't there yet).mainlets dependencies just work; the squash commit onmainis exactly what an upstream PR would show anyway.mainsquash commits (the original PR + a follow-up Copilot-fix PR), and bundles of features sometimes form one upstream story. UPSTREAM-PRS.yml captures both cases naturally; VERSION.yml's flatmerged_featurescould not.Test plan
quantecon/PLAN.mdstays gitignored (verified withgit check-ignore)UPSTREAM-PRS.ymladded to.gitignoreallow-listNo code changes, no behaviour changes — pure docs / tracker update.
🤖 Generated with Claude Code