repomatic.upstream module¶
The identity of the upstream toolkit, as downstream repositories see it.
A downstream repository reaches kdeldycke/repomatic through the uses: refs
of its workflows, the inline self-pin of its run: commands, and the paths the
canonical workflows filter on. Every writer and checker of those references
reads the names here, so a rename of the project is a change to this module.
A leaf module: it imports only repomatic.github.urls, which imports
nothing of the package, so any module can use it without an import cycle.
- repomatic.upstream.DEFAULT_REPO: str = 'kdeldycke/repomatic'¶
Default upstream repository for reusable workflows.
- repomatic.upstream.INSTALL_GUIDE_PATH = 'docs/install.md'¶
Install guide the release freeze pins download URLs in.
Shared by
PrepareRelease, which rewrites those URLs, andcheck_install_guide_downloads(), which verifies the release they name actually carries the files.
- repomatic.upstream.UPSTREAM_ASSET_GLOB: str = '.claude/**'¶
Path glob for the bundled skills and agents in canonical workflows.
The package ships them through symlinks under
repomatic/data/, so editing one changes no pathUPSTREAM_SOURCE_GLOBmatches, while the test suite reads every one. Downstream,.claude/holds synced copies that no test reads, so the glob is dropped there like theUPSTREAM_SOURCE_PREFIXpaths.
- repomatic.upstream.UPSTREAM_PACKAGE: str = 'repomatic'¶
Distribution name of the upstream toolkit, derived from
DEFAULT_REPO.The freeze, cooldown-exemption, and lint code that handles the
uses:refs and the inline self-pin all key on this name: deriving it here keeps the writer/checker pairs in lockstep and makes a rename a one-line change. It is also the name of the import package, whichis_source_repo()looks for.
- repomatic.upstream.UPSTREAM_REPO_SLUGS: tuple[str, ...] = ('kdeldycke/repomatic', 'kdeldycke/repokit', 'kdeldycke/workflows')¶
Upstream repository slugs across the project’s renames, current first.
A downstream thin-caller’s
uses:line references whichever slug was current when it was generated. Workflow-tombstone detection matches against all of them (current first, since most callers are recent) so an orphaned thin-caller is recognized regardless of which era set it up.
- repomatic.upstream.UPSTREAM_SOURCE_GLOB: str = 'repomatic/**'¶
Path glob for the upstream source directory in canonical workflows.
Canonical workflow
paths:filters use this glob to match source code changes. In downstream repos, this is replaced with the project’s own source directory.
- repomatic.upstream.UPSTREAM_SOURCE_PREFIX: str = 'repomatic/'¶
Path prefix for upstream-specific files in canonical workflows.
Paths starting with this prefix (but not matching
UPSTREAM_SOURCE_GLOB) are dropped in downstream thin callers because they reference files that only exist in the upstream repository (likerepomatic/data/labels.toml).
- repomatic.upstream.is_awesome_repo(name)[source]¶
Whether a repository name marks an
awesome-*curated list.The one spelling of the prefix test: repository-trait detection, the broken-links label choice and the awesome-template auto-inclusion all classify on it.
- Return type:
- repomatic.upstream.is_source_repo(root)[source]¶
Whether root is a checkout of the upstream source repository.
Only the upstream repository holds the package source tree, its
__init__.pyand itsdata/folder.repomatic initreads this to never flag the bundled files of that tree as stale, and the pin updaters to leave the in-tree targets of those files to their own sync.Note
Detection reads the contents of root, not
__file__:uvx --from .installs the package into a temporary virtual environment, where__file__no longer points into the source checkout.