Thank you for your interest in contributing to Helicon.
Requirements: Python 3.11+, uv
git clone https://github.com/lulzx/helicon
cd helicon
uv sync --all-extras
uv run pytestOn Apple Silicon (MLX backend):
uv sync --extra mlx
uv run pytest tests/unit/test_biot_savart.py -k mlx -v# All tests
uv run pytest
# Specific module
uv run pytest tests/unit/test_biot_savart.py -v
# Skip slow tests
uv run pytest -m "not slow"Helicon uses Ruff for linting and formatting:
uv run ruff check .
uv run ruff format .The CI pipeline enforces ruff check and ruff format --check. Fix issues before submitting a PR.
helicon/
├── fields/ # Biot-Savart field solver (NumPy + MLX backends)
├── config/ # Pydantic simulation config parser
├── runner/ # WarpX launcher, hardware detection, convergence studies
├── postprocess/ # Thrust, detachment, plume metrics, report generation
├── optimize/ # Parameter scans, Bayesian opt, Sobol sensitivity, Pareto front
├── validate/ # Validation cases (VASIMR, Merino-Ahedo, Dimov, etc.)
└── cli.py # Click CLI entry point
tests/
└── unit/ # pytest unit tests (no WarpX required)
docs/
└── spec.md # Architecture and milestone specification
- Create
helicon/validate/cases/your_case.pywith a class following the pattern infree_expansion.py. - Implement
get_config() -> SimConfig,evaluate(output_dir) -> ValidationResult. - Register in
helicon/validate/cases/__init__.pyandhelicon/validate/runner.py. - Add tests in
tests/unit/test_your_case.py.
MLX gradient-based objectives live in helicon/optimize/objectives.py. They must:
- Accept
coil_params: mx.array(shape(N, 3), columns[z, r, I]) and grid arrays. - Return a scalar
mx.array(nomx.evalcall — preserve the graph formx.grad).
- Keep PRs focused on a single concern.
- All new code must have corresponding unit tests.
- Ensure
uv run pytestpasses before opening the PR. - Reference relevant papers in docstrings using author-year format.
Please open a GitHub issue with:
- Helicon version (
helicon --version) - Python version and platform
- Minimal reproducible example
- Full traceback