Skip to content

Make selftest resilient to missing optional community dependency - #1340

Merged
SkBlaz merged 4 commits into
masterfrom
copilot/improve-selftest-functionality-again
Apr 9, 2026
Merged

Make selftest resilient to missing optional community dependency#1340
SkBlaz merged 4 commits into
masterfrom
copilot/improve-selftest-functionality-again

Conversation

Copilot AI commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

py3plex selftest was too strict for optional capabilities: missing python-louvain could fail the full self-check even when core functionality was healthy. This PR makes selftest distinguish required failures from optional capability skips.

  • Selftest optional dependency behavior

    • Tracks optional module availability during dependency probing.
    • Treats community detection as skippable when community (python-louvain) is not installed.
    • Keeps community check strict when the optional module is present.
  • Selftest summary semantics

    • Separates required pass/fail accounting from skipped checks.
    • Updates summary output to report:
      • required pass ratio
      • skipped count (when present)
    • Returns success when required checks pass, even if optional checks are skipped.
  • CLI test coverage

    • Adds targeted test to simulate missing community import and assert:
      • selftest exits successfully
      • skip is explicitly reported
      • skipped count appears in summary
if not optional_status.get("community"):
    print("   [-] Community detection skipped: python-louvain is not installed")
    community_status = None

Copilot AI linked an issue Apr 8, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Improve selftest functionality Make selftest resilient to missing optional community dependency Apr 8, 2026
Copilot AI requested a review from SkBlaz April 8, 2026 21:01
@SkBlaz
SkBlaz marked this pull request as ready for review April 9, 2026 15:41
@SkBlaz
SkBlaz merged commit 43cba60 into master Apr 9, 2026
34 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.

selftest

2 participants