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 an area:* split (content vs code)? Keep a ready label, 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 into qe gh bots check later.
- Distribution —
uv tool install / pipx from a new QuantEcon/qe-cli?
Suggested next steps
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.
Summary
Build a
qecommand-line tool with aghmodule to manage GitHubconfiguration 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 onlybug,in-work, andreadypresent in all six. Thereare near-duplicate variants (
automated issue/automated-issue/automated,linkchecker/broken-links,high-priority/high priority), redundanttriple-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 labelsA standalone Python CLI that shells out to
ghfor all GitHub calls, soit inherits existing
gh auth(no PAT to store or rotate) and keeps GitHub's ownCLI doing the API work.
1. A label schema (single source of truth)
A version-controlled manifest — list of labels with
name,color,description, and optionalaliases(old names to rename from, preservingthe issue/PR tags on existing items). Example shape:
2. Tooling to apply it to a repo
Per label, per repo: update if the canonical
nameexists; else rename the firstexisting
alias(history-preserving); else create. With--prune, labels not inthe schema (and not consumed as an alias) are removed, so a repo converges to
exactly the schema.
--dry-runpreviews 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.
bug,enhancement,documentation,maintenance,questiongood first issue,help wantedhigh-priority,low-priority(unlabelled = normal)do-not-mergeautomated,broken-links,build-failure,dependenciesduplicate,wontfixOpen questions for the team
lecture repos. Which dimensions matter (type / priority / area / status)? Do we
want an
area:*split (content vs code)? Keep areadylabel, or rely on thenative Review-requested dashboard?
plus per-repo extensions?
action-link-checker,action-check-warnings,action-style-guide) should emit only canonicallabels; fold this check into
qe gh bots checklater.uv tool install/pipxfrom a newQuantEcon/qe-cli?Suggested next steps
QuantEcon/qe-cli.labels.yml(the provisionalset above, explicitly marked draft).
qe gh labels sync/check/exportwith--dry-run.checkinto CI as adrift 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-clirepo once it exists.