Skip to content

slaclab/lume-base

Repository files navigation

lume-base

Base classes and architecture for LUME Python projects

Installation

Install using pip:

pip install lume-base

Development

We 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 pytest

or alternatively run pip commands directly in uv:

# Install package in editable mode with dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

Linting and Formatting

This 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-files

Once 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-files

The CI pipeline will automatically run these checks on every push and pull request.

Building Documentation

# Install with docs dependencies
uv sync --extra docs

# Build docs
uv run mkdocs build

# Serve docs locally
uv run mkdocs serve

About

Base classes and architecture for LUME Python projects

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors