• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarlNaumann / MacroStat / 25735270247
91%

Build:
DEFAULT BRANCH: master
Ran 12 May 2026 12:53PM UTC
Jobs 1
Files 100
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2026 12:45PM UTC coverage: 95.843% (-0.2%) from 95.993%
25735270247

push

github

web-flow
feat: KirmansAnts SDE model with core upgrades (#73)

* feat(core): add capability flag and instance numpy_rng to Behavior

Introduce `supports_differentiable: bool = True` class attribute on
`Behavior` so subclasses with non-differentiable inner loops (rejection
sampling, control flow over numpy state) can refuse `differentiable=True`
at construction. Add `self.numpy_rng = np.random.default_rng(seed)` on
the base class, seeded from the existing `seed` hyperparameter and
re-seeded at the top of `forward()` and `compute_theoretical_steady_state()`
alongside `torch.manual_seed`. Eliminates the global numpy state for any
model that needs a `Generator` and lays the groundwork for parallel
Hessian computation.

Document the provisional sub-loop pattern for continuous-time / SDE
models in CLAUDE.md so future SDE additions know what to refactor when a
second SDE model lands.

* feat(core): retain behavior_instance after Model.simulate

Store the constructed `behavior` on `self.behavior_instance` before
calling `behavior.forward()` so callers can introspect simulation state
that lives only on the behavior instance (e.g. the `_micro_trajectory`
side-buffer or `exhaustion_count` of the upcoming KirmansAnts SDE
model). Existing behaviour is unchanged: `simulate()` still returns the
gathered timeseries dict.

* fix(models): preserve module casing in get_model_classes lookup

`get_model_classes` was building component class names with
`f"{component.capitalize()}{modelname.upper()}"`. That only worked when
the model directory was already all uppercase (NK3E, IOPC, ECO3IOPC,
GL06*); for a mixed-case directory like `KirmansAnts` it tried to import
`BehaviorKIRMANSANTS` and failed with `AttributeError`. Drop the
`.upper()` so the lookup uses the directory name verbatim, matching the
actual class declarations in each model's component files.

Verified against the existing model suite: all 24 NK3E + GL06LP tests
plus the model_manager test suite still pass.

* feat(Kirm... (continued)

465 of 475 branches covered (97.89%)

Branch coverage included in aggregate %.

88 of 97 new or added lines in 8 files covered. (90.72%)

3155 of 3302 relevant lines covered (95.55%)

0.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
79.07
src/macrostat/models/KirmansAnts/parameters.py
1
98.77
-0.59% src/macrostat/core/behavior.py
Jobs
ID Job ID Ran Files Coverage
1 25735270247.1 12 May 2026 12:53PM UTC 100
95.84
GitHub Action Run
Source Files on build 25735270247
  • Tree
  • List 100
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25735270247
  • d1355d86 on github
  • Prev Build on master (#24447666949)
  • Next Build on master (#26446002830)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc