Skip to content

Release prep v0.1.0: tests, CI (test + build), fix stationary_density overflow, implement plot_trajectories, README/packaging polish#3

Merged
beanapologist merged 4 commits into
mainfrom
copilot/release-prep-finalization
Jun 17, 2026
Merged

Release prep v0.1.0: tests, CI (test + build), fix stationary_density overflow, implement plot_trajectories, README/packaging polish#3
beanapologist merged 4 commits into
mainfrom
copilot/release-prep-finalization

Conversation

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

The repo was not release-ready: no tests, no CI, a stubbed public method, a numerical bug in stationary_density, overstated README claims, and no root-level install metadata.

Fixes

Bug: stationary_density numerical overflow
exp(-2V/σ²) overflowed when V had large negative values, producing inf/NaN in the normalised density. Fixed by shifting V to V - min(V) before exponentiation (mathematically equivalent after normalisation).

plot_trajectories was a bare pass stub
Implemented with a single/dual-panel matplotlib figure (optional energy panel via show_energy=True); returns the Figure object.

Added

Teststests/test_engine.py, 27 deterministic/seeded tests:

  • find_fixed_points: residual correctness, stability sign, structure, edge cases
  • escape_probability: unit-interval bounds, threshold sensitivity
  • stationary_density: normalisation, non-negativity, peak location vs. equilibrium
  • seat_and_release: key structure, control-zeroed-after-release, raises on no bowl
  • simulate: reproducibility, boundedness, energy recording
  • plot_trajectories: returns figure, handles single/multiple realizations

CI.github/workflows/ci.yml, permissions: contents: read, two jobs:

  • test: runs pytest tests/ -v across Python 3.9–3.12
  • build (runs after test): builds wheel + sdist via python -m build, verifies the wheel installs and imports cleanly, uploads dist/ as a workflow artifact

Root-level pyproject.toml — enables pip install -e ".[dev]" from repo root; requires-python aligned to >=3.9 (3.8 EOL Oct 2024); project.license uses SPDX string form to avoid setuptools deprecation warning

Root-level .gitignore — excludes dist/, build/, *.egg-info/, caches, and virtualenvs

Docs / metadata

  • README: replaced absolute claims ("holds it forever", "force any stochastic system", "near-zero by default") with precise language; added Quick Start example
  • CITATION.cff: added version: "0.1.0"
  • release/CHANGELOG.md: updated

Packaging note: Legacy packaging/pyproject.toml is preserved alongside the new root pyproject.toml. Standard tooling uses the root one; packaging/ can be removed in a follow-up.

Copilot AI changed the title [WIP] Finalize release preparation and improve packaging ergonomics Release prep v0.1.0: tests, CI, fix stationary_density overflow, implement plot_trajectories, README/packaging polish Jun 17, 2026
Copilot AI requested a review from beanapologist June 17, 2026 05:52

@beanapologist beanapologist left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

automate test and build

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

automate test and build

Done. The CI workflow now has two jobs:

  • test — runs pytest tests/ -v across Python 3.9–3.12
  • build (runs after test) — installs build, produces a wheel + sdist via python -m build, verifies the wheel installs and imports cleanly, then uploads the dist/ directory as a workflow artifact

Also fixed the project.license TOML-table deprecation in pyproject.toml (now uses the SPDX string form) and added a root .gitignore to exclude build artifacts (dist/, build/, *.egg-info/). Commit: the latest push.

Copilot AI changed the title Release prep v0.1.0: tests, CI, fix stationary_density overflow, implement plot_trajectories, README/packaging polish Release prep v0.1.0: tests, CI (test + build), fix stationary_density overflow, implement plot_trajectories, README/packaging polish Jun 17, 2026
Copilot AI requested a review from beanapologist June 17, 2026 06:00
@beanapologist beanapologist marked this pull request as ready for review June 17, 2026 06:06
@beanapologist beanapologist merged commit 557f1b4 into main Jun 17, 2026
5 checks passed
@beanapologist beanapologist deleted the copilot/release-prep-finalization branch June 17, 2026 06:06
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