Metadata-Version: 2.4
Name: lume-base
Version: 0.5.0
Summary: Base classes and architecture for LUME Python projects
Author: SLAC National Accelerator Laboratory
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/slaclab/lume-base
Project-URL: Repository, https://github.com/slaclab/lume-base
Project-URL: Documentation, https://slaclab.github.io/lume-base
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: openpmd-beamphysics
Requires-Dist: h5py
Requires-Dist: pyyaml
Requires-Dist: pydantic
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ipykernel; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Provides-Extra: docs
Requires-Dist: pygments; extra == "docs"
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocstrings; extra == "docs"
Requires-Dist: mkdocstrings-python; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: livereload; extra == "docs"
Requires-Dist: pytkdocs[numpy-style]; extra == "docs"
Requires-Dist: mkdocs-jupyter; extra == "docs"
Dynamic: license-file

# lume-base

Base classes and architecture for LUME Python projects

## Installation

Install using pip:

```bash
pip install lume-base
```

## Development

We recommend using [uv](https://github.com/astral-sh/uv) for development:

```bash
# 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:

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

# Run tests
pytest
```

### Linting and Formatting

This project uses [pre-commit](https://pre-commit.com/) to manage code quality checks, including [ruff](https://github.com/astral-sh/ruff) for linting and formatting. Pre-commit hooks will automatically run on every commit.

```bash
# 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:**

```bash
# 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

```bash
# Install with docs dependencies
uv sync --extra docs

# Build docs
uv run mkdocs build

# Serve docs locally
uv run mkdocs serve
```
