Development
This guide covers contributing across the monorepo. It generalizes cadling’s development guide to all packages.
git clone https://github.com/LatticeLabsAI/ll_toolkit.gitcd ll_toolkit
# Conda environment (installs PyTorch via conda-forge, pythonocc, packages)conda env create -f environment.ymlconda activate cadling
# Editable installs (as needed)pip install -e ./cadling ./ll_stepnet ./geotoken ./ll_ocadr ./ll_gen ./ll_cloudsCoding standards
Section titled “Coding standards”- Black — line length 88.
- Ruff —
E, W, F, I, N, UP, B, C4rules. - mypy — Python 3.9 target.
- Type hints required on public functions/methods.
- Google-style docstrings on public APIs.
from __future__ import annotationsat the top of modules._log = logging.getLogger(__name__)for logging.- Lazy-import heavy deps (torch, pythonocc, trimesh) behind availability checks.
black <pkg>/ tests/ruff check <pkg>/ tests/mypy <pkg>/Testing
Section titled “Testing”# From the repo root, or per package:cd cadling && pytest tests/unit/ -vcd ll_stepnet && pytest tests/ -vcd geotoken && pytest tests/ -v
# Marker selectionpytest -m "not slow"pytest -m "not requires_gpu"pytest -m "not requires_pythonocc"pytest -n auto # parallelWrite unit tests with real numeric assertions (geometry validated against
closed-form cases — plane normals, sphere curvature, known transforms). Heavy
tests gate behind requires_torch / requires_cadquery / slow.
Git workflow
Section titled “Git workflow”Branch names: feat/…, fix/…, refactor/…, docs/…. Commit messages follow
Conventional Commits:
feat(backend): add STEP backend with ll_stepnet integrationfix(ll_gen): unify VAE decode so RL gains reach generate()docs(spec): add SPEC-2 documentation-sitePR process: branch from main → implement with tests → pytest green → ruff
black --check+mypyclean → update docs → open PR.
Project conventions
Section titled “Project conventions”- If something is called but missing, implement it — do not remove the call.
- Unused variables/methods/imports are intentional; use them as intended.
- No fabricated/hardcoded outputs where real logic belongs — failure paths raise or log, never return fake geometry.
Working on the docs
Section titled “Working on the docs”To add or edit these documentation pages, see Working on the docs site.