Air-Gap Development Setup
Purpose: For contributors, shows how to set up the Air-Gap development environment.
What you'll have at the end
A working Python development environment where you can run the AirGap build tool, execute tests (including property-based tests with Hypothesis), and validate changes with the full linting suite.
Prerequisites
- Python 3.10 or later (3.11 and 3.12 also supported)
pipandvenv(included with Python)- Git
Step 1: Clone and create a virtual environment
cd openCenter-AirGap
python3 -m venv .venv
source .venv/bin/activate
Step 2: Install the package in editable mode with dev dependencies
pip install -e ".[dev]"
This installs the opencenter-airgap CLI command and all development tools (pytest, hypothesis, black, mypy, pylint).
Step 3: Verify the installation
opencenter-airgap --help
You should see the Typer-generated help output listing available commands.
Step 4: Run the test suite
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run only property-based tests
pytest -m property
# Run only fast tests (skip slow/integration)
pytest -m "not slow and not integration"
The project uses strict pytest configuration (see pyproject.toml). Tests timeout after 300 seconds. Coverage must stay above 80%.
Step 5: Run code quality checks
# Format code
black src/ tests/
# Type checking
mypy src/
# Linting
pylint src/opencenter_build/
mypy runs in strict mode with disallow_untyped_defs = true. All new code must have type annotations.
Step 6: Set up pre-commit hooks
pre-commit install
This runs black, mypy, and pylint automatically before each commit.
Check your work
After completing setup, all of these should pass:
opencenter-airgap --help # CLI loads
pytest # Tests pass
black --check src/ tests/ # Formatting clean
mypy src/ # No type errors
pylint src/opencenter_build/ # No lint errors
Next steps
- Read Air-Gap Code Structure to understand the module layout
- Read Air-Gap State Management to understand the build pipeline
- Check
tests/for examples of property-based tests using Hypothesis