Local Development¶
This guide covers environment setup, coding conventions, testing, and documentation workflows for Make MLOps Easy contributors.
Environment Setup¶
Create a virtual environment and install the project with development extras:
make install-dev
This command installs the package in editable mode plus dependencies for testing, linting, type checks, documentation, and coverage utilities.
Virtual Environment¶
The default environment lives under .venv/. Activate it explicitly when running commands outside the Makefile:
source .venv/bin/activate
Coding Standards¶
- Formatting: Run
make format(Black) before committing. - Linting: Use
make lint(Flake8) to keep code compliant. - Typing: Optionally run
mypy easy_mlops/to catch typing issues.
Testing & Coverage¶
Unit and integration tests reside under tests/. Execute:
make test
Coverage uses Python’s built-in trace module because pytest-cov requires network access to fetch wheels in some environments. Generate a coverage summary with:
make coverage
Coverage artifacts are stored in trace_summary/. The GitHub Actions workflow uploads the same directory for CI review.
Distributed runtime tips¶
- Start a development master/worker pair with
make-mlops-easy master startandmake-mlops-easy worker start. Use theexamples/distributed_runtime.shscript when you prefer managed processes. - Workers stream stdout back to the master; add
printstatements in pipeline code to debug tasks quickly. - Override the state file path (
--state-path) to keep reproducible fixtures for integration tests.
Documentation¶
Docs are built with MkDocs and the Material theme. To preview locally:
make docs-serve
Build the static site with:
make docs-build
The docs.yml GitHub Actions workflow automatically deploys the site to GitHub Pages when changes land on main. For manual releases or forks, run:
make docs-deploy
Makefile Shortcuts¶
The Makefile centralizes tasks such as linting, testing, documentation, and CLI invocations. Run make help to inspect available targets.
Pre-Commit Checklist¶
Before pushing:
make format lint testmake coverage(optional but recommended)make docs-buildto ensure documentation builds cleanly- Review
git statusfor unintended files (logs, artifacts should stay ignored).
See CI/CD for the automated pipelines that validate pushes and releases.