Thanks for your interest in lineforge. This guide covers how to get a development environment running, the code-style + testing expectations, and the PR flow.
This project follows the Contributor Covenant 2.1. In short: be kind.
lineforge/
├── crates/lineforge_kernel/ # Rust crate (PyO3-exposed numerical kernels)
├── src/lineforge/ # Python package (orchestration, surfaces)
├── tests/ # pytest suite
├── examples/ # runnable examples for users
├── benchmarks/ # performance + parity benchmarks
└── docs/ # mkdocs-material site
You need:
- Python 3.11+ (3.13 recommended).
- Rust toolchain via https://rustup.rs/ (stable channel).
- maturin for building the mixed Python/Rust package.
git clone https://github.com/<org>/lineforge.git
cd lineforge
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# OR: .venv\Scripts\activate # Windows PowerShell
pip install --upgrade pip maturin
pip install -e ".[dev]" # editable install with dev depsThis builds the Rust kernel (lineforge._kernel) in debug mode and links it into your
editable Python install. To rebuild after Rust changes:
maturin develop # debug
maturin develop --release # optimizedPython:
- Formatter:
black - Linter:
ruff(config inpyproject.toml) - Type-checker:
mypy --strictforsrc/lineforge/ - Docstrings: NumPy style, public APIs only
Rust:
- Formatter:
cargo fmt - Linter:
cargo clippy -- -D warnings - Style: standard Rust, prefer iterator chains,
rayonfor parallelism
Run all checks before opening a PR:
ruff check . && black --check . && mypy src/lineforge
cargo fmt -- --check && cargo clippy -- -D warningspytest # full suite
pytest tests/test_analytical/ # one module
pytest -k microstrip # filter by name
pytest --cov=lineforge --cov-report=term-missing
cargo test # Rust unit testsWe require ≥ 90% Python coverage and clean clippy on all PRs.
For numerical work, every solver has golden-value tests — IPC-2141A reference tables, scikit-rf cross-checks, or atlc/atlc2 published example values. New solvers must come with golden tests.
The repo follows a phased plan documented in docs/plan.md. Each
phase is a GitHub milestone; each issue has explicit acceptance-criteria checklists.
Please target your PRs at open issues so the AC list can be ticked off.
- Good first issues are labeled
good first issue. - Phase 0/1 work is the easiest entry point — analytical formulas, Pydantic models, CLI wiring.
- Numerical kernel work (Phase 2/3) requires familiarity with sparse linear algebra and FD methods.
- MCP server work is welcome at any phase.
- Open an issue (or comment on an existing one) before starting non-trivial work.
- Fork + branch (
feature/your-thingorfix/your-bug). - Make your changes with tests.
- Run the full check suite locally.
- Open the PR, link the issue with
Closes #N, and tick AC checkboxes. - CI must be green; one maintainer review minimum.
By contributing, you agree your contributions are licensed under GPLv3. lineforge references and is partially derived from David Kirkby's GPL atlc v1; we preserve copyleft on all derivatives.
Open an issue with:
- A minimal reproduction (geometry params or a small BMP).
- Expected vs actual results.
- lineforge version, Python version, OS.
For numerical accuracy bugs, please include the analytical or atlc/atlc2 reference value you're comparing against.