Skip to content

Improve coverage, setup to ignore flex#2

Merged
michael-petersen merged 8 commits intoObservationalExpansions:mainfrom
michael-petersen:main
Nov 25, 2025
Merged

Improve coverage, setup to ignore flex#2
michael-petersen merged 8 commits intoObservationalExpansions:mainfrom
michael-petersen:main

Conversation

@michael-petersen
Copy link
Collaborator

This PR does some test improvement, and also adds an example of how to ignore a specific directory with pytest.

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

This PR improves test coverage for the discmodel package and adds pytest configuration to ignore the flex directory during test runs. The changes include expanded test cases for the expansion functions, a bug fix in the optional imports checker, and modifications to exception handling in the disc rotation code.

  • Adds test coverage for noisy expansions and expansion computation before image generation
  • Fixes bug in _check_flex() function that was checking for wrong module
  • Comments out try-except blocks in rotation code that handled single-particle edge cases
  • Configures pytest to ignore the flex directory

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/test_discmodel.py Adds test for expansion before image generation and noisy expansion test; renames variable E2 to E3 for clarity
src/discmodel/optional_imports.py Fixes bug where _check_flex() was incorrectly checking for "lintsampler" instead of "flex"
src/discmodel/discmodel.py Comments out try-except blocks in rotate_disc() that handled single-particle (N=1) edge cases
pytest.ini Adds pytest configuration to ignore the flex directory during test runs
.github/workflows/test.yaml Minor whitespace cleanup in pytest command

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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

michael-petersen and others added 4 commits November 25, 2025 17:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@michael-petersen michael-petersen merged commit 304866f into ObservationalExpansions:main Nov 25, 2025
10 checks passed
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