Development¶
Package Layout ¶
The repository is organised around a Python package, reproducible examples, and documentation. The main components are shown below.
WaLSAlib/
├── src/WaLSAlib/ # Public interfaces and native routines
│ ├── linefit/ # LineFit implementation
│ ├── SoFT.py, SoFTg.py # Public component namespaces
│ └── _vendor/ # Generated bundled runtime sources
├── vendor/ # Pinned upstream source snapshots and licenses
├── examples/LineFit_Frontiers/ # Existing notebooks, testbed, and products
├── docs/ # Markdown pages, theme, and example extracts
├── tests/release/ # Interface, numerical, and distribution checks
├── tools/ # Source-sync and release validation tools
├── pyproject.toml # Package metadata and dependencies
├── mkdocs.yml # Documentation configuration
├── LICENSE # Native-code license
└── THIRD_PARTY_NOTICES.md # Bundled-component attribution and terms
| Directory | Description |
|---|---|
src |
Native code, public interfaces, and generated component adapters |
vendor |
Source snapshots and a lock file recording exact upstream versions |
docs |
Documentation pages, images, source extracts, and the shared WaLSAtools theme |
examples |
Original worked examples and their supplied data/products |
tests |
Checks appropriate to the library interfaces, methods, and distributions |
Development Environment ¶
Use Python 3.10 or newer and an isolated environment. From a source checkout:
Install relevant optional extras for the component being changed. Follow the repository’s contribution policy and retain scientific assumptions, unit conventions, and reproducible reference results with numerical changes.
Validation¶
python tools/sync_upstreams.py --check
python -m pytest tests/release
python -m build
python -m twine check --strict dist/*
python tools/check_dist.py dist
Use a clean dist/ directory when checking release artifacts. GPU and desktop workflows require checks on the target platform. Changes to package contents also require updates to the explicit package/module lists and source manifest.
Editing Documents ¶
Documentation is written in Markdown and built with MkDocs, using the same bundled theme, stylesheets, fonts, and page layout as WaLSAtools. Edit page sources under docs/ and preview changes locally before submitting them. Keep the shared visual styles intact; WaLSAlib’s adaptations are the logo, static Python indicator, homepage module cards, and content accents.
See Building the documentation for the local build commands and the source-derived API/reference process. Notebook examples retain their original code, saved outputs, and provenance.
Bundled Components and Releases¶
The runtime sources under _vendor are generated from pinned upstream snapshots. Use the upstream maintenance guide to review and regenerate them, rather than editing only a generated copy. The release guide documents distribution checks and publishing administration.