Skip to content

Conversation

@joneugster
Copy link
Collaborator

@joneugster joneugster commented Jan 16, 2026

This PR is split into 3 commits, which can be reviewed separately.

Commit 1 & 2 do not change the current behaviour of the script, commit 3 only contains the behaviour-changing config (plus a test).

  1. Refactor existing code: make topic labels type-safe; Allow for multiple labels to be added. This includes the changes from feat(scripts/autolabel): allow up to 3 topic labels to be added #34038 (minus the actual value change)
  2. Add support for specifying dependent topic labels, i.e. specifying that "if t-algebra is added t-data should never be added". But do not provide any values for this feature
  3. Change MAX_LABELS and specify the dependency-relations between the labels. (also, add a test for commit 2)

Testing

Modify some files somewhere in Mathlib, make a temporary commit with these changes and run lake exe autolabel This should print all labels which would be added to the PR.

Note, that autolabel compares the current HEAD to origin/master (not master or upstream/master!) so make sure the origin/master of your fork is up-to-date.


If there is more discussion needed on (3.) I would suggest moving that commit to a follow-up PR and reviewing the refactoring first which only cleans up the current code.

Zulip discussion: #mathlib reviewers > Proposal: automatic reviewer assignment @ 💬

Q: Do we need to adjust the Zulip-Bot which notifies maintainers about maintainer-merge?

Open in Gitpod

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

PR summary ca7d6f198f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Label.toString
+ LabelData
+ MAX_LABELS
+ dropDependentLabels
+ instance : ToString Label
+ mathlibLabelData

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the CI Modifies the continuous integration setup or other automation label Jan 16, 2026
@joneugster joneugster force-pushed the eugster/autolabel-improvements branch from 8e5fb0a to 062eb43 Compare January 16, 2026 22:37
@joneugster joneugster changed the title feat(scripts/autolabel): allow multiple labels, aboid labels of dependent topic areas feat(scripts/autolabel): allow multiple labels, avoid labels of dependent topic areas Jan 16, 2026
@joneugster joneugster force-pushed the eugster/autolabel-improvements branch from 52c0914 to b6aca94 Compare January 16, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Modifies the continuous integration setup or other automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant