Skip to content

feat(borg_runtime): add Borg archive lifespan analysis and plot#4

Merged
jrkasprzyk merged 2 commits into
mainfrom
archive-visualization
Jul 2, 2026
Merged

feat(borg_runtime): add Borg archive lifespan analysis and plot#4
jrkasprzyk merged 2 commits into
mainfrom
archive-visualization

Conversation

@jrkasprzyk

Copy link
Copy Markdown
Owner

Parse Borg MOEA runtime files into archive snapshots and per-solution birth/death tables, and plot them as a survival chart with restart windows shaded. leaked_model_ids cross-references a Borg-RiverWare SolutionModels folder against snapshot history: files whose IDs appear in no snapshot were added and removed from the archive during a restart (when no runtime output is written), which is how snapshot-based model cleanup leaks files.

Bundles sample runtime file, example 07, and unit tests.

Parse Borg MOEA runtime files into archive snapshots and per-solution
birth/death tables, and plot them as a survival chart with restart
windows shaded. leaked_model_ids cross-references a Borg-RiverWare
SolutionModels folder against snapshot history: files whose IDs appear
in no snapshot were added and removed from the archive during a restart
(when no runtime output is written), which is how snapshot-based model
cleanup leaks files.

Bundles sample runtime file, example 07, and unit tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Borg MOEA runtime analysis workflow to parasolpy: parsing runtime snapshots into per-solution lifespans, detecting “leaked” model files, and visualizing archive survival over time.

Changes:

  • Introduces parasolpy.borg_runtime with runtime parsing, metadata extraction, lifespan reconstruction, and leaked-model detection utilities.
  • Adds plot_archive_lifespans to visualize solution birth/death bars plus archive-size and restart-gap shading.
  • Adds an example script, sample-data-based docs wiring, changelog entry, and unit tests for the new runtime utilities.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_borg_runtime.py Adds unit tests for parsing snapshots/metadata, lifespan conventions, and leaked model ID detection.
parasolpy/plotting.py Adds plot_archive_lifespans survival-style plot for archive solutions, with restart-gap shading.
parasolpy/borg_runtime.py New module implementing runtime snapshot parsing, metadata parsing, lifespan table construction, and leaked-model detection.
parasolpy/init.py Exposes new borg-runtime utilities and plotting function from the package root.
examples/README.md Registers the new example script in the examples index.
examples/07_borg_archive_lifespan.py Adds a runnable demo producing the archive lifespan plot (optionally overlaying leaked models).
docs/api/index.rst Adds parasolpy.borg_runtime to the autosummary API reference.
CHANGELOG.md Documents the new module, plotting function, sample runtime file, example, and tests under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread parasolpy/borg_runtime.py
solution_lifespans() will raise an IndexError on empty input (nfes[-1]) instead of a clear validation error. Since this is a public helper (and plot_archive_lifespans() already validates its own snapshots), it should defensively reject empty snapshots with a ValueError for clearer caller behavior.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jrkasprzyk
jrkasprzyk merged commit 8036c07 into main Jul 2, 2026
1 check passed
@jrkasprzyk
jrkasprzyk deleted the archive-visualization branch July 2, 2026 22:23
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