Skip to content

Release/0.6.6 - #190

Merged
profsergiocosta merged 24 commits into
mainfrom
release/0.6.6
Oct 8, 2026
Merged

profsergiocosta merged 24 commits into
mainfrom
release/0.6.6

Conversation

@profsergiocosta

Copy link
Copy Markdown
Member

Description

Release 0.6.6: bug fixes in the CLI, I/O and widgets, two vector performance improvements, and the
JOSS paper updated with Zenodo DOIs for every software dependency and benchmarks re-run on the
current stack.

Related Issue

N/A (release branch)

Changes Made

  • Core implementation / algorithmic changes
    • CLI: output file extension comes from the executor (output_suffix), parent directory of
      --output is created, ExperimentRecord records the executor name, dissmodel version and
      defining package
    • save_dataset: clear TypeError when data and URI format do not match
    • display_inputs: renders only user-declared annotations; for models without their own
      annotations it exposed framework attributes and replaced env with a string
    • perf: vector_grid cells built in one vectorized call; MIN_DISTANCE fill via spatial index
  • Added or updated unit tests
    • tests for the fixes above; Chart and RasterMap tests run in a temporary directory (they left
      chart_frames/ and raster_map_frames/ in the repository root)
  • Updated documentation / docstrings / examples
    • paper: Zenodo DOIs for brmangue-dissmodel 0.5.0, brmangue-terrame 0.1.0, terrame-docker 0.4.2,
      dissmodel-ca 0.1.0, dissmodel-sysdyn 0.1.1 and luccme-goldens 1.1.0; benchmarks re-run
      (dissmodel 0.6.6, NumPy 2.5.3, GeoPandas 1.2.0); statement of need, research impact and AI
      disclosure revised; SyncSpatialModel / SyncRasterModel described
    • README: architecture diagram in Mermaid, disslucc and disscube installed from PyPI, citation
      0.6.6, coverage badge 83%
    • vector-to-raster guide moved to docs/examples/vector_to_raster.md

Contributor Checklist

  • The code runs locally without errors
  • All unit tests pass locally (pytest): 489 passed, 2 skipped; doctests 19 passed
  • Static analysis and formatting pass (ruff check dissmodel/, as in CI); mypy dissmodel clean
  • Docstrings follow the project standard (inputs, outputs, exceptions)

profsergiocosta and others added 24 commits October 7, 2026 14:35
- Use benchmark scenario IDs (lab01_md1643, lab15_md10) for the Lab1 and Lab15 results
- Point validation to the public disslucc-benchmark instead of test file paths
- State the MAE metric (final year; mean over all years 0.0026) and iteration counts
- Replace per-step timings with whole-run timings from `make timing`
- Describe the correctCellChange guard neutrally (field name mismatch)
- Fellowship paragraph in the present tense (four fellows since September 2026)
- Add DisSLUCCBenchmark to paper.bib
 and disslucc-benchmark with Zenodo DOIs
 scenarios; cite released versions with DOIs
 spelling, AI disclosure, trim to 1700 words, final DOIs
 validation numbers to v0.3.0, step 11, Game of Life wording
- BR-MANGUE validation against TerraME (baseline and flooding scenarios),
  tied to brmangue-dissmodel v0.3.0
- Mesa-Geo in the state of the field; remaining labs explained
- AI usage disclosure rewritten (scope, phases, validation references)
- INPE seminar (7 May 2026) in the research impact
- paper.bib: final Zenodo DOIs (disslucc, brmangue-dissmodel,
  disslucc-benchmark 0.2.2), Costa2009 URL, seminar entry
…lab01 and tolerance

Findings from running the validation as a JOSS reviewer would:
- BR-MANGUE goldens come from a TerraME 2.0 adaptation of the published
  model (brmangue-terrame), as brmangue-dissmodel's docs/model-fidelity.md
  states; say so, cite it, and point to where the flooding goldens are
  regenerated (they are not shipped with v0.3.0).
- The 60×60 cross-substrate check uses a 5 cm tolerance; state it.
- In disslucc-benchmark the scenario named lab01_md1643 is the one that
  matches (cell_correction=False); the MAE 0.0036 belongs to the default
  run. Reword so the text matches the benchmark table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
…Record

- New `--preserve-output-name` flag on `run`: write to --output exactly as
  given instead of injecting the short experiment ID (default unchanged).
- Directory output used a hard-coded `.tif` even for vector executors;
  the extension now comes from the executor's optional `output_suffix`
  class attribute (default `.tif`, so existing behaviour is kept).
- The record written by the CLI had fixed placeholders
  (model_name="local", model_commit="local-cli", code_version="dev").
  It now records the executor's `name`, the installed dissmodel version,
  and the package that defines the executor (e.g.
  "brmangue-dissmodel==0.3.0"), also when the executor file is run as a
  script from inside an installed package. Loose scripts keep "local-cli".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
…or import

- shapefile_to_raster.md (repo root, not in the mkdocs nav) documented
  `dissmodel.geo.raster.io`, which no longer exists: every import in it
  raised ImportError. Moved to docs/examples/vector_to_raster.md, rewritten
  for `dissmodel.io.convert.vector_to_raster_backend` and
  `dissmodel.io.raster.save_geotiff`, and added to the nav. Dropped the
  unmeasured "≈ 4,500× faster" claim in favour of a pointer to the
  benchmarks. All snippets were run against the synthetic 60×60 grid and
  `mkdocs build --strict` passes.
- README step 3 used `ForestFireModel` without importing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
`_fill_min_distance` measured every cell against every target geometry
in Python (`apply` + `distance().min()`). It now asks the target's STRtree
(`sindex.nearest`) for the nearest geometry of each cell and measures only
that pair with `shapely.distance`.

Same values as before (tests compare against the brute force for points,
lines and polygons, bit for bit); missing/empty geometries and an empty
target still give NaN; index and row order are preserved; a CRS mismatch
still warns. On a 200×200 grid with 2,000 random lines: 66 s → ~7 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
The two nested Python loops created one `shapely.geometry.box` per cell.
`np.meshgrid` + `shapely.box` on arrays now builds all cells at once, in
the same column-major order and with the same "row-col" ids, which
neighbourhoods and raster conversion depend on.

A new test keeps the old loop as reference and checks, for the
dimension, bounds+resolution and bounds+dimension forms, that ids and
every vertex are identical. 1000×1000 grid: ~20 s → ~4 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
CLI output name and provenance fixes, vector-to-raster docs, faster
MIN_DISTANCE fill and vector_grid, plus the raster georeference changes
already in Unreleased. Stays in 0.6.x so packages pinned to
`dissmodel>=0.6.4,<0.7.0` (disslucc 0.5.0) pick it up unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
…ismatch

Running the README executor as a reviewer would, with `--output results/`:
- the CLI did not create `results/`, so the save failed with
  FileNotFoundError; `run` now creates the parent of a local output path.
- with the directory created, the generated `simulacao_<id>.tif` made
  save_dataset hand a GeoDataFrame to the GeoTIFF writer, which failed with
  `AttributeError: 'GeoDataFrame' object has no attribute 'arrays'`.
  save_dataset now checks the data type against the URI's format first and
  raises a TypeError that says what to do; the README executor declares
  `output_suffix = ".gpkg"`, so `--output results/` writes a GeoPackage.

Both problems predate 0.6.6 (the `.tif` was hard-coded before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
For a model with no annotation of its own, obj.__annotations__ resolves to
Model's annotations, so the sidebar rendered env/start_time/end_time/_step
and the env text box replaced the environment with a string. Collect the
annotations of the user's classes only (base classes included) and skip
private names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiTtjpqiqAutXkzYsVzepv
Replace the ASCII box diagram (misaligned, and naming executors that no
longer exist: CoastalRasterExecutor, LUCCVectorExecutor) with a Mermaid
flowchart using current names (BrmangueRasterExecutor,
LuccContinuousExecutor) and showing which core module each layer uses.
- README ecosystem table: disslucc is on PyPI (`pip install disslucc`);
  add disscube (`pip install "disscube[dissmodel]"`), which the paper cites
  but the table did not list
- executor schemas example: coastal-dynamics was renamed to
  brmangue-dissmodel; use its `brmangue_raster` executor and the v0.5.0 tag
Replace the ASCII box diagram (misaligned, and naming executors that no
longer exist: CoastalRasterExecutor, LUCCVectorExecutor) with a Mermaid
flowchart using current names (BrmangueRasterExecutor,
LuccContinuousExecutor) and showing which core module each layer uses.
 0.6.6, coverage badge

- paper: list AI uses in general terms (coding, bug fixing, refactoring,
  code translation, tests, validation scripts, documentation, text) and
  state that reference outputs are produced by TerraME itself, with
  AI-assisted changes to model files checked to leave outputs unchanged;
  replaces the claim that only the BR-MANGUE headless driver was AI-written
- paper: cite luccme-goldens v1.1.0 (10.5281/zenodo.23161342), the
  reference outputs the disslucc benchmark compares against
- README: citation block cited 0.6.5; coverage badge said 79% (CI: 83%)
In headless mode Chart and RasterMap write PNG frames to the working
directory, so running pytest from the repository root left chart_frames/
and raster_map_frames/ behind. An autouse fixture moves each test of
those two modules into tmp_path.
@profsergiocosta
profsergiocosta merged commit 733e139 into main Oct 8, 2026
4 checks passed
@profsergiocosta
profsergiocosta deleted the release/0.6.6 branch October 8, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants