CoCoNet (Python) documentation
CoCoNet (Python) is a headless port of the legacy NetLogo CoCoNet v3 model used for Great Barrier Reef–scale scenarios: coral communities, crown-of-thorns starfish (CoTS), key fish groups, bleaching and cyclones, fisheries, and a wide range of management interventions. The code is designed for two distinct entry points—a CLI for file- and flag-driven runs, and a library published on PyPI as coconet-python for programmatic control—plus file-based configuration and parity-oriented comparison with the original NetLogo implementation.
Two entry points
| Entry point | Best for | How you run |
|---|---|---|
| CLI | Shells, Docker (official image), CI that passes paths and flags | Console script coconet or python -m coconet; YAML, legacy parameter CSV, COCONET_* env vars, and CLI flags. Optional profiling. |
| Library | Custom Python apps, services, notebooks, orchestration | pip install coconet-python → from coconet import load_coconet_config, run_coconet (and advanced use of CoconetConfig / CoconetModel). |
Details: Getting started, CLI, Python API.
Who this is for
- Modellers and analysts running scenarios from YAML, legacy parameter CSVs, or environment variables (often via the CLI).
- Developers embedding CoCoNet in Python pipelines, tests, or cloud jobs (typically via the library).
- Anyone validating Python outputs against the legacy model using aligned metadata and CSV schema.
Start here
- Getting started — install, first run, project layout; CLI vs library.
- Configuration reference — every
CoconetConfigfield and how it is loaded. - Scenario parameter semantics — legacy CSV labels and what each control does (README-level detail).
- Command-line interface — CLI entry point: flags, profiling, overrides.
- Python API — library entry point:
load_coconet_config,run_coconet,CoconetModel. - Inputs and outputs — reef CSV, coastline,
output.csvcolumns. - Model overview — ensembles, schedule, interventions at a glance.
- Architecture — how the engine maps to NetLogo semantics.
- Porting notes — validation and parity focus.
- Related tools — viewer, charts, Docker.
Maintainers: Publishing to PyPI — trusted publishing (OIDC) from GitHub Actions.
Published site
This site is built with Jekyll and deployed to GitHub Pages on pushes to the default branch (workflow Deploy documentation to GitHub Pages in .github/workflows/). After you enable Settings → Pages with the GitHub Actions source, the site is available at:
- This repo: https://gbrrestoration.github.io/coconet-python/
- Forks / other repos:
https://<owner>.github.io/<repository>/(also shown on the workflow summary and Settings → Pages).