Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make selftest resilient to missing optional community dependency#1340

Merged
SkBlaz merged 4 commits intomasterSkBlaz/py3plex:masterfrom
copilot/improve-selftest-functionality-againSkBlaz/py3plex:copilot/improve-selftest-functionality-againCopy head branch name to clipboard
Apr 9, 2026
Merged

Make selftest resilient to missing optional community dependency#1340
SkBlaz merged 4 commits intomasterSkBlaz/py3plex:masterfrom
copilot/improve-selftest-functionality-againSkBlaz/py3plex:copilot/improve-selftest-functionality-againCopy head branch name to clipboard

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

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 assigned Copilot and SkBlaz Apr 8, 2026
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.