Skip to content

[4] feat: add reproducibility tests for LON visualizations#19

Merged
WojtAcht merged 10 commits intomainfrom
4-test-lons
Mar 2, 2026
Merged

[4] feat: add reproducibility tests for LON visualizations#19
WojtAcht merged 10 commits intomainfrom
4-test-lons

Conversation

@WojtAcht
Copy link
Member

@WojtAcht WojtAcht commented Feb 25, 2026

Summary

  • Add GitHub Actions CI workflow with two jobs: pre-commit linting and pytest, running on Python 3.12 with uv
  • Add initial test suite for LON visualization covering layout and plot reproducibility
  • Configure pytest test paths in pyproject.toml

Copilot AI review requested due to automatic review settings February 25, 2026 21:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() and LONVisualizer.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_request events. That means after merging (a push to main), the test/pre-commit jobs won’t run on the main branch, which reduces the reliability of post-merge validation. Consider adding a push trigger for main (and optionally workflow_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.

@WojtAcht WojtAcht linked an issue Feb 26, 2026 that may be closed by this pull request
@WojtAcht WojtAcht requested a review from pFornagiel March 1, 2026 19:10
Copy link
Collaborator

@pFornagiel pFornagiel left a comment

Choose a reason for hiding this comment

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

Apart from two nitpicks mentioned above it looks good - feel free to implement those as you wish. 🚀

@WojtAcht WojtAcht merged commit aae22bb into main Mar 2, 2026
3 checks passed
@WojtAcht WojtAcht deleted the 4-test-lons branch March 2, 2026 21: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.

Add integration tests to verify deterministic graph and plot generation

3 participants