Repository navigation
Description
Summary
Build a qe command-line tool with a gh module to manage GitHub
configuration for QuantEcon repositories — starting with labels. The tool
should hold a schema of the labels we use as a single source of truth, and
provide tooling to apply that schema to a given repo (and across repos).
The label set below is a starting point only. We will run team-focused
surveys to decide the best set before treating any of it as final.
Motivation
Labels have drifted badly across our lecture repos — roughly 70 distinct label
names across six repos (lecture-python-intro, lecture-python-programming,
lecture-python.myst, lecture-python-advanced.myst, lecture-dp,
lecture-jax), with only bug, in-work, and ready present in all six. There
are near-duplicate variants (automated issue / automated-issue / automated,
linkchecker / broken-links, high-priority / high priority), redundant
triple-tagging by bots, and stale one-off project labels.
We want one shared, consistent vocabulary and a repeatable way to apply and
audit it, owned by a first-party tool rather than ad-hoc scripts or a
third-party action.
Proposal: qe gh labels
A standalone Python CLI that shells out to gh for all GitHub calls, so
it inherits existing gh auth (no PAT to store or rotate) and keeps GitHub's own
CLI doing the API work.
qe gh labels sync # apply the schema to one/many repos (--repos --prune --dry-run)
qe gh labels check # read-only drift report; non-zero exit if a repo diverges (CI-friendly)
qe gh labels export # dump a repo's current labels to a schema file (bootstrap / backup)
1. A label schema (single source of truth)
A version-controlled manifest — list of labels with name, color,
description, and optional aliases (old names to rename from, preserving
the issue/PR tags on existing items). Example shape:
- name: "enhancement"
color: "a2eeef"
description: "New content or an improvement to existing material"
aliases: ["improve", "new lecture", "lecture"]2. Tooling to apply it to a repo
Per label, per repo: update if the canonical name exists; else rename the first
existing alias (history-preserving); else create. With --prune, labels not in
the schema (and not consumed as an alias) are removed, so a repo converges to
exactly the schema. --dry-run previews every change.
Starting-point label set (PROVISIONAL — pending team surveys)
A 16-label set proposed as a discussion starting point, grouped by dimension.
Colour conveys meaning where useful (priority = heat scale, automation = grey);
the PR lifecycle (WIP → ready → in review) is left to native GitHub PR
features (Draft → Ready for review → review state) rather than labels.
| Group | Labels |
|---|---|
| Type | bug, enhancement, documentation, maintenance, question |
| Community | good first issue, help wanted |
| Priority | high-priority, low-priority (unlabelled = normal) |
| Workflow | do-not-merge |
| Automation/CI | automated, broken-links, build-failure, dependencies |
| Meta | duplicate, wontfix |
This is a conversation starter, not a decision. The point of the schema +
tooling is that whatever the team lands on becomes trivial to apply everywhere.
Open questions for the team
- What is the right label set? Run a short survey of maintainers across the
lecture repos. Which dimensions matter (type / priority / area / status)? Do we
want anarea:*split (content vs code)? Keep areadylabel, or rely on the
native Review-requested dashboard? - Scope of the schema — one global set for all lecture repos, or a base set
plus per-repo extensions? - Automation contract — our label-applying actions (
action-link-checker,
action-check-warnings,action-style-guide) should emit only canonical
labels; fold this check intoqe gh bots checklater. - Distribution —
uv tool install/pipxfrom a newQuantEcon/qe-cli?
Suggested next steps
- Agree this direction and create
QuantEcon/qe-cli. - Define the schema format and commit a first
labels.yml(the provisional
set above, explicitly marked draft). - Implement
qe gh labels sync/check/exportwith--dry-run. - Run a maintainer survey to finalise the label set.
- Apply the agreed schema across all lecture repos; wire
checkinto CI as a
drift guard.
Context: this consolidates a label-unification audit + proposal already drafted
(full inventory, migration map, and a working reference implementation of the
sync engine). Happy to attach those to the qe-cli repo once it exists.
Activity
mmcky commentedon Jun 9, 2026
Extending the scope: repo settings and profiles
Labels are really one instance of a more general need — keeping a class of repos
configured consistently. Two additions worth designing for from the start:
1. Manage repo settings too, not just labels. Things we want uniform across
lecture repos but currently set by hand (and forget on new repos):
delete-branch-on-merge)mainMost of these are one
gh repo editflag away (--delete-branch-on-merge,--enable-squash-merge,--enable-merge-commit,--enable-issues, …), and therest are
gh apicalls — so they fit the same "shell out togh" design as thelabel tooling.
2. A "QuantEcon profile" per repo type. Rather than configure each repo
individually, define named presets keyed to repo type and apply them:
A profile is just a composition of the building blocks: a label schema +
repo settings (+ later: dependabot config, standard workflows, branch
protection). For example:
lecturessoftwarebreaking,semver:*, review labels)maindependenciesdependenciesCandidate types:
lectures,software, maybebookandtranslation.How it composes. The label schema we're defining here becomes the
labels:section of thelecturesprofile — nothing is thrown away, it justgains a home alongside the other settings. Profiles live in
qe-cliasversion-controlled YAML, so "what does a QuantEcon lecture repo look like" is a
single reviewable file, and
qe gh profile applymakes onboarding a new repo (orre-aligning an old one) a one-liner.
Suggested command surface, building on the
qe gh labelscommands above:Same caveats as labels apply:
--dry-runfirst, profiles are the agreed teamstandard (subject to the same surveys), and per-type so we don't force one shape
on every repo.
mmcky commentedon Jun 10, 2026
Complete catalogue: label-related resources across QuantEcon
An audit of the whole organisation (issues, PRs, org settings, docs, code) so
this issue can act as the single consolidation point — we resolve once, then
tidy everything against the decision.
1. Issues & PRs — the discussion history
scripts/apply-unified-labels.py, implementation guide. Branch deleted; files only on PR head commite14896f. Nothing landed onmain.status:/priority:/skill:prefixes,contenttype), wider repo scope (incl.lecture-julia.myst,lecture-datascience.myst,QuantEcon.py,QuantEcon.jl, themes, action repos), 3-phase rollout plan.qeCLI with schema + tooling, plus the repo-settings / profiles extension in the comment above.quantecon-github-tags.png) once the set is final.Four open issues currently cover overlapping ground: #178, #290, #323, manual#90.
2. Live org-level configuration
They auto-apply to new repos only. Evidence of the current set:
lecture-dp(created 2026-01-14) inherited exactly these 13:blocked,bug,duplicate,editor,good first issue,help wanted,high priority,in-work,maintenance,question,ready,testing,wontfix.(
high prioritywith a space; status labels). Whatever set we decide, theorg defaults must be updated to match — otherwise every new repo
reintroduces drift on day one.
3. Tooling that APPLIES labels (must conform to the final set)
action-link-checkerbug, documentation, broken-links(older configs:report, automated issue, linkchecker)action-check-warningsbug, execution, python-warningsaction-style-guideautomated, style-guide, reviewdependencies,github_actions,conda4. Tooling with its OWN label namespace (suggest: leave project-owned)
action-translationtranslate,translate:{category},translate:{language},translation-sync-failure,auto-merged, … (targets translation fork repos)contractor-paymentstimesheet,milestone-invoice,reimbursement,pending-review,parse-error,submit,submission,processed(scripts/setup_labels.py). Its onboarding script also setsdelete_branch_on_merge=true— existing prior art for the "profiles" idea above.5. Tooling that READS labels (benefits from standardization)
action-weekly-report—merged PR QuantEcon/action-weekly-report#2 groups merged PRs by label in
its highlights template (the motivating automation case in Standardized Labels for QuantEcon Repositories #290).
6. Sync implementations — three generations exist
apply-unified-labels.py(36-label set)e14896fapply-labels.sh+ a composite-action prototype (manifest withaliasesfor history-preserving renames,--prune,--dry-run)qe gh labels sync / check / export(Python/Typer)qeCLI v07. The substantive decision the team survey must settle
#290 and this issue's starting set disagree on exactly two things (everything
else is reconcilable naming):
status: in-work / ready / blocked / testingdo-not-mergeskill: editor,skill: domainstatus:priority:skill:automated,broken-links,build-failure,dependencies8. Suggested tidy-up once a decision lands
a pointer here; keep manual#90 as the docs-update task.
qe gh labels sync;quantecon-github-tags.png(closes manual#90).the drafted sync tooling into
qe-cli.mmcky commentedon Jun 10, 2026
Proposed QuantEcon label set — 18 labels, with rationale
Distilled from all the resources catalogued above (the 6-repo audit, #178, #290,
the Aug-2025 org defaults, and this issue). The three points where earlier
proposals disagreed are resolved as follows:
editorlabel (the QuantEcon-specificfinal editor sign-off queue — already in the org defaults). Ordinary review
uses native Draft → Ready for review → review requests.
in-work,blocked,testing): dropped in favour ofnative GitHub features (Draft PRs, linked blocking issues,
do-not-merge).skill: domain): dropped —help wantedplus a commentnaming the expertise covers it.
Design principles: small enough to memorise; unlabelled = "needs triage, normal
priority"; one concept one label; colour carries meaning (priority = heat
scale, automation = quiet grey,
editor= action green,do-not-merge= stopred, type/community keep GitHub-conventional colours); bots follow the same
vocabulary (
automated+ exactly one diagnostic).Scope — where these labels apply
The 18 decompose into a universal core (16) plus a lecture extension (2)
(
new-lecture,editor— meaningful only where the lecture editorial workflowruns):
lecture-python-intro,lecture-python-programming,lecture-python.myst,lecture-python-advanced.myst,lecture-dp,lecture-jax; candidates to confirm:lecture-julia.myst,lecture-datascience.myst,lecture-stats,continuous_time_mcs,lecture-wasmlecturesprofile)QuantEcon.py,QuantEcon.jl,quantecon-book-theme,action-*,qe-cli, …meta(discuss/project/educationstay), translation forks (translate:*),contractor-payments,action-activity-report*.notebooks(build artifacts),*.theme, dormant reposOrg-level default labels = the core 16 (they seed every new repo regardless
of type); the lecture pair is added by the lecture-profile sync.
metakeepsits coordination labels but gets two cleanups: align inherited variants
(
high priority→high-priority, dropin-work/ready) and retire legacyweekly-report/monthly-report.Type — what kind of work is this? (apply one at triage)
bug#d73a4aenhancement), not bot-found link/build issues (→ automation labels).enhancement#a2eeefnew-lecture#0537E9enhancementbecause new lectures are QuantEcon's headline outcome: gives activity reports and year-in-review queries a deterministic signal, and it was the most human-applied content label in the historical audit. Apply instead ofenhancement, not alongside.documentation#0075caenhancementorbug.maintenance#fbca04maintenance.question#d876e3Priority — how urgent? (heat scale; unlabelled = normal)
high-priority#d93f0blow-priority#c2e0c6medium(everything migrates to the middle).Editorial — the QuantEcon review stage
editor#0e8a16org:QuantEcon is:open label:editor. Remove on sign-off. Don't apply before team review completes (that's what review requests are for).Workflow guard
do-not-merge#b60205Community — invitations to contribute (GitHub-canonical names)
good first issue#7057ffhelp wanted#008672Automation — raised or managed by machines (quiet grey; applied by bots, not humans)
automated#edededreport+linkchecker+automated issue). Filterlabel:automated= "everything the robots raised".broken-links#ddddddaction-link-checkeralongsideautomated.build-failure#ccccccaction-check-warnings(and execution/build checks) alongsideautomated. The failing CI job name identifies the tool — no per-tool labels.dependencies#bdbdbdgithub_actions/conda). One filter shows the whole upkeep queue.Tools with purpose-built namespaces keep them on their own repos (
action-translation'stranslate:*,contractor-payments' workflow labels,action-activity-report'sstatus-report) — the rule: a label belongs to the repo it lands on.Meta — triage outcomes (apply when closing)
duplicate#cfd3d7wontfix#ffffffinvalid.What we deliberately don't label
in-work/ WIPready/in-reviewblocked/on-holdtestingdo-not-mergemedium-priority/urgenthigh-priorityskill: editor/skill: domaineditor/help wanted+ commentreading-group-2024,jax-conversion, …)colab,jupyterbook-latex, …)build-failureThe one behavioural ask: open work-in-progress PRs as Drafts.
Adoption order (once agreed)
qe gh labels sync), renaming historical variants in place so issue/PR history is preserved.action-activity-report: its notability heuristic (NOTABLE_LABELSintools/highlights.py) currently keys oninfrastructureandpriority: high, which cease to exist after migration — update to{enhancement, new-lecture, high-priority}. (Its noise rollup andstatus-reportlabels are unaffected; reporting actually gets more reliable from the unifieddependencies.)A complete style-guide version of this (with worked examples and reviewer dashboard queries) is drafted and ready to go into the manual / a
qe-clirepo once the set is agreed.mmcky commentedon Jun 10, 2026
qeas the standard entry point for QuantEcon toolingA scope note as the CLI takes shape: the intent is for
qeto become thesingle operator entry point for QuantEcon work — new tooling lands as a
qecommand group (qe <domain> <command>), not as another standalone tool(e.g. a future style CLI would be
qe style check, notqestyle).What every group inherits by living under
qe:uv tool installfrom GitHub source) and one authstory (shells out to
gh, no PAT);definition of "what is a QuantEcon lecture repo", shared by every domain;
--dry-runeverywhere,--repos/--profileeverywhere, CI-friendly exit codes;
qe --helpis the catalogue of QuantEcon operations.Reserved command map (only
ghexists today):qe ghqe styleaction-style-guide)qe reportaction-activity-reportqueries)qe lectureqe buildGround rules so this stays a toolbox, not a framework:
namespace above is reserved, but a group is only built when the task
shows up.
typer + pyyaml+gh;heavy-dependency domains land as optional extras (
quantecon-cli[style])or entry-point plugins if their dependencies/release cadence diverge.
action-*) remain the CIsurface but become thin wrappers calling
qe, never a secondimplementation of the same logic.
mmcky commentedon Jun 10, 2026
Decision phase split out → #324.
To keep the team review focused, the proposal has been distilled into a
decision-only issue: #324 (the 18 labels in compact form + three questions:
the set, the Tier-1 repo list, and the Draft-PR convention).
This issue stays open as the engineering record and implementation tracker.
Once #324 is decided, the rollout proceeds here:
qe gh labels sync(QuantEcon/cli) — history-preserving renamesaction-link-checker,action-check-warnings,action-style-guide, per-repo Dependabot configs; and the label-readingaction-activity-report(NOTABLE_LABELS→{enhancement, new-lecture, high-priority})mmcky commentedon Aug 27, 2026
Closing as delivered and superseded, 2026-08-27. This issue asked for three things — a
qecommand-line tool with aghmodule, a label schema held as a single source of truth, and tooling to apply it across repositories. The tool exists and shipped atv0.2.0on 2026-06-11, withqe gh labels sync | check | export,--dry-run,--pruneand the alias-based rename path this issue specified.Every open question it listed has since been answered elsewhere:
new-lecture,editor) and a one-label software extension (refactor)automatedplus at most one diagnostic — withqe gh bots checkas QuantEcon/cli#5 and the three emitter fixes as QuantEcon/meta#377, QuantEcon/project-qep2#10 and QuantEcon/project-qep2#11QuantEcon/qe-cli?QuantEcon/cliexisting. Installable viauv tool install, subject to QuantEcon/cli#25 and #35The one item from its suggested next steps that has not happened — "apply the agreed schema across all lecture repos; wire
checkinto CI as a drift guard" — is not abandoned. It is re-homed to QuantEcon/project-qep2#1, where it is four phases and eleven work items rather than a checklist line, and the drift guard is QuantEcon/cli#6.The work continued as three separate projects, all registered on the projects dashboard:
--prunepreserves tags against a real repository)One piece of this issue's scope has no successor project and is correctly unparented: the sub-issue and dependency helpers, QuantEcon/cli#11. It was rescoped on 2026-08-26 after the field test found that
ghalready covers most of what it proposed.Paired registry change merged first, so the dashboard never showed a closed tracker against an active row: QuantEcon/status-projects#22 moved the
qe-clirow tostage: donewithended: 2026-06-11. Recorded as an acceptance item on QuantEcon/project-qep2#12.Note that #178 and #290 stay open. They are alternative label standards, and until the QEP-2 migration has actually run they are the fallback record. This issue is a different class — it proposed the tool, and the tool exists — so its closure is not gated on the migration.
Generated by Claude Code