Skip to content

chore: add quantecon/ fork maintenance tooling#14

Merged
mmcky merged 8 commits into
mainfrom
quantecon/fork-maintenance
May 7, 2026
Merged

chore: add quantecon/ fork maintenance tooling#14
mmcky merged 8 commits into
mainfrom
quantecon/fork-maintenance

Conversation

@mmcky
Copy link
Copy Markdown

@mmcky mmcky commented May 6, 2026

Summary

Adds a quantecon/ folder with tooling to manage this fork while QuantEcon patches are awaiting upstream review.

Files added

quantecon/features.txt — Registry of active carry-patches (feature branches). One branch per line with an optional comment linking to the upstream PR.

quantecon/build.sh — Rebuilds the quantecon integration branch:

  1. Fast-forwards local main from origin/main
  2. Resets quantecon to main
  3. Merges each feature branch from features.txt in order (--no-ff)
  4. Patches packages/mystmd/src/version.ts to append -qe to the version (e.g. 1.9.0-qe), so myst --version identifies the QuantEcon build
  5. Optionally pushes to origin/quantecon with --push

Merge conflicts abort cleanly with actionable instructions — conflicts are always resolved on the feature branch, never on the throwaway quantecon branch.

quantecon/README.md — Documents the full branching model, sync workflow, conflict resolution strategy, and what to do when upstream finally merges a patch.

README change

Adds a warning banner to the top-level README.md identifying this as the QuantEcon fork and pointing to the official upstream project.

Usage

# Add your feature branch to quantecon/features.txt, then:
./quantecon/build.sh --push

⚠️ Action required after merging

Disable the Release and Publish GitHub Release GitHub Actions workflows on this fork via Settings → Actions → Workflows to prevent accidental npm/PyPI publishes.

- Add quantecon/build.sh — rebuilds the `quantecon` integration branch
  by merging all active feature branches on top of `main`, then patches
  the version string with a `-qe` suffix so `myst --version` identifies
  the QuantEcon build.
- Add quantecon/features.txt — registry of active carry-patches.
- Add quantecon/README.md — documents the branching model, sync workflow,
  and conflict resolution strategy.
- Add warning banner to README.md identifying this as the QuantEcon fork.
Copilot AI review requested due to automatic review settings May 6, 2026 22:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds QuantEcon-specific fork maintenance tooling to keep a “carry-patches” integration branch (quantecon) up to date while upstream PRs are pending, and clearly labels the repository as a fork.

Changes:

  • Add a quantecon/ folder containing a rebuild script (build.sh), patch registry (features.txt), and workflow documentation (README.md).
  • Add a top-level README warning banner pointing users to the upstream jupyter-book/mystmd project.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
README.md Adds a warning banner indicating this is the QuantEcon fork and links to upstream.
quantecon/README.md Documents the fork branching model and rebuild workflow for the integration branch.
quantecon/features.txt Introduces the ordered list/registry of carry-patch feature branches.
quantecon/build.sh Adds an automation script to rebuild the quantecon integration branch from main + listed feature branches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread quantecon/build.sh Outdated
Comment thread quantecon/build.sh Outdated
Comment thread quantecon/build.sh
Comment thread quantecon/build.sh Outdated
Comment thread quantecon/README.md Outdated
mmcky added 6 commits May 7, 2026 08:56
Only the quantecon/ folder belongs on main. Workflow disabling is handled
via the GitHub UI; README banner is unnecessary given the fork name.
- Use awk for features.txt parsing (POSIX-safe, replaces non-portable \s grep)
- Add git fetch origin before ff-only merge so refs are current
- Create local tracking branch for origin-only feature branches before merging
- Fail hard (not warn) if main cannot be fast-forwarded
- Patch packages/mystmd/package.json version instead of gitignored version.ts;
  copy:version propagates the version at build time
- Update README to reflect correct version patching mechanism
- Update diagram and branching model table
- New 'Develop a new feature' section uses 'git checkout -b ... upstream/main'
- Add migration section for existing branches that include quantecon/ commits
  (git rebase --onto upstream/main main)
- Update keep-current and conflict-resolution sections to use upstream/main
- Explain why this works (git merges changes, not full trees)
@mmcky
Copy link
Copy Markdown
Author

mmcky commented May 7, 2026

Summary of updates since initial review

Scope reduced — PR now adds only the quantecon/ folder. README banner and workflow disabling were dropped to keep main a pristine upstream mirror (those concerns are addressed via the GitHub UI: workflow disabling + branch protection rules).

Copilot review feedback addressed (5 threads):

  • POSIX-portable awk parsing of features.txt (replaces non-portable grep \s)
  • git fetch origin added before the --ff-only merge; failure is now hard, not a warning
  • Local tracking branches created for any feature branch found only on origin
  • Version patching now targets packages/mystmd/package.json (the gitignored src/version.ts is regenerated by copy:version at build time)
  • README updated to match

Workflow refinement — feature branches should be created from upstream/main (not main), so the upstream PR diff doesn't include the quantecon/ folder. Documented in quantecon/README.md, with a migration recipe for existing branches.

After merging

  1. Apply the migration recipe to existing feature branches (e.g. PR CommonMark ipynb export + image attachment embedding #1) to drop quantecon/ from their history:
    git rebase --onto upstream/main main
    git push --force-with-lease origin <branch>
  2. Add branch protection rules per quantecon/README.md (already done by @mmcky)
  3. Disable workflows: Release, Publish GitHub Release, Deploy Docs, Update and Check Pull Request Labels (already done by @mmcky)

@mmcky mmcky added the maintenance Maintenance tasks on the repository label May 7, 2026
@mmcky mmcky merged commit e196aa7 into main May 7, 2026
5 checks passed
@mmcky mmcky deleted the quantecon/fork-maintenance branch May 7, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance tasks on the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants