meta_package_manager.labels moduleΒΆ
Utilities to generate the extra labels and labeller rules for GitHub issues and PRs.
The content and file rules produced here are a convenience: they pre-label a
freshly filed issue or PR to save the maintainer a first pass. They never replace
the manual review and classification, and nothing downstream treats them as
authoritative. They are therefore tuned for precision over recall: a rule is
encoded only when its signal is unambiguous (see generate_content_rules()
and generate_file_rules()), and a manager with no unambiguous term simply
gets no content rule and is labelled by hand.
- meta_package_manager.labels.generate_labels(all_labels, groups, prefix, color)[source]ΒΆ
Generate labels.
A dedicated label is produced for each entry of the
all_labelsparameter, unless it is part of agroup. In which case a dedicated label for that group will be created.Returns the
{label_id: label_name}map and the list of(label_name, color, description)rows to register, leaving the caller to fold them into the globalLABELSregistry. Kept pure (no global mutation) so it can be called repeatedly without double-populating the registry.
- meta_package_manager.labels.MANAGER_LABEL_COLOR = '#bfdadc'ΒΆ
Color GitHub paints every
π¦ manager: *label with.Also the color of the badge each managerβs documentation page links its label with, hard-coded in
docs/_static/custom.csssince a stylesheet cannot read this module;test_manager_label_badge_colorkeeps the two in step.
- meta_package_manager.labels.MANAGER_LABEL_GROUPS: TLabelGroup = {'asdf-based': frozenset({'asdf', 'mise'}), 'bash-based': frozenset({'basalt', 'bpkg'}), 'conda-based': frozenset({'conda', 'mamba', 'micromamba', 'pixi'}), 'dpkg-based': frozenset({'apt', 'apt-mint', 'deb-get', 'fink', 'nala', 'opkg', 'pacstall'}), 'fish-based': frozenset({'fisher', 'oh-my-fish'}), 'homebrew': frozenset({'brew', 'cask', 'zerobrew'}), 'neovim-based': frozenset({'bob', 'lazy', 'mason', 'vim-pack'}), 'npm-based': frozenset({'bun', 'npm', 'pnpm', 'volta', 'yarn', 'yarn-berry'}), 'pacman-based': frozenset({'dkp-pacman', 'pacaur', 'pacman', 'pamac', 'paru', 'pikaur', 'trizen', 'yay'}), 'pkg-based': frozenset({'pkg', 'ports'}), 'pypi-based': frozenset({'pip', 'pipx', 'uv', 'uvx'}), 'rpm-based': frozenset({'dnf', 'dnf5', 'urpmi', 'yum', 'zypper'}), 'scoop-based': frozenset({'scoop', 'sfsu'}), 'vscode-based': frozenset({'vscode', 'vscodium'}), 'zsh-based': frozenset({'antidote', 'antigen', 'zim', 'zinit', 'zplug'})}ΒΆ
Managers sharing the same ecosystem are grouped together under the same label.
Grouping is by ecosystem (the underlying packaging system), not by installation paradigm. For example, source-based helpers like Pacstall and AUR helpers are grouped with their ecosystem (dpkg-based and pacman-based respectively), even though they build from source rather than fetching pre-built binaries.
finkfollows the same rule over its platform: it manages.debpackages through dpkg, so it groups with the other dpkg front-ends despite being the only macOS one among them.pypi-basedis named for the registry rather than for a tool, because no single tool is common to it:uvreimplements resolution and installation from scratch and touches nopipcode. What the four share is the index they all resolve against, which is the level a report lands at.The host-program groups (
bash-based,fish-based,neovim-based,zsh-based) widen that reading, and deliberately so: plugin managers share no backend at all, each cloning straight from upstream Git into its own tree. What they share is the host program a report is about, which is what the label has to answer. An issue mentioning a Neovim plugin is about the same corner ofmpmwhether it arrives throughvim-packorlazy, so both carry one label and one tracker search. The groups stay separate along that same line, one per host program:zinitandantidotehost Zsh plugins, not Neovim ones, and a report about either belongs nowhere near the editor label. Grouping all of them under a single shell-plugin label was considered and rejected on the same grounds, since it would answer withmpmβs implementation shape (an interpreter-keyed manager wrapping every call inzsh -corfish -c) where the reporter filed against a shell.masonis the one member of those groups that manages no plugins at all, installing ordinary developer tools rather than editor Lua. It groups underneovim-basedanyway, because the host program is the axis: Neovim is what amasonreport is about, and it is also whatmpmkeys the manager on, the three sharing one module and onenvimbinary. Naming the group for the editor rather than for plugins is what lets it holdmasonwithout straining.bobstretches that naming one step further, and is the member to check the axis against. It installs Neovim itself rather than anything into it, and is the only membermpmdoes not key on thenvimbinary, being its own executable in its own definition. It groups here regardless, because the axis is what a report is about and every bob report is about Neovim: leaving it out would split the editor across two labels and two tracker searches, which is the split this group exists to prevent.voltais the same call already taken elsewhere, kept undernpm-basedthough it manages a runtime too.sheldonis the one shell plugin manager left ungrouped, and it fails both halves of that test: it manages plugins for any shell rather than for one, and it is a compiled binary rather than a sourced function, so it shares neither a host program nor the interpreter wrapper with the groups above.asdf-basedis the plain reading again:miseresolves asdfβs plugins directly through itsasdf:backend, so the two share one plugin ecosystem and one class of report.voltastays undernpm-baseddespite also managing a runtime, because what it installs is npm packages.conda-basedfollowspypi-based:pixishares no code withconda, reimplementing resolution and installation on top of rattler, but both resolve conda packages from the same channels,conda-forgeby default. The registry is the level a report lands at, so the two share one label even though their CLIs have nothing else in common.
- meta_package_manager.labels.all_manager_label_ids = frozenset({'am', 'antidote', 'antigen', 'apk', 'apm', 'apt', 'apt-cyg', 'apt-mint', 'asdf', 'basalt', 'bin', 'bob', 'bpkg', 'brew', 'bun', 'cargo', 'cask', 'cave', 'choco', 'chromebrew', 'clib', 'composer', 'conda', 'cpan', 'deb-get', 'dkp-pacman', 'dnf', 'dnf5', 'dotnet', 'elan', 'emerge', 'eopkg', 'fink', 'fisher', 'flatpak', 'fwupd', 'gcloud', 'gem', 'getnf', 'gext', 'gh-ext', 'ghcup', 'guix', 'haxelib', 'jpm', 'juliaup', 'krew', 'lazy', 'luarocks', 'macports', 'mamba', 'mas', 'mason', 'micro', 'micromamba', 'miktex', 'mise', 'mpm', 'nala', 'nimble', 'nix', 'npm', 'oh-my-fish', 'ollama', 'opam', 'opkg', 'pacaur', 'pacman', 'pacstall', 'pamac', 'paru', 'pikaur', 'pip', 'pipx', 'pixi', 'pkcon', 'pkg', 'pkg-tools', 'pkgin', 'pnpm', 'ports', 'pwsh-gallery', 'pyenv', 'raco', 'rustup', 'scoop', 'sdkman', 'sfsu', 'sheldon', 'slapt-get', 'snap', 'soar', 'sorcery', 'spack', 'steamcmd', 'stew', 'sun-tools', 'swupd', 'tazpkg', 'tlmgr', 'topgrade', 'trizen', 'urpmi', 'uv', 'uvx', 'vagrant', 'vcpkg', 'vim-pack', 'volta', 'vscode', 'vscodium', 'winget', 'xbps', 'xcodes', 'yarn', 'yarn-berry', 'yay', 'yazi', 'yum', 'zef', 'zerobrew', 'zeroinstall', 'zim', 'zinit', 'zplug', 'zypper'})ΒΆ
Adds
mpmas its own manager alongside all those implemented.
- meta_package_manager.labels.MANAGER_LABELS = {'am': 'π¦ manager: am', 'antidote': 'π¦ manager: zsh-based', 'antigen': 'π¦ manager: zsh-based', 'apk': 'π¦ manager: apk', 'apm': 'π¦ manager: apm', 'apt': 'π¦ manager: dpkg-based', 'apt-cyg': 'π¦ manager: apt-cyg', 'apt-mint': 'π¦ manager: dpkg-based', 'asdf': 'π¦ manager: asdf-based', 'basalt': 'π¦ manager: bash-based', 'bin': 'π¦ manager: bin', 'bob': 'π¦ manager: neovim-based', 'bpkg': 'π¦ manager: bash-based', 'brew': 'π¦ manager: homebrew', 'bun': 'π¦ manager: npm-based', 'cargo': 'π¦ manager: cargo', 'cask': 'π¦ manager: homebrew', 'cave': 'π¦ manager: cave', 'choco': 'π¦ manager: choco', 'chromebrew': 'π¦ manager: chromebrew', 'clib': 'π¦ manager: clib', 'composer': 'π¦ manager: composer', 'conda': 'π¦ manager: conda-based', 'cpan': 'π¦ manager: cpan', 'deb-get': 'π¦ manager: dpkg-based', 'dkp-pacman': 'π¦ manager: pacman-based', 'dnf': 'π¦ manager: rpm-based', 'dnf5': 'π¦ manager: rpm-based', 'dotnet': 'π¦ manager: dotnet', 'elan': 'π¦ manager: elan', 'emerge': 'π¦ manager: emerge', 'eopkg': 'π¦ manager: eopkg', 'fink': 'π¦ manager: dpkg-based', 'fisher': 'π¦ manager: fish-based', 'flatpak': 'π¦ manager: flatpak', 'fwupd': 'π¦ manager: fwupd', 'gcloud': 'π¦ manager: gcloud', 'gem': 'π¦ manager: gem', 'getnf': 'π¦ manager: getnf', 'gext': 'π¦ manager: gext', 'gh-ext': 'π¦ manager: gh-ext', 'ghcup': 'π¦ manager: ghcup', 'guix': 'π¦ manager: guix', 'haxelib': 'π¦ manager: haxelib', 'jpm': 'π¦ manager: jpm', 'juliaup': 'π¦ manager: juliaup', 'krew': 'π¦ manager: krew', 'lazy': 'π¦ manager: neovim-based', 'luarocks': 'π¦ manager: luarocks', 'macports': 'π¦ manager: macports', 'mamba': 'π¦ manager: conda-based', 'mas': 'π¦ manager: mas', 'mason': 'π¦ manager: neovim-based', 'micro': 'π¦ manager: micro', 'micromamba': 'π¦ manager: conda-based', 'miktex': 'π¦ manager: miktex', 'mise': 'π¦ manager: asdf-based', 'mpm': 'π¦ manager: mpm', 'nala': 'π¦ manager: dpkg-based', 'nimble': 'π¦ manager: nimble', 'nix': 'π¦ manager: nix', 'npm': 'π¦ manager: npm-based', 'oh-my-fish': 'π¦ manager: fish-based', 'ollama': 'π¦ manager: ollama', 'opam': 'π¦ manager: opam', 'opkg': 'π¦ manager: dpkg-based', 'pacaur': 'π¦ manager: pacman-based', 'pacman': 'π¦ manager: pacman-based', 'pacstall': 'π¦ manager: dpkg-based', 'pamac': 'π¦ manager: pacman-based', 'paru': 'π¦ manager: pacman-based', 'pikaur': 'π¦ manager: pacman-based', 'pip': 'π¦ manager: pypi-based', 'pipx': 'π¦ manager: pypi-based', 'pixi': 'π¦ manager: conda-based', 'pkcon': 'π¦ manager: pkcon', 'pkg': 'π¦ manager: pkg-based', 'pkg-tools': 'π¦ manager: pkg-tools', 'pkgin': 'π¦ manager: pkgin', 'pnpm': 'π¦ manager: npm-based', 'ports': 'π¦ manager: pkg-based', 'pwsh-gallery': 'π¦ manager: pwsh-gallery', 'pyenv': 'π¦ manager: pyenv', 'raco': 'π¦ manager: raco', 'rustup': 'π¦ manager: rustup', 'scoop': 'π¦ manager: scoop-based', 'sdkman': 'π¦ manager: sdkman', 'sfsu': 'π¦ manager: scoop-based', 'sheldon': 'π¦ manager: sheldon', 'slapt-get': 'π¦ manager: slapt-get', 'snap': 'π¦ manager: snap', 'soar': 'π¦ manager: soar', 'sorcery': 'π¦ manager: sorcery', 'spack': 'π¦ manager: spack', 'steamcmd': 'π¦ manager: steamcmd', 'stew': 'π¦ manager: stew', 'sun-tools': 'π¦ manager: sun-tools', 'swupd': 'π¦ manager: swupd', 'tazpkg': 'π¦ manager: tazpkg', 'tlmgr': 'π¦ manager: tlmgr', 'topgrade': 'π¦ manager: topgrade', 'trizen': 'π¦ manager: pacman-based', 'urpmi': 'π¦ manager: rpm-based', 'uv': 'π¦ manager: pypi-based', 'uvx': 'π¦ manager: pypi-based', 'vagrant': 'π¦ manager: vagrant', 'vcpkg': 'π¦ manager: vcpkg', 'vim-pack': 'π¦ manager: neovim-based', 'volta': 'π¦ manager: npm-based', 'vscode': 'π¦ manager: vscode-based', 'vscodium': 'π¦ manager: vscode-based', 'winget': 'π¦ manager: winget', 'xbps': 'π¦ manager: xbps', 'xcodes': 'π¦ manager: xcodes', 'yarn': 'π¦ manager: npm-based', 'yarn-berry': 'π¦ manager: npm-based', 'yay': 'π¦ manager: pacman-based', 'yazi': 'π¦ manager: yazi', 'yum': 'π¦ manager: rpm-based', 'zef': 'π¦ manager: zef', 'zerobrew': 'π¦ manager: homebrew', 'zeroinstall': 'π¦ manager: zeroinstall', 'zim': 'π¦ manager: zsh-based', 'zinit': 'π¦ manager: zsh-based', 'zplug': 'π¦ manager: zsh-based', 'zypper': 'π¦ manager: rpm-based'}ΒΆ
Maps all manager IDs to their labels.
- meta_package_manager.labels.PLATFORM_LABELS = {'ALT Linux': 'π₯ platform: Linux', 'AlmaLinux': 'π₯ platform: Linux', 'Alpine Linux': 'π₯ platform: Linux', 'Amazon Linux': 'π₯ platform: Linux', 'Android': 'π₯ platform: Linux', 'Arch Linux': 'π₯ platform: Linux', 'Buildroot': 'π₯ platform: Linux', 'CachyOS': 'π₯ platform: Linux', 'CentOS': 'π₯ platform: Linux', 'ChromeOS': 'π₯ platform: Linux', 'Clear Linux OS': 'π₯ platform: Linux', 'CloudLinux OS': 'π₯ platform: Linux', 'Cygwin': 'π₯ platform: Unix', 'Debian': 'π₯ platform: Linux', 'DragonFly BSD': 'π₯ platform: BSD', 'EndeavourOS': 'π₯ platform: Linux', 'Exherbo Linux': 'π₯ platform: Linux', 'Fedora': 'π₯ platform: Linux', 'FreeBSD': 'π₯ platform: BSD', 'GNU/Hurd': 'π₯ platform: Unix', 'Generic Linux': 'π₯ platform: Linux', 'Gentoo Linux': 'π₯ platform: Linux', 'Guix System': 'π₯ platform: Linux', 'Haiku': 'π₯ platform: Unix', 'IBM AIX': 'π₯ platform: Unix', 'IBM PowerKVM': 'π₯ platform: Linux', 'IBM i': 'π₯ platform: Unix', 'KVM for IBM z Systems': 'π₯ platform: Linux', 'Kali Linux': 'π₯ platform: Linux', 'Linux Mint': 'π₯ platform: Linux', 'Mageia': 'π₯ platform: Linux', 'Mandriva Linux': 'π₯ platform: Linux', 'Manjaro Linux': 'π₯ platform: Linux', 'MidnightBSD': 'π₯ platform: BSD', 'NetBSD': 'π₯ platform: BSD', 'NixOS': 'π₯ platform: Linux', 'Nobara': 'π₯ platform: Linux', 'OpenBSD': 'π₯ platform: BSD', 'OpenWrt': 'π₯ platform: Linux', 'Oracle Linux': 'π₯ platform: Linux', 'Parallels': 'π₯ platform: Linux', 'Pidora': 'π₯ platform: Linux', 'PikaOS': 'π₯ platform: Linux', 'Raspbian': 'π₯ platform: Linux', 'RedHat Enterprise Linux': 'π₯ platform: Linux', 'Rocky Linux': 'π₯ platform: Linux', 'SUSE Linux Enterprise Server': 'π₯ platform: Linux', 'Scientific Linux': 'π₯ platform: Linux', 'Slackware': 'π₯ platform: Linux', 'SliTaz GNU/Linux': 'π₯ platform: Linux', 'Solaris': 'π₯ platform: Unix', 'Source Mage GNU/Linux': 'π₯ platform: Linux', 'SunOS': 'π₯ platform: BSD', 'Tuxedo OS': 'π₯ platform: Linux', 'Ubuntu': 'π₯ platform: Linux', 'Ultramarine': 'π₯ platform: Linux', 'Void Linux': 'π₯ platform: Linux', 'Windows': 'π₯ platform: Windows', 'Windows Subsystem for Linux v1': 'π₯ platform: Linux', 'Windows Subsystem for Linux v2': 'π₯ platform: Linux', 'XenServer': 'π₯ platform: Linux', 'illumos': 'π₯ platform: Unix', 'macOS': 'π₯ platform: macOS', 'openSUSE': 'π₯ platform: Linux'}ΒΆ
Maps all platform names to their labels.
- meta_package_manager.labels.LABELS: list[tuple[str, str, str]] = [('π¦ manager: am', '#bfdadc', 'am'), ('π¦ manager: apk', '#bfdadc', 'apk'), ('π¦ manager: apm', '#bfdadc', 'apm'), ('π¦ manager: apt-cyg', '#bfdadc', 'apt-cyg'), ('π¦ manager: asdf-based', '#bfdadc', 'asdf, mise'), ('π¦ manager: bash-based', '#bfdadc', 'basalt, bpkg'), ('π¦ manager: bin', '#bfdadc', 'bin'), ('π¦ manager: cargo', '#bfdadc', 'cargo'), ('π¦ manager: cave', '#bfdadc', 'cave'), ('π¦ manager: choco', '#bfdadc', 'choco'), ('π¦ manager: chromebrew', '#bfdadc', 'chromebrew'), ('π¦ manager: clib', '#bfdadc', 'clib'), ('π¦ manager: composer', '#bfdadc', 'composer'), ('π¦ manager: conda-based', '#bfdadc', 'conda, mamba, micromamba, pixi'), ('π¦ manager: cpan', '#bfdadc', 'cpan'), ('π¦ manager: dotnet', '#bfdadc', 'dotnet'), ('π¦ manager: dpkg-based', '#bfdadc', 'apt, apt-mint, deb-get, fink, nala, opkg, pacstall'), ('π¦ manager: elan', '#bfdadc', 'elan'), ('π¦ manager: emerge', '#bfdadc', 'emerge'), ('π¦ manager: eopkg', '#bfdadc', 'eopkg'), ('π¦ manager: fish-based', '#bfdadc', 'fisher, oh-my-fish'), ('π¦ manager: flatpak', '#bfdadc', 'flatpak'), ('π¦ manager: fwupd', '#bfdadc', 'fwupd'), ('π¦ manager: gcloud', '#bfdadc', 'gcloud'), ('π¦ manager: gem', '#bfdadc', 'gem'), ('π¦ manager: getnf', '#bfdadc', 'getnf'), ('π¦ manager: gext', '#bfdadc', 'gext'), ('π¦ manager: gh-ext', '#bfdadc', 'gh-ext'), ('π¦ manager: ghcup', '#bfdadc', 'ghcup'), ('π¦ manager: guix', '#bfdadc', 'guix'), ('π¦ manager: haxelib', '#bfdadc', 'haxelib'), ('π¦ manager: homebrew', '#bfdadc', 'brew, cask, zerobrew'), ('π¦ manager: jpm', '#bfdadc', 'jpm'), ('π¦ manager: juliaup', '#bfdadc', 'juliaup'), ('π¦ manager: krew', '#bfdadc', 'krew'), ('π¦ manager: luarocks', '#bfdadc', 'luarocks'), ('π¦ manager: macports', '#bfdadc', 'macports'), ('π¦ manager: mas', '#bfdadc', 'mas'), ('π¦ manager: micro', '#bfdadc', 'micro'), ('π¦ manager: miktex', '#bfdadc', 'miktex'), ('π¦ manager: mpm', '#bfdadc', 'mpm'), ('π¦ manager: neovim-based', '#bfdadc', 'bob, lazy, mason, vim-pack'), ('π¦ manager: nimble', '#bfdadc', 'nimble'), ('π¦ manager: nix', '#bfdadc', 'nix'), ('π¦ manager: npm-based', '#bfdadc', 'bun, npm, pnpm, volta, yarn, yarn-berry'), ('π¦ manager: ollama', '#bfdadc', 'ollama'), ('π¦ manager: opam', '#bfdadc', 'opam'), ('π¦ manager: pacman-based', '#bfdadc', 'dkp-pacman, pacaur, pacman, pamac, paru, pikaur, trizen, yay'), ('π¦ manager: pkcon', '#bfdadc', 'pkcon'), ('π¦ manager: pkg-based', '#bfdadc', 'pkg, ports'), ('π¦ manager: pkg-tools', '#bfdadc', 'pkg-tools'), ('π¦ manager: pkgin', '#bfdadc', 'pkgin'), ('π¦ manager: pwsh-gallery', '#bfdadc', 'pwsh-gallery'), ('π¦ manager: pyenv', '#bfdadc', 'pyenv'), ('π¦ manager: pypi-based', '#bfdadc', 'pip, pipx, uv, uvx'), ('π¦ manager: raco', '#bfdadc', 'raco'), ('π¦ manager: rpm-based', '#bfdadc', 'dnf, dnf5, urpmi, yum, zypper'), ('π¦ manager: rustup', '#bfdadc', 'rustup'), ('π¦ manager: scoop-based', '#bfdadc', 'scoop, sfsu'), ('π¦ manager: sdkman', '#bfdadc', 'sdkman'), ('π¦ manager: sheldon', '#bfdadc', 'sheldon'), ('π¦ manager: slapt-get', '#bfdadc', 'slapt-get'), ('π¦ manager: snap', '#bfdadc', 'snap'), ('π¦ manager: soar', '#bfdadc', 'soar'), ('π¦ manager: sorcery', '#bfdadc', 'sorcery'), ('π¦ manager: spack', '#bfdadc', 'spack'), ('π¦ manager: steamcmd', '#bfdadc', 'steamcmd'), ('π¦ manager: stew', '#bfdadc', 'stew'), ('π¦ manager: sun-tools', '#bfdadc', 'sun-tools'), ('π¦ manager: swupd', '#bfdadc', 'swupd'), ('π¦ manager: tazpkg', '#bfdadc', 'tazpkg'), ('π¦ manager: tlmgr', '#bfdadc', 'tlmgr'), ('π¦ manager: topgrade', '#bfdadc', 'topgrade'), ('π¦ manager: vagrant', '#bfdadc', 'vagrant'), ('π¦ manager: vcpkg', '#bfdadc', 'vcpkg'), ('π¦ manager: vscode-based', '#bfdadc', 'vscode, vscodium'), ('π¦ manager: winget', '#bfdadc', 'winget'), ('π¦ manager: xbps', '#bfdadc', 'xbps'), ('π¦ manager: xcodes', '#bfdadc', 'xcodes'), ('π¦ manager: yazi', '#bfdadc', 'yazi'), ('π¦ manager: zef', '#bfdadc', 'zef'), ('π¦ manager: zeroinstall', '#bfdadc', 'zeroinstall'), ('π¦ manager: zsh-based', '#bfdadc', 'antidote, antigen, zim, zinit, zplug'), ('π plugin', '#fef2c0', 'SwiftBar/Xbar/GNOME Shell plugin code, documentation and features'), ('π₯ platform: BSD', '#bfd4f2', 'DragonFly BSD, FreeBSD, MidnightBSD, NetBSD, OpenBSD, SunOS'), ('π₯ platform: Linux', '#bfd4f2', 'AlmaLinux, Alpine Linux, ALT Linux, Amazon Linux, Android, Arch Linux, Buildroot, CachyOS, CentOS, β¦'), ('π₯ platform: macOS', '#bfd4f2', 'macOS'), ('π₯ platform: Unix', '#bfd4f2', 'Cygwin, GNU/Hurd, Haiku, IBM AIX, IBM i, illumos, Solaris'), ('π₯ platform: Windows', '#bfd4f2', 'Windows')]ΒΆ
Global registry of all labels used in the project.
Structure:
("label_name", "color", "optional_description")
- meta_package_manager.labels.LABEL_RENAMES: dict[str, tuple[str, ...]] = {'π¦ manager: conda-based': ('π¦ manager: conda',), 'π¦ manager: pypi-based': ('π¦ manager: pip-based',)}ΒΆ
Labels a renamed one supersedes, emitted as labelmakerβs
rename-from.Folding managers into a group orphans the labels they used to carry, and the issues already filed against those.
rename-frommigrates one in place, which is the only lossless move available: GitHub keeps every issue and pull request attached across a rename, whereas creating the new label and deleting the old one drops the association.The mechanism is strictly one-to-one, so this map cannot express a merge: labelmaker errors outright when two
rename-fromlabels both exist, and falls toon-rename-clash(error, repomaticβs default) when the target already exists. An N-to-1 fold therefore names the single source carrying the most history, leaving the remainder to a hand migration, and a fold whose target label already exists names none at all.conda-basedis the same lossless shape: onlycondacarries history,pixiarrives with no label of its own, and the target does not exist yet, so the fold is genuinely one-to-one.dpkg-based,zsh-basedandasdf-basedwere all synced into existence before their predecessors were retired, so a declared rename would only error; their orphans (fink,zinit,asdf,mise) carry no issue or pull request at all and are deleted rather than migrated.vim-basedwas created on those same terms, orphaningvim-pack, and has since been folded intoneovim-based.bash-basednames no source either, for the other reason: it folds two labels rather than one, andbasaltandbpkgboth carry zero issues and zero pull requests, so there is no history for the single rename slot to preserve.neovim-basedis that same shape, foldingvim-basedandmason, which likewise carry zero of each.
- meta_package_manager.labels.CONTENT_RULES_STATIC: TLabelRules = [('π plugin', ('gnome shell', 'gnome-shell', 'plugin', 'swiftbar', 'xbar'))]ΒΆ
Curated keywords feeding the content rules of labels not derived from the pool.
Holds bare keywords, like every other content rule: repomaticβs
apply-labelsdoes the anchoring and case-folding (seegenerate_content_rules()).
- meta_package_manager.labels.FILE_RULES_STATIC: TLabelRules = [('π plugin', ('gnome-shell/**', 'meta_package_manager/bar_plugin*', 'tests/*bar_plugin*', 'tests/*gnome*', 'tests/gnome/**')), ('π¦ manager: mpm', ('meta_package_manager/*',))]ΒΆ
File rules for labels that are not derived from the pool.
mpmgets no content rule: as the projectβs own name it would match nearly every issue and PR.
- meta_package_manager.labels.MANAGER_CONTENT_KEYWORDS: dict[str, tuple[str, ...]] = {'apk': ('alpine', 'alpine linux'), 'apm': ('atom',), 'apt-cyg': ('cygwin',), 'asdf-based': ('asdf-vm', 'mise-en-place'), 'cargo': ('crate', 'rust'), 'cave': ('exherbo', 'paludis'), 'choco': ('chocolatey',), 'chromebrew': ('chrome os', 'chromeos'), 'composer': ('php',), 'conda-based': ('anaconda', 'conda-forge', 'miniconda', 'prefix.dev'), 'cpan': ('perl',), 'dotnet': ('nuget',), 'dpkg-based': ('aptitude', 'debian', 'dpkg', 'ubuntu'), 'emerge': ('gentoo', 'portage'), 'eopkg': ('solus',), 'flatpak': ('flathub',), 'fwupd': ('lvfs',), 'gem': ('ruby',), 'getnf': ('nerd font', 'nerd fonts'), 'gh-ext': ('gh extension', 'github cli'), 'guix': ('gnu guix',), 'homebrew': ('homebrew',), 'mas': ('app store', 'app-store'), 'nix': ('nixos', 'nixpkgs'), 'npm-based': ('node.js', 'nodejs'), 'pacman-based': ('arch',), 'pkcon': ('packagekit',), 'pkg-based': ('freebsd', 'freebsd ports'), 'pkg-tools': ('openbsd',), 'pkgin': ('netbsd', 'pkgsrc'), 'pwsh-gallery': ('powershell', 'powershell gallery', 'psgallery', 'psresourceget'), 'pypi-based': ('pypi',), 'rpm-based': ('fedora', 'mageia', 'opensuse', 'redhat', 'rhel', 'rpm', 'suse'), 'sdkman': ('sdk man',), 'slapt-get': ('slackware',), 'snap': ('snapcraft',), 'sorcery': ('source mage',), 'steamcmd': ('valve',), 'sun-tools': ('solaris', 'svr4'), 'swupd': ('clear linux', 'clearlinux'), 'tazpkg': ('slitaz',), 'tlmgr': ('ctan', 'tex live', 'texlive'), 'vscode-based': ('visual studio', 'visual studio code'), 'xbps': ('void linux',)}ΒΆ
Curated ecosystem keywords feeding each manager labelβs content rule.
Keyed by the manager or group ID the label derives from. These are the only content patterns a manager label gets: the bare manager IDs are deliberately left out (see
generate_content_rules()). Add only terms that are both unambiguously about this manager and absent from anything mpm prints itself: theβ <id>trail, the<id>: <count>summary line, themanagerstable (which lists every managerβs ID and CLI binary) and the$-prompt command disclosure. That rules out manager IDs and CLI names (fwupdmgr,pwsh), leaving the distro, language and brand names a human types in an issue. A manager with no such term gets no content rule and is labelled by hand.Skip anything that doubles as a common word even once word-anchored (
port,flat,mint,void): dropping the ID removed the implicit AND-guard those leaned on, so on their own they match unrelated prose.
- meta_package_manager.labels.PLATFORM_CONTENT_KEYWORDS: dict[str, tuple[str, ...]] = {'BSD': ('bsd',), 'Linux': ('linux',), 'Unix': ('unix',), 'Windows': ('c:', 'microsoft', 'windows'), 'macOS': ('apple', 'mac os', 'macos', 'os x', 'osx')}ΒΆ
Curated keywords feeding each platform labelβs content rule.
- meta_package_manager.labels.generate_content_rules()[source]ΒΆ
Build every content rule: the static ones plus one per manager or platform label that has curated keywords.
Manager labels are driven solely by
MANAGER_CONTENT_KEYWORDS, never by the bare manager IDs or CLI names. mpm enumerates every installed manager in its own output (theβ <id>trail, the<id>: <count>summary line, themanagerstable), so a pasted trace would otherwise make every manager on the userβs system match at once: acpan-only report came back taggedmise,pipanduvmerely because they sat in the trace. The keywords are the distro, language and brand names a human types, which mpm never prints.Keywords are emitted raw, one pattern each, because repomaticβs
apply-labelsapplies a label as soon as any one of its patterns matches, and compiles a bare pattern case-insensitively with a\banchor on each edge that is itself a word character. That is what the retiredgithub/issue-labelerneeded hand-built here: its all-of semantics forced a/β¦/ialternation to mean βany keyword winsβ, and its case-sensitive default forced theiflag. Keep the keywords bare, and reach for the/body/flagsescape hatch only for something an anchored literal cannot express.A label with no keyword is skipped: that manager gets no content rule, only its file rule. Rules are sorted by label, and each labelβs keywords among themselves, both cases folded.
- meta_package_manager.labels.generate_file_rules()[source]ΒΆ
Build every file rule: static ones plus one per manager label.
A manager label matches its membersβ definition files (Python modules and bundled TOML files alike, anchored on the full stem so
pkg.*never swallowspkgin.tomlorpkcon.py) and any test file carrying a memberβs stem or ID. Platform labels have no file rule: no file is platform-specific.