MLOps Collaboration
Goal
To transform a private project into a public, collaborative resource by establishing Governance (License, Code of Conduct, branch rulesets), Documentation (README, AGENTS, Contributing), Standardization (Templates, Workstations), and Release Management.
Prerequisites
- Language: Python 3.14
- Platform: GitHub
- Context: Open sourcing or team collaboration.
Instructions
1. Repository Governance
Set the rules of engagement.
- License: Pick an SPDX identifier and commit the full text. Declare it in
pyproject.tomlaslicense = "MIT"pluslicense-files = ["LICENSE.txt"](PEP 639), and make sure the file itself carries its title and copyright line — a bare license body with noCopyright (c) <year> <author>is legally ambiguous. - Code of Conduct: Add
CODE_OF_CONDUCT.mdto foster a safe community. - Branch Protection (concretely): commit
.github/rulesets/main.jsonand apply it withmise run install:rulesets. A ruleset in the repository is reviewable, diffable, and restorable; a setting clicked in the web UI is none of those. A useful baseline blocks deletion and non-fast-forward pushes, requires linear history, requires a pull request, and requires the CI status check to pass.- Make the task idempotent: look the ruleset up by name and
PUTover it when it exists,POSTonly when it does not. A plainPOSTcreates a duplicate ruleset on every run. - The required status check must name the CI job id exactly. If you rename the job, the ruleset waits forever for a context that no longer reports.
- Make the task idempotent: look the ruleset up by name and
- Review: Automate preliminary reviews with tools like Gemini Code Assist (
.gemini/config.yaml). - Ignore: Comprehensive
.gitignore(exclude secrets, data, virtualenvs, and local MLflow state such asmlflow.dbandmlartifacts/).
2. Comprehensive Documentation
Make the project usable and understandable.
- README.md: The landing page for humans (Badges, Hook, Quickstart, commands).
- AGENTS.md: The landing page for AI assistants — project overview, setup and core commands, definition of done, conventions and idioms, repository layout, in that order. Keep both files in sync with reality; when a command changes, both change in the same commit.
- Describe the real stack: state the versions a newcomer will actually install — Python 3.14, MLflow 3.15 on a SQL tracking store (
sqlite:///mlflow.dblocally, not the deprecated file store), Ruff 0.16,ty0.0.69,uv,mise. A README that documents last year's stack costs more time than no README. - MkDocs: Use for full documentation sites (API ref, tutorials) when
README.mdgets too long. - CONTRIBUTING.md: Guide for developers — environment setup, branch naming, PR process, and the exact local gate (
mise run all) they must pass before opening a pull request. - CHANGELOG.md: Generate from Conventional Commits with
git-cliff(replaces Commitizen); commit the rendered file.
3. Standardization & Workstations
Eliminate "it works on my machine".
- Templates: Use
cookiecutterfor scaffolding andcruft updateto keep projects synced. - Baseline (required):
misepins the toolchain (mise.lock) anduvpins the Python dependencies (uv.lock). Together they are what actually makes two machines identical, and they work with any editor. - Devcontainer (recommended, not required):
.devcontainer/devcontainer.jsonadds one-click GitHub Codespaces and a pinned OS-level image. It is a genuine improvement for teams onboarding non-Python contributors, but it is not part of the course's reference package or its cookiecutter template today — so treat it as an upgrade to propose, not a box a project must tick. If you add one, installmisein the image and let it install everything else, so the devcontainer and a bare laptop resolve the same versions.
4. Release Management
Ship with confidence.
- Versioning: Follow SemVer (MAJOR.MINOR.PATCH) driven by Conventional Commits.
- Changelog: Generate with
git-clifffrom the commit history (replaces Commitizen/Keep-a-Changelog by hand). - Workflows:
- GitHub Flow: Small teams, continuous delivery (
mainis stable). - Git Flow: Scheduled releases (
develop+releasebranches). - Forking: Open source, distributed contributors.
- GitHub Flow: Small teams, continuous delivery (
- Process:
mise run allgreen -> bump version ->git-cliffchangelog -> annotatedvX.Y.Ztag (git tag -a vX.Y.Z) ->gh release create vX.Y.Z.
Self-Correction Checklist
- License: Is a
LICENSEfile present, titled, copyrighted, and declared with SPDX +license-files? - Readme: Does
README.mdhave installation instructions that match the real commands? - Agents: Does
AGENTS.mdexist and describe the current stack and gate? - Contributing: Does
CONTRIBUTING.mdstate the branch convention and requiremise run all? - Protection: Is
.github/rulesets/main.jsoncommitted and applied idempotently bymise run install:rulesets? - Reproducibility: Are
uv.lockandmise.lockcommitted? (A devcontainer is a recommended bonus, not a requirement.) - SemVer: Are releases semver-tagged (
vX.Y.Z) viagh release create? - Changelog: Is
CHANGELOG.mdgenerated bygit-clifffrom Conventional Commits?