This directory contains project documentation and architectural decision records (ADRs).
user-guide/- User-facing documentation (installation, usage, tutorials, troubleshooting)dev-journal/- Development journal and historical analysis documents with date-stamped filenames (YYYYMMDD-topic.md)adrs/- Architecture Decision Records (ADRs) documenting significant architectural decisions- Root
docs/- Single-file documentation (thisREADME.mdfile, standards) - Additional subdirectories - Topic-specific multi-file documentation as needed
ADRs document significant architectural decisions made during development, providing context for why certain choices were made. Each ADR captures:
- Context: The situation that led to the decision
- Decision: The architectural choice that was made
- Consequences: The positive and negative outcomes
- Alternatives: Other options that were considered
We follow the Michael Nygard ADR template.
- ADR-0001: Package Namespace Structure - Decision on using
pyinfra_orbstackvspyinfra.orbstacknamespace - ADR-0002: Scope Limitation for Advanced Operations - Decision to limit operations to those supported by OrbStack CLI and PyInfra's architectural model
- ADR-0003: Multi-Level Testing Strategy - Three-tier testing approach (unit, integration, E2E) with command builder extraction for decorator-wrapped code
- ADR-0004: Session-Scoped Test VM Management - Worker VM strategy for 90% test time reduction and reliable parallel execution
- ADR-0005: Intelligent Retry Logic for OrbStack Operations - Exponential backoff retry strategy with error classification for network-dependent operations
- ADR-0006: PyInfra Operation Generator Pattern with Command Builders - Generator-based operations with extracted command builders for testability
- ADR-0007: Simple Logging-Based Timing Over Complex Metrics Infrastructure - Decision to use simple logging for operation timing instead of complex metrics collection or external libraries
- Phase 3 Feasibility Analysis - Comprehensive analysis of OrbStack CLI capabilities and PyInfra architectural constraints (informed ADR-0002)
- Testing and Coverage Methodology - Detailed testing strategy analysis (informed ADR-0003)
- Test VM Management Implementation Summary - Complete implementation details for session-scoped VMs (informed ADR-0004)
- Bug Fix Complete Success - Retry logic implementation and validation (informed ADR-0005)
- PyInfra Operations Issue Analysis - Discovery of correct operation pattern (informed ADR-0006)
When making significant architectural decisions:
- Create a new ADR file in
adrs/with format:NNNN-decision-title.md(e.g.,0003-caching-strategy.md) - Follow the Michael Nygard template
- Update this
README.mdfile to list the new ADR in the "Current ADRs" section - Reference the ADR in relevant code or documentation
- Consider adding detailed analysis to
dev-journal/if needed (link from ADR)
This project adheres to several development standards to ensure consistency, maintainability, and quality.
This project follows Semantic Versioning (SemVer) for version numbering:
- MAJOR.MINOR.PATCH format (e.g., 1.2.3)
- MAJOR: Incompatible API changes
- MINOR: New functionality in a backward-compatible manner
- PATCH: Backward-compatible bug fixes
This project follows the Conventional Commits specification for commit message formatting. This standard provides a structured format for commit messages that enables automated tools for generating changelogs, determining semantic versioning, and more.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries
feat: add vm_create operation for OrbStack VMs
fix(connector): handle SSH connection failures gracefully
docs: update installation instructions for uv package manager
refactor(operations): simplify VM status checking logic
test: add unit tests for OrbStackConnector class
chore: update dependencies to latest versions- Automated Changelog Generation: Commit messages can be parsed to automatically generate changelogs
- Semantic Versioning: Commit types help determine version bumps (feat = minor, fix = patch, breaking = major)
- Clear History: Structured messages make it easier to understand project history
- Tool Integration: Works with tools like semantic-release, conventional-changelog, and more
This project follows the Keep a Changelog format for the CHANGELOG.md file:
- Unreleased: Changes that haven't been released yet
- Versioned sections: Each release has its own section
- Categorized changes: Added, Changed, Deprecated, Removed, Fixed, Security
- Chronological order: Most recent changes first
# Install development dependencies
uv sync --dev
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=src/pyinfra_orbstack
# Alternative using pip
pip install -e ".[dev]"
pytest
pytest --cov=src/pyinfra_orbstack# Format code
uv run black src/ tests/
# Lint code
uv run flake8 src/ tests/
# Type checking
uv run mypy src/
# Alternative using pip
black src/ tests/
flake8 src/ tests/
mypy src/This project uses pre-commit hooks to ensure code quality:
# Install pre-commit hooks
uv run pre-commit install
# Run all hooks
uv run pre-commit run --all-files- Testing and Coverage Methodology - Comprehensive testing strategy and coverage standards
- Test Suite Refactoring Analysis - Analysis of test redundancy and consolidation recommendations
- Test Implementation Analysis - Details on test structure and implementation
- Running Tests - Guide to running tests with various options
- Test Timing Guide - How to view test execution times and identify slow tests
- Live Test Monitoring - Real-time monitoring of test execution with live elapsed time updates
- Benchmark Guide - Performance benchmarking and regression detection
- OrbStack Timeout Analysis - Root cause analysis and mitigation strategies for VM creation timeouts
- Process Analysis and Recommendations - Memory optimization strategy and system resource management
- Test Results: Post Optimization - Comprehensive test suite results after memory optimization
- Architecture Decision Records - Comprehensive guide to ADRs
- Documenting Architecture Decisions - Michael Nygard's original ADR concept
- Semantic Versioning - Version numbering specification
- Conventional Commits - Commit message format specification
- Keep a Changelog - Changelog format specification