Charm discovery and filtering¶
Charm discovery handles these layouts:
Flat: one charm per top-level directory (has
charmcraft.yamlormetadata.yaml).Bundle: a
bundle.yamldirectory; charms are incharms/subdirectories.Monorepo: a directory containing charm subdirectories, heuristically detected.
Monorepo with a root harness: a monorepo with a runner (
tox.iniorMakefile) and a Python manifest at the root, and where none of the charms have both. The root is run in place of the charms. If some of the charms do have both, they’re run on their own, and the others are skipped.Examples only: a repository with no charms except in a top-level
examples/directory, such ascanonical/operator. The example charms are run. Any runner and Python manifest at the root are ignored. In other repositories,examples/directories are skipped.
Filters are applied as a chain. Each filter either returns None (passes) or a skip reason string. The chain short-circuits on the first reason:
not_legacy: skip reactive/hooks-based charms (hooks/, orsrc/reactive/withsrc/layer.yaml).has_python: skip charms with no Python source.regex_filter: skip charms not matching--repo.ignore_filter: skip charms listed inhyrum.toml [ignore].has_runnable_target: skip charms with neithertox.ininorMakefile.Framework filter (if
--frameworkis set).