Development Setup¶
Set up your local development environment for contributing to Machineconfig.
Prerequisites¶
- Python 3.13+
- UV (recommended)
- Git
Setup¶
1. Clone the Repository¶
2. Install Dependencies¶
This installs all development dependencies.
3. Install Pre-commit Hooks¶
Development Workflow¶
Running Tests¶
Type Checking¶
Linting¶
Building Documentation¶
uv run python -m machineconfig.scripts.python.helpers.helpers_devops.docs_changelog
uv run zensical build
For the repo-aware preview flow that also refreshes the CLI hierarchy artifacts:
Visit http://127.0.0.1:8000/machineconfig/ to preview docs.
This repo builds docs with zensical and keeps its configuration in zensical.toml. The deploy flow also syncs docs/changelog.md from git tags before building. uv sync --group dev installs everything you need.
Project Structure¶
machineconfig/
├── docs/ # Documentation sources
├── docs_fragments/ # Included CLI reference fragments
├── src/machineconfig/ # Main package
│ ├── cluster/ # Remote operations
│ ├── jobs/ # Job execution
│ ├── scripts/ # CLI implementations
│ ├── settings/ # Config templates
│ └── utils/ # Utilities
├── tests/ # Test suite
└── zensical.toml # Docs site config
Making Changes¶
-
Create a feature branch:
-
Make your changes
-
Run tests and linting:
-
Commit with clear messages:
-
Push and open a PR
Building the Package¶
This creates distribution files in dist/.