Skip to content

Add UI network inspectors clean base 102 - #106

Draft
cpaniaguam wants to merge 24 commits into
102-separate-linting-workflow-in-cifrom
add-ui-network-inspectors-clean-base-102
Draft

Add UI network inspectors clean base 102#106
cpaniaguam wants to merge 24 commits into
102-separate-linting-workflow-in-cifrom
add-ui-network-inspectors-clean-base-102

Conversation

@cpaniaguam

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d9a861ec-5ee4-42bc-bf8d-a71eae1c443a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.41509% with 195 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lanfactory/network_inspectors/streamlit_app.py 0.00% 178 Missing ⚠️
src/lanfactory/network_inspectors/api.py 69.23% 7 Missing and 5 partials ⚠️
src/lanfactory/network_inspectors/plotting.py 80.00% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/lanfactory/network_inspectors/contracts.py 100.00% <100.00%> (ø)
src/lanfactory/network_inspectors/plotting.py 67.41% <80.00%> (+37.03%) ⬆️
src/lanfactory/network_inspectors/api.py 72.22% <69.23%> (+9.72%) ⬆️
src/lanfactory/network_inspectors/streamlit_app.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A newly added pytest module (test_network_inspectors.py) is placed outside the configured testpaths and therefore will not run in CI, so the intended regression coverage is currently ineffective.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR adds a Streamlit-based UI for LANfactory’s network inspector workflows and refactors the existing inspector logic to separate “compute” from “plot” via explicit result contracts, making it easier to reuse outputs across CLI/UI/testing.

Changes:

  • Introduces a Streamlit app + CLI launcher (network-inspectors-ui) and ships UI styling as package data.
  • Adds contracts.py dataclasses and refactors inspector API/plotting to operate on structured payloads (LikelihoodComparison, ManifoldComputation).
  • Extends/updates tests for the new compute/plot APIs and figure builders.
File summaries
File Description
tests/test_network_inspectors_plotting.py Adds tests for the new plotting figure-builder functions and updated plot contracts.
tests/test_network_inspectors_api.py Adds tests for new compute-layer contract return types and updated plotting-call signatures.
test_network_inspectors.py Adds additional pytest cases (currently not collected due to pytest testpaths).
src/lanfactory/network_inspectors/styles.css Adds Streamlit UI styling, including focus outlines and dark-mode rules.
src/lanfactory/network_inspectors/streamlit_app.py Implements the Streamlit UI for KDE-vs-LAN and manifold workflows, loading models from disk.
src/lanfactory/network_inspectors/plotting.py Refactors plotting into build_*_figure helpers and updates plotting to consume contracts.
src/lanfactory/network_inspectors/contracts.py Adds shared dataclass contracts for compute/plot/UI layers.
src/lanfactory/network_inspectors/api.py Adds compute functions that return contracts; keeps plotting wrappers for backward-style entry points.
src/lanfactory/network_inspectors/init.py Re-exports new compute functions and contracts as public API.
src/lanfactory/cli/network_inspectors_ui.py Adds a CLI entry point to launch the Streamlit UI.
README.md Documents how to install UI extras and launch the UI command.
pyproject.toml Adds ui extra (Streamlit) and registers the network-inspectors-ui console script + CSS package data.
.gitignore Ignores data/ directory (likely used for local model assets).
Review details
  • Files reviewed: 12/13 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread test_network_inspectors.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The refactor cleanly preserves existing entry points via wrappers, adds targeted contract/plot tests, and the new UI/CLI packaging looks consistent with the project’s optional-dependency patterns.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 11/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

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