How formingworlds/aragog works
Project Type & Purpose
Aragog is an open-source Python library (with a CLI) for simulating 1D rocky-mantle dynamics (solid/liquid/mixed phases). It’s a configuration-driven numerical solver pipeline, meant for both interactive use (via notebooks or API) and batch runs (via CLI).
High-Level File Structure & Patterns
• aragog/
– core modules: parser.py, mesh.py, phase.py, solver.py, core.py
– I/O: data.py, output.py, interfaces.py, utilities.py
– CLI entry point: cli.py
– configuration templates: cfg/*.cfg
• data/ – lookup tables & test data
• scripts/ – data-conversion utilities
• notebooks/ – tutorials & examples
• docs/ – Sphinx documentation
• tests/ – pytest suite & reference outputs
• .github/ – CI/CD workflows (unit tests, publishing)
• pyproject.toml, readthedocs.yaml, .github workflows – build & deploy config
Architectural patterns:
– Pipeline stages (input → setup → compute → output)
– Configuration-driven experiments (.cfg files)
– Clear separation of concerns (parsing, physics, I/O)
– Dual interface (CLI + importable API)
– Automated testing & CI
Relationships & Data Flow
1. User → CLI or API import
2. CLI/API → Setup Layer (parser & interfaces)
3. Setup → Run Layer (mesh → phase → solver → core)
4. Run → Output Layer (output.py → files, console)
5. Output → Post-processing (notebooks/scripts)
6. Tests/CI monitor Setup, Run, and Output correctness
Key Technologies & Services
• Python 3.10+
• pytest (unit tests)
• Sphinx & ReadTheDocs (documentation)
• GitHub Actions (CI/CD)
• Poetry or pip (packaging)