Base classes and architecture for LUME Python projects
Install using pip:
pip install lume-baseWe recommend using uv for development:
# Install uv
pip install uv
# Initialize uv project
uv init
# Install package in editable mode with dev dependencies
uv sync --extra dev
# Run tests
uv run pytestor alternatively run pip commands directly in uv:
# Install package in editable mode with dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytestThis project uses pre-commit to manage code quality checks, including ruff for linting and formatting. Pre-commit hooks will automatically run on every commit.
# Install pre-commit (if not already installed from dev dependencies)
uv pip install pre-commit
# Install the git hook scripts
pre-commit install
# (Optional) Run against all files manually
pre-commit run --all-filesOnce installed, pre-commit will automatically run checks whenever you commit changes. If any checks fail, the commit will be blocked until you fix the issues.
To manually run checks before committing:
# Run all pre-commit hooks
pre-commit run --all-files
# Or run only ruff checks
pre-commit run ruff --all-files
pre-commit run ruff-format --all-filesThe CI pipeline will automatically run these checks on every push and pull request.
# Install with docs dependencies
uv sync --extra docs
# Build docs
uv run mkdocs build
# Serve docs locally
uv run mkdocs serve