[4] feat: add reproducibility tests for LON visualizations#19
Merged
[4] feat: add reproducibility tests for LON visualizations#19
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI and pytest-based reproducibility coverage to ensure Local Optima Network (LON) visualizations produce deterministic layouts/outputs when a fixed seed is provided.
Changes:
- Add session-scoped LON fixtures (Sphere, Rastrigin) for reuse across tests.
- Add reproducibility tests for
LONVisualizer.get_layout()andLONVisualizer.plot_2d()using a shared seed. - Introduce a GitHub Actions CI workflow that runs pre-commit and pytest via
uv.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_visualization.py |
Adds layout + plot reproducibility tests for seeded visualization. |
tests/conftest.py |
Adds shared seed/config plus session fixtures to build LONs for tests. |
.github/workflows/ci.yml |
Adds CI jobs for pre-commit and pytest using uv. |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:6
- This workflow only runs on
pull_requestevents. That means after merging (apushtomain), the test/pre-commit jobs won’t run on themainbranch, which reduces the reliability of post-merge validation. Consider adding apushtrigger formain(and optionallyworkflow_dispatch) so CI also runs for the actual commits landing on the default branch.
on:
pull_request:
branches: [main]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pFornagiel
reviewed
Mar 2, 2026
pFornagiel
reviewed
Mar 2, 2026
pFornagiel
approved these changes
Mar 2, 2026
Collaborator
pFornagiel
left a comment
There was a problem hiding this comment.
Apart from two nitpicks mentioned above it looks good - feel free to implement those as you wish. 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary