Skip to content

Feat/imputation improvements#80

Merged
jorgeMFS merged 4 commits intomainfrom
feat/imputation-improvements
Aug 15, 2025
Merged

Feat/imputation improvements#80
jorgeMFS merged 4 commits intomainfrom
feat/imputation-improvements

Conversation

@jorgeMFS
Copy link
Owner

@jorgeMFS jorgeMFS commented Aug 15, 2025

Summary by Sourcery

Prepare v1.2.1 release by enhancing packaging metadata, sanitizing GUI defaults, adding a Streamlit Cloud entrypoint, updating docs, and bumping dependencies

New Features:

  • Sanitize default protected columns in GUI multiselect to avoid errors when config contains missing columns
  • Introduce a Streamlit entrypoint module for Community Cloud deployments

Enhancements:

  • Enrich project metadata in pyproject.toml with authors, classifiers, URLs, and dependencies

Build:

  • Bump package version to 1.2.1 and set README content-type for PyPI
  • Add devcontainer configuration for development environments

Documentation:

  • Update README to specify local and Streamlit Community Cloud launch commands

Chores:

  • Add watchdog to requirements.txt

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 15, 2025

Reviewer's Guide

This PR enriches project packaging metadata and dependencies, adds a Streamlit Cloud entrypoint with devcontainer support, sanitizes GUI multiselect defaults for protected columns, and updates the version and changelog.

Sequence diagram for Streamlit Cloud entrypoint initialization

sequenceDiagram
    participant User as actor User
    participant StreamlitApp as streamlit_app.py
    participant PhenoQCGUI as phenoqc.gui.main
    User->>StreamlitApp: Launch streamlit_app.py
    StreamlitApp->>StreamlitApp: Adjust sys.path for src/
    StreamlitApp->>PhenoQCGUI: Import and call gui_main()
    PhenoQCGUI->>PhenoQCGUI: Start PhenoQC GUI
Loading

Class diagram for Streamlit Cloud entrypoint and GUI main

classDiagram
    class streamlit_app {
        +main()
    }
    class phenoqc.gui {
        +main()
    }
    streamlit_app --> phenoqc.gui : calls main()
Loading

Class diagram for _render_params protected columns sanitization

classDiagram
    class _render_params {
        +spec: dict
        +initial: dict
        +all_columns
        +protected_defaults
        +safe_protected_defaults
        +protected_selected
    }
    _render_params : safe_protected_defaults = [c for c in protected_defaults if c in all_columns]
    _render_params : protected_selected = st.multiselect(..., default=safe_protected_defaults)
Loading

File-Level Changes

Change Details Files
Enrich packaging metadata and dependencies
  • Bump project version to 1.2.1
  • Add authors, license, classifiers and URLs sections
  • Expand dependency list and define optional test dependencies
  • Set README content-type for PyPI
pyproject.toml
Add Streamlit Cloud entrypoint and devcontainer support
  • Create streamlit_app.py to import and run GUI directly
  • Include Streamlit Cloud launch instructions in README
  • Add watchdog to requirements
  • Add .devcontainer configuration file
streamlit_app.py
README.md
requirements.txt
.devcontainer/devcontainer.json
Sanitize GUI protected columns multiselect defaults
  • Filter protected_columns config to available dataset columns
  • Replace default list in st.multiselect with sanitized values
  • Refactor multiselect call formatting for clarity
src/phenoqc/gui/gui.py
Update version and document changes
  • Increment version in package init
  • Add 1.2.1 entry in CHANGELOG.md with packaging notes
src/phenoqc/__init__.py
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider aligning dependencies between pyproject.toml and requirements.txt (e.g., watchdog) to avoid drift and ensure a single source of truth for dependencies.
  • To improve reproducibility, you might specify version ranges or pinned versions for the newly added dependencies in pyproject.toml.
  • The new streamlit_app.py entrypoint replicates CLI startup logic—consider centralizing or reusing the existing CLI main to avoid duplication.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider aligning dependencies between pyproject.toml and requirements.txt (e.g., watchdog) to avoid drift and ensure a single source of truth for dependencies.
- To improve reproducibility, you might specify version ranges or pinned versions for the newly added dependencies in pyproject.toml.
- The new streamlit_app.py entrypoint replicates CLI startup logic—consider centralizing or reusing the existing CLI main to avoid duplication.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/phenoqc/gui/gui.py 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
src/phenoqc/__init__.py 100.00% <100.00%> (ø)
src/phenoqc/gui/gui.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jorgeMFS jorgeMFS merged commit f858530 into main Aug 15, 2025
4 checks passed
@jorgeMFS jorgeMFS deleted the feat/imputation-improvements branch August 15, 2025 15:37
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