Skip to content

feat: enhanced the visualization of plot theme & application theme #172

Closed
achalbajpai wants to merge 24 commits intoOpenMS:mainfrom
achalbajpai:new-testing
Closed

feat: enhanced the visualization of plot theme & application theme #172
achalbajpai wants to merge 24 commits intoOpenMS:mainfrom
achalbajpai:new-testing

Conversation

@achalbajpai
Copy link
Contributor

@achalbajpai achalbajpai commented Mar 12, 2025

Solves #168

Changes Made

  • Added theme selection system with "system", "light", and "dark" options
  • Configured proper theme integration with visualization libraries:
    • Bokeh: Uses "light_minimal"/"dark_minimal" themes
    • Plotly: Uses "plotly_white"/"plotly_dark" templates
    • Matplotlib: Uses default and dark_background styles
  • Enhanced UI responsiveness when changing themes
  • Added system theme detection capability
  • Fixed config.toml to properly handle theme settings

Theme Implementation Details

  • Plots automatically follow the application theme
  • Each visualization library (Bokeh, Plotly, Matplotlib) uses appropriate built-in themes
  • Theme changes are applied immediately with visual feedback
  • Configuration is properly saved to .streamlit/config.toml

Demo

Screen.Recording.2025-03-20.at.8.23.49.PM.mov

Testing Done

  • Tested theme switching between system, light, and dark modes
  • Verified visualization theming works correctly in all modes
  • Confirmed theme persistence after page refreshes
  • Ensured consistent appearance across different operating systems
  • Validated that plots maintain proper contrast in all themes

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced enhanced theme customization via the sidebar, allowing users to choose between light and dark modes with updated colors for a cleaner look.
    • Visualization elements now adapt their styling based on the selected theme for improved clarity.
    • Added a new section for usage statistics settings, allowing users to opt-out of data collection.
  • Improvements

    • Increased overall stability and reliability through improved handling of optional visualization and data features.
    • Updated environment configuration with new dependencies for better performance and functionality.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2025

Walkthrough

This update adjusts the theming and configuration settings across the project. The configuration file now defines specific theme properties and a new browser setting to disable usage statistics. The common module has been enhanced with new functionality for optional plotting library integration, dynamic theme configuration, and improved error handling for missing dependencies and user interface updates. Additionally, the environment file has been reformatted for clarity.

Changes

File(s) Change Summary
.streamlit/config.toml Updated [theme] section with properties: base = "light", backgroundColor = "#FFFFFF", secondaryBackgroundColor = "#F0F2F6", textColor = "#262730"; added new [browser] section with gatherUsageStats = false.
src/common/common.py Added conditional imports for Plotly, Matplotlib, and Bokeh; introduced new configure_plot_theme function for dynamic theming; improved error handling in monitor_hardware, display_large_dataframe, and show_fig; updated sidebar to handle theme selection and update session state/configuration.
environment.yml Python version changed from 3.11 to 3.10; removed previous pip version specification and introduced a new list of pip dependencies with various additions.

Possibly related PRs

Suggested reviewers

  • t0mdavid-m

Poem

I hop on code paths bright and keen,
With themes that change as if by dream.
Colors dance upon my view,
Errors handled, fresh and new.
CodeRabbit cheers in joyful flight—
Happy hops into the night!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1871639 and 2cca57a.

📒 Files selected for processing (1)
  • .streamlit/config.toml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-openms
  • GitHub Check: build-simple-app
  • GitHub Check: build-full-app
🔇 Additional comments (2)
.streamlit/config.toml (2)

1-2: Approve: Browser Usage Settings Are Correct
The new [browser] section with gatherUsageStats = false explicitly disables the collection of usage statistics, which aligns well with the PR objectives for user privacy and reduced telemetry.


13-13: Approve: Theme Configuration Now Aligns with PR Objectives
The theme configuration values have been updated as follows:

  • base = "light" (Line 13) ensures the application is centered around a light theme.
  • backgroundColor = "#FFFFFF" (Line 19) sets a clear white main content background.
  • secondaryBackgroundColor = "#F0F2F6" (Line 22) provides an appropriate light gray for the sidebar and widgets.
  • textColor = "#262730" (Line 25) offers a dark tone for text ensuring readability.

These changes are consistent with the PR objectives and address previous feedback about theme mismatches.

Also applies to: 19-19, 22-22, 25-25


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.streamlit/config.toml (1)

23-24: Font Configuration Left as Default
The font property remains commented out. This is acceptable for now if the default font settings are desired. In future iterations, you might consider making the font configurable for enhanced customization.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7183499 and d387a31.

📒 Files selected for processing (1)
  • .streamlit/config.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: build-full-app
  • GitHub Check: build-openms
  • GitHub Check: build-simple-app
  • GitHub Check: build
🔇 Additional comments (5)
.streamlit/config.toml (5)

8-9: Enforce Light Mode Theme
The configuration now explicitly forces a light mode theme by setting base = "light" along with a clarifying comment. This change directly addresses the PR objective of preventing system default theme settings.


15-15: Explicit Background Color Configuration
The main content area's background color is set to white (#FFFFFF), ensuring visual consistency in light mode.


18-18: Defined Secondary Background Color
The sidebar and interactive widget background color is now explicitly defined as light gray (#F0F2F6), which helps maintain a coherent light theme throughout the application.


21-21: Explicit Text Color for Readability
Setting the text color to a dark shade (#262730) ensures sufficient contrast against light backgrounds, thereby improving readability.


26-27: Disabling Browser Usage Statistics
Introducing the [browser] section with gatherUsageStats = false is a prudent step toward enhancing user privacy by preventing unwanted usage data collection. This change directly aligns with the PR objectives.

@jcharkow jcharkow self-requested a review March 12, 2025 14:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/common/common.py (1)

264-264: Improve code quality with static analysis suggestions

There are two minor code quality improvements that could be made to this line.

-    if "controllo" not in st.session_state or (
-        "controllo" in params.keys() and params["controllo"] == False
-    ):
+    if "controllo" not in st.session_state or (
+        "controllo" in params and not params["controllo"]
+    ):
🧰 Tools
🪛 Ruff (0.8.2)

264-264: Use key in dict instead of key in dict.keys()

Remove .keys()

(SIM118)


264-264: Avoid equality comparisons to False; use if not params["controllo"]: for false checks

Replace with not params["controllo"]

(E712)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d387a31 and 148f809.

📒 Files selected for processing (1)
  • src/common/common.py (14 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
src/common/common.py

264-264: Use key in dict instead of key in dict.keys()

Remove .keys()

(SIM118)


264-264: Avoid equality comparisons to False; use if not params["controllo"]: for false checks

Replace with not params["controllo"]

(E712)

🔇 Additional comments (5)
src/common/common.py (5)

10-13: LGTM: Necessary imports added for enhanced plotting capabilities

The added imports for plotly, matplotlib, and bokeh are appropriate and necessary for the new theme configuration functionality.


344-365: Well-implemented theme settings in sidebar

The addition of theme settings in the sidebar is well-structured and provides users with clear options to select their preferred plot theme. Good implementation of session state to persist user preferences.


502-639: Comprehensive implementation of plot theme configuration

The configure_plot_theme function effectively handles theme configuration for multiple plotting libraries (matplotlib, plotly, and bokeh). The implementation is thorough with specific settings for both light and dark modes, ensuring consistent visualization across the application.


660-723: Theme configuration properly applied to Plotly figures

The updates to the show_fig function correctly apply the theme settings to Plotly figures, ensuring consistent visualization appearance. The conditional logic properly handles different theme modes.


147-150: LGTM: Appropriate tracking consent check

The tracking consent logic is correctly implemented, ensuring that user preferences are respected and analytics are only enabled when appropriate.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
environment.yml (4)

5-5: New Channel Addition: bioconda
The bioconda channel has been added alongside conda-forge. Please ensure the channel priority is as intended and consider adding a brief comment on why the bioconda channel is required for this environment.


12-12: Version Pinning for bokeh Dependency
The bokeh dependency has been added without an explicit version specifier. For reproducibility, it's recommended to pin the version (e.g., bokeh==2.4.3) and document the version choice if specific features or stability are required.

-   - bokeh
+   - bokeh==<version_number>  # replace <version_number> with the desired version

19-19: Confirm Compatibility for pyopenms==3.2.0
The pyopenms==3.2.0 dependency is now added through pip. Please verify that this version is compatible with the specified numpy==1.26.4 (as noted in the comment) and other dependencies in the environment. Consider adding a note if this specific version is required due to compatibility reasons.


22-22: Assess Version Choice for psutil==7.0.0
The dependency psutil==7.0.0 is explicitly pinned. Since psutil has seen several updates, please double-check that this version is intended and note any constraints leading to this specific pin. If flexibility is acceptable, version wildcards or a higher version might be considered.

-        - psutil==7.0.0
+        - psutil==<version_number>  # update if a newer version is acceptable or document why v7.0.0 is used
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 148f809 and b1b9e6c.

📒 Files selected for processing (1)
  • environment.yml (1 hunks)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/common/common.py (2)

502-639: Comprehensive theming implementation across multiple visualization libraries.

The configure_plot_theme function effectively handles theme configuration for matplotlib, plotly, and bokeh. The color selections provide good contrast in both themes and the implementation follows best practices for each library.

One suggestion would be to consider extracting the theme configurations to a separate module if this functionality grows in the future, as this function is quite long.


264-265: Simplify condition check for better readability.

The current condition uses .keys() unnecessarily and directly compares a boolean to False.

-if "controllo" not in st.session_state or (
-    "controllo" in params.keys() and params["controllo"] == False
-):
+if "controllo" not in st.session_state or (
+    "controllo" in params and not params["controllo"]
+):
🧰 Tools
🪛 Ruff (0.8.2)

264-264: Use key in dict instead of key in dict.keys()

Remove .keys()

(SIM118)


264-264: Avoid equality comparisons to False; use if not params["controllo"]: for false checks

Replace with not params["controllo"]

(E712)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1b9e6c and d4de789.

📒 Files selected for processing (3)
  • environment.yml (1 hunks)
  • src/common/common.py (14 hunks)
  • test_gui.py (4 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
src/common/common.py

264-264: Use key in dict instead of key in dict.keys()

Remove .keys()

(SIM118)


264-264: Avoid equality comparisons to False; use if not params["controllo"]: for false checks

Replace with not params["controllo"]

(E712)

🔇 Additional comments (12)
src/common/common.py (3)

10-13: Good addition of necessary imports for theme configuration.

These imports are required for the new theming functionality and are appropriately placed at the top of the file.


344-356: Well-implemented theme selection UI.

The theme settings interface is cleanly integrated into the sidebar with appropriate default values and help text. The theme options ("system", "light", "dark") provide good flexibility for users.


660-723: Good integration of theme configuration with the existing plotting functionality.

The updates to the show_fig function properly apply the selected theme to plotly charts. The conditional styling based on the theme ensures consistency across the application.

environment.yml (3)

5-5: Addition of bioconda channel is appropriate.

Adding the bioconda channel is a good choice for accessing bioinformatics packages.


11-14: Good addition of dependencies with specific versions.

The added dependencies (bokeh, pandas, pytest) with pinned versions ensure compatibility and reproducibility. The comment explaining the addition of pandas and pytest is helpful for future maintainers.


20-23: Appropriate placement of pip-specific dependencies.

Moving pyopenms to the pip section and adding psutil with a specific version is appropriate. These dependencies align with the updated functionality in the codebase.

test_gui.py (6)

16-17: Consistent string formatting in test configuration.

The change to use double quotes instead of single quotes improves consistency with the rest of the codebase.


22-39: Improved test parameterization formatting.

The reformatting of test parameters into a multi-line tuple improves readability without changing functionality.


42-42: Increased timeout improves test reliability.

Increasing the timeout from 3 to 10 seconds will make the tests more reliable, especially in CI/CD environments where resources might be constrained.


46-60: Consistent formatting for parameterized tests.

The restructured parameter formatting makes the test definitions more readable and maintainable.


77-86: Well-formatted test parameterization.

The parameterization is now more readable with one test case per line in a clear structure.


103-113: Consistent test parameterization style.

This formatting change maintains the same improved style as the other parameterized tests in the file.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0af3423 and 1d10e26.

📒 Files selected for processing (2)
  • environment.yml (1 hunks)
  • src/common/common.py (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-simple-app
  • GitHub Check: build-full-app
  • GitHub Check: build-openms
🔇 Additional comments (8)
src/common/common.py (4)

10-13: Added necessary imports for theme configuration

The new imports for Plotly, Matplotlib, and Bokeh support the theme configuration functionality that's being implemented. These are appropriate libraries for the task of customizing plot appearances.


377-389: Good addition of theme customization options

The new theme settings section in the sidebar provides users with the ability to choose between system, light, and dark themes. This aligns with the PR objective to control theming, while still offering flexibility for users who may prefer different themes.


538-676: Well-implemented theme configuration function

The configure_plot_theme function is comprehensive and handles theme configuration for multiple visualization libraries (Matplotlib, Plotly, and Bokeh). The function properly handles both light and dark themes with detailed color settings that ensure good contrast and readability.

The implementation is robust, with appropriate color choices for each theme and careful attention to accessibility considerations.


696-759: Effective integration of theme configuration in the show_fig function

The updates to the show_fig function properly integrate the new theming capabilities by calling configure_plot_theme() and updating the Plotly figure layout based on the selected theme. The explicit settings for background colors, grid colors, and font colors ensure a consistent appearance across the application.

environment.yml (4)

5-5: Added bioconda channel for expanded package access

Adding the bioconda channel is appropriate as it provides access to bioinformatics packages that may be relevant for this application.


11-12: Added explicit dependencies with version specifications

Good practice to specify exact versions for pandas and pytest. This ensures reproducibility and consistent behavior across different environments.


21-21: Added pyopenms dependency

Adding the pyopenms package with a specific version is appropriate and follows the version specification pattern used for other dependencies.


24-25: Moved bokeh to pip dependencies with version specification

Moving bokeh to pip dependencies with a specific version is good for cross-platform compatibility as mentioned in the comment. However, as noted earlier, bokeh is also listed as a conda dependency which could cause conflicts.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test_gui.py (1)

99-99: Consider addressing the TODO comment.

There's an unresolved TODO comment about selecting a spectrum to be displayed. Consider implementing this functionality or creating a separate issue to track it.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d10e26 and c174f50.

📒 Files selected for processing (2)
  • src/common/common.py (4 hunks)
  • test_gui.py (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-full-app
  • GitHub Check: build-openms
  • GitHub Check: build-simple-app
🔇 Additional comments (8)
src/common/common.py (3)

10-13: Good addition of necessary imports.

The new imports for plotly, matplotlib, and bokeh are necessary for the theme configuration functionality. These libraries are correctly imported with appropriate aliases.


377-389: Well-structured theme settings implementation.

The addition of theme settings in the sidebar provides users with good customization options. The implementation is clean with proper default value handling and helpful tooltips.


696-759: Good integration of theme configuration with figure display.

The updates to the show_fig function properly integrate the theme configuration before displaying figures and apply consistent styling to Plotly figures. The implementation handles both light and dark themes with appropriate color schemes and styling parameters.

test_gui.py (5)

16-17: Proper test configuration.

Setting test to True in settings and adding the workspace secret is necessary for proper test execution.


22-39: Improved parameterization readability.

The multi-line formatting of the parameterization decorator enhances code readability, especially for longer parameter lists.


42-42: Appropriate timeout increase.

Increasing the timeout from 3 to 10 seconds provides more time for the application to launch, which is reasonable for complex UI initialization, especially with the new theming functionality.


47-61: Enhanced readability with proper formatting.

The multi-line formatting of the test parameters improves code readability and maintainability.


104-114: Improved test parameter formatting.

The updated formatting enhances readability of the test parameters.

@t0mdavid-m
Copy link
Member

Hi @t0mdavid-m, the PR #172 addresses the following issue. Please take a look at it.

I’ll update the theme as well. However, wouldn’t it be better for the user to have the plot theme aligned with their preferences rather than auto-adjusting it ? I’d love to hear your thoughts on this and will definitely implement your preferred solution for the same.

Implemented my thoughts in the below video -

Thanks for updating the PR. Looks like we found a good solution to display dark mode for the plots. In this case of course light mode should not be fixed. Could you update the toggle to change the global theme as you suggested initially? I also have some thoughts regarding the existing code so please also consider my review!

@t0mdavid-m t0mdavid-m linked an issue Mar 15, 2025 that may be closed by this pull request
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8df64db and a3253e4.

📒 Files selected for processing (3)
  • environment.yml (1 hunks)
  • requirements.txt (1 hunks)
  • src/common/common.py (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-simple-app
  • GitHub Check: build-full-app
  • GitHub Check: build-openms
🔇 Additional comments (10)
src/common/common.py (6)

11-18: Good approach for optional Plotly imports.
By wrapping Plotly imports in a try/except, the code gracefully handles the scenario where Plotly is not installed.


19-25: Consistent optional import pattern for Matplotlib.
Similarly, the logic for MPL_AVAILABLE follows the same pattern as Plotly, which keeps the code robust when libraries are missing.


26-33: Optional Bokeh import is well-structured.
Your continuing pattern of guarded imports (for Bokeh) is consistent and helps prevent runtime errors.


36-42: Optional psutil import.
This maintains consistent handling of optional dependencies. Good job ensuring the rest of the module can function without psutil.


59-61: Clear warning for missing psutil.
Displaying a warning is a user-friendly approach to inform about unavailable resource monitoring.


728-791: Plotly theme logic duplicates dark mode support.
In line with enforcing a global light theme, retaining the dark color scheme might be unnecessary. Double-check whether these two paths are truly needed.

requirements.txt (1)

11-12: Added testing & data manipulation libraries.
Including pandas==2.2.1 and pytest==8.0.0 is beneficial. Please verify compatibility with existing code and ensure no version conflicts with your environment constraints.

environment.yml (3)

5-5: New channel: bioconda.
This channel can be important for bioinformatics packages. Validate that it does not conflict with conda-forge dependencies.


11-12: Consistency in adding pandas & pytest.
Aligns with the changes made in requirements.txt. Ensure the pinned versions match all distribution environments.


19-19: Introduced pyopenms in pip dependencies.
Double-check for version compatibility with conda installation, especially since pyopenms also depends on numpy.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/common/common.py (1)

743-805: 🛠️ Refactor suggestion

Well-implemented but check for library availability before configuration.

The configure_plot_theme function is well structured with comprehensive styling for multiple visualization libraries. However, you should check for library availability at the beginning of the function to prevent any runtime errors.

def configure_plot_theme():
    """Configure plot themes based on Streamlit's theme."""
    # Get the current theme based on user preference
    theme_mode = st.session_state.plot_theme
    
-    if MPL_AVAILABLE:
+    # Early return if no plotting libraries are available
+    if not any([MPL_AVAILABLE, PLOTLY_AVAILABLE, BOKEH_AVAILABLE]):
+        return
+        
+    if MPL_AVAILABLE:
🧹 Nitpick comments (2)
src/common/common.py (2)

507-571: File modification concerns in certain environments.

Directly modifying the .streamlit/config.toml file might cause issues in certain deployment environments where file writes are restricted (like containerized deployments or read-only filesystems). Consider:

  1. Using Streamlit's session state for temporary theme changes
  2. Implementing theme changes through environment variables
  3. Adding checks for file write permissions before attempting modifications

573-593: Potential UX inconsistency with separate theme controls.

Having separate controls for application theme and plot theme could lead to a confusing user experience if they don't match. Consider:

  1. Syncing the plot theme with the application theme automatically
  2. Adding a note explaining that plot themes can be different from the application theme
  3. Providing visual feedback showing how plots will appear with the selected theme
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3253e4 and 6bb91f9.

📒 Files selected for processing (1)
  • src/common/common.py (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-openms
  • GitHub Check: build-full-app
  • GitHub Check: build-simple-app
🔇 Additional comments (5)
src/common/common.py (5)

11-32: Good implementation of optional plotting package imports.

The conditional imports for plotting libraries (plotly, matplotlib, bokeh) with availability checks is a good practice. This makes these dependencies optional rather than required, which improves the application's flexibility.


37-42: Well-handled psutil optional dependency.

Making psutil optional with appropriate availability checks is a good approach, especially if this dependency has been removed from environment files as mentioned in the AI summary.


57-66: Effective caching implementation for system metrics.

Using st.cache_resource with a TTL parameter is an excellent optimization to prevent frequent updates of system metrics, reducing unnecessary system calls.


68-82: Good enhancement to resource monitoring function.

The modified monitor_hardware function now properly handles the case where psutil is not available and uses the cached metrics function. This makes the code more robust and maintainable.


825-881: Good plot rendering with theme-aware configuration.

The modifications to show_fig effectively apply theme configuration before displaying figures and update the Plotly figure layout based on the selected theme. This ensures visual consistency.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.streamlit/config.toml (1)

22-23: Optional: Font Customization Reminder

The font property remains commented out. If a consistent typography is desired across the application, please consider specifying a default font family.

🛑 Comments failed to post (2)
.streamlit/config.toml (2)

13-19: 🛠️ Refactor suggestion

⚠️ Potential issue

Color Configuration Mismatch

According to the PR objectives, the color values should support a light mode theme:

  • The main content background should be white (#FFFFFF) instead of the current dark color (#0E1117).
  • The sidebar background should use a light gray (e.g., #F0F2F6) rather than #262730.
  • The text color should be a dark shade (#262730) for good contrast on a light background, instead of #FAFAFA.

Please update these values accordingly for a consistent light mode theme.

- backgroundColor = "#0E1117"
+ backgroundColor = "#FFFFFF"

- secondaryBackgroundColor = "#262730"
+ secondaryBackgroundColor = "#F0F2F6"

- textColor = "#FAFAFA"
+ textColor = "#262730"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

backgroundColor = "#FFFFFF"

# Background color used for the sidebar and most interactive widgets.
secondaryBackgroundColor = "#F0F2F6"

# Color used for almost all text.
textColor = "#262730"

8-8: 🛠️ Refactor suggestion

⚠️ Potential issue

Theme Mode Mismatch

The PR objective states that the application should enforce a light mode theme, but here the theme is set to dark mode with base = "dark". Please update this value to "light" to align with the intended behavior.

- base = "dark"
+ base = "light"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

base = "light"

@achalbajpai achalbajpai force-pushed the new-testing branch 2 times, most recently from 32face0 to a3253e4 Compare March 15, 2025 13:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

♻️ Duplicate comments (3)
src/common/common.py (3)

401-561: ⚠️ Potential issue

Theme toggle conflicts with PR objective “enforce light mode.”
The code introduces a user-selectable theme (“light” or “dark”), yet the PR objective explicitly states a requirement to prevent system defaults and enforce a light theme. This implementation allows users to switch to dark mode, contradicting that objective.

To align with the PR goal of a strictly enforced light mode, consider removing the dark theme path and user toggle. You can still provide customizeable light-mode variations if brand guidelines require it, but dark mode is out of scope per the stated objective.

Below is an example diff that removes the theme toggle in this block and defaults to the light theme only:

- # Application Theme settings
- st.markdown("## Application Theme")
- theme_options = ["light", "dark"]
- ...
- # Entire logic for reading config.toml and switching to "dark"
- # or rewriting colors for "dark" can be removed.
+ st.markdown("**Application theme is enforced as light**")
+ # If desired, you can still override specific light colors here,
+ # but no toggling to dark mode.

732-794: ⚠️ Potential issue

Dark-mode branch in configure_plot_theme conflicts with enforced light mode.
This function diligently configures theme colors for matplotlib, Plotly, and Bokeh in both light and dark modes. In light of the PR objective, consider removing the dark-mode logic and focusing strictly on a single light-mode configuration.

 def configure_plot_theme():
     """Configure plot themes based on Streamlit's theme."""
-    theme_mode = st.session_state.plot_theme
-    if MPL_AVAILABLE:
-        if theme_mode == "light":
-            plt.style.use("default")
-        else:
-            plt.style.use("dark_background")
+    # Force a single light style
+    if MPL_AVAILABLE:
+        plt.style.use("default")

-    if PLOTLY_AVAILABLE:
-        if theme_mode == "light":
-            pio.templates.default = "seaborn"
-        else:
-            pio.templates.default = "plotly_dark"
+    if PLOTLY_AVAILABLE:
+        pio.templates.default = "seaborn"

-    if BOKEH_AVAILABLE:
-        if theme_mode == "light":
-            # Light theme configuration
-            ...
-        else:
-            # Dark theme configuration
-            ...
+    if BOKEH_AVAILABLE:
+        # Apply a single light-theme JSON
+        ...

562-583: ⚠️ Potential issue

Plot theme toggle also contradicts enforced light mode.
Similar to the application theme toggle, the “Plot Theme” selectbox here reintroduces a dark option. If you truly must enforce light mode globally, remove or disable the dark path for plots.

- st.markdown("## Plot Theme")
- ...
- theme_options = ["light", "dark"]
- st.selectbox(
-    "Plot Theme",
-    theme_options,
-    index=theme_options.index(st.session_state.plot_theme),
-    key="plot_theme",
-    ...
- )
+ st.markdown("**Plot Theme is enforced: light**")
+ # Remove or disable the dark mode option
🛑 Comments failed to post (1)
src/common/common.py (1)

814-870: ⚠️ Potential issue

Dark layout logic in show_fig function also undermines light-only enforcement.
This block updates Plotly chart layouts for both “light” and “dark.” Remove the dark variants if you intend a purely light environment.

 if hasattr(fig, "update_layout"):
-    if theme_mode == "light":
-        fig.update_layout(
-            paper_bgcolor="white",
-            ...
-        )
-    else:
-        fig.update_layout(
-            paper_bgcolor="#0E1117",
-            ...
-        )
+    fig.update_layout(
+        paper_bgcolor="white",
+        plot_bgcolor="white",
+        font_color="black",
+        ...
+    )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    # Configure plot theme before displaying
    configure_plot_theme()

    # Get current theme based on plot theme setting
    theme_mode = st.session_state.plot_theme

    # Update Plotly figure layout based on theme
    if hasattr(fig, "update_layout"):
-        if theme_mode == "light":
-            fig.update_layout(
-                paper_bgcolor="white",
-                plot_bgcolor="white",
-                font_color="black",
-                xaxis=dict(
-                    gridcolor="lightgray",
-                    gridwidth=1,
-                    griddash="dash",
-                    linecolor="black",
-                    linewidth=1,
-                    ticks="outside",
-                    tickfont=dict(color="black"),
-                ),
-                yaxis=dict(
-                    gridcolor="lightgray",
-                    gridwidth=1,
-                    griddash="dash",
-                    linecolor="black",
-                    linewidth=1,
-                    ticks="outside",
-                    tickfont=dict(color="black"),
-                ),
-            )
-        else:
-            fig.update_layout(
-                paper_bgcolor="#0E1117",
-                plot_bgcolor="#0E1117",
-                font_color="#FFFFFF",  # Brighter white for better contrast
-                xaxis=dict(
-                    gridcolor="#555555",  # Slightly brighter grid
-                    gridwidth=1,
-                    griddash="dash",
-                    linecolor="#FFFFFF",  # Brighter white for better contrast
-                    linewidth=1,
-                    ticks="outside",
-                    tickfont=dict(color="#FFFFFF"),
-                ),
-                yaxis=dict(
-                    gridcolor="#555555",  # Slightly brighter grid
-                    gridwidth=1,
-                    griddash="dash",
-                    linecolor="#FFFFFF",  # Brighter white for better contrast
-                    linewidth=1,
-                    ticks="outside",
-                    tickfont=dict(color="#FFFFFF"),
-                ),
-            )
+        fig.update_layout(
+            paper_bgcolor="white",
+            plot_bgcolor="white",
+            font_color="black",
+            xaxis=dict(
+                gridcolor="lightgray",
+                gridwidth=1,
+                griddash="dash",
+                linecolor="black",
+                linewidth=1,
+                ticks="outside",
+                tickfont=dict(color="black"),
+            ),
+            yaxis=dict(
+                gridcolor="lightgray",
+                gridwidth=1,
+                griddash="dash",
+                linecolor="black",
+                linewidth=1,
+                ticks="outside",
+                tickfont=dict(color="black"),
+            ),
+        )

@achalbajpai achalbajpai force-pushed the new-testing branch 2 times, most recently from 0b009f4 to ca8e8fd Compare March 20, 2025 14:20
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
src/common/common.py (1)

452-609: ⚠️ Potential issue

Conflict with PR objective to enforce light mode.

While this code allows the user to switch to "system" or "dark" themes, the PR objective is to enforce a consistent light theme and avoid system overrides. If strict enforcement is desired, remove or disable these other options to ensure the application remains in light mode.

A minimal fix would be to restrict the theme options to only light mode, for example:

- theme_options = ["system", "light", "dark"]
+ theme_options = ["light"]

You might also remove or comment out the code blocks that apply the dark theme CSS and update config.toml for dark mode to prevent any user override.

🧹 Nitpick comments (1)
src/common/common.py (1)

26-32: Unused Theme import detected.

According to static analysis, bokeh.themes.Theme is not actually used in the code. Consider removing it to keep your imports clean.

- from bokeh.themes import Theme
  from bokeh.io import curdoc
🧰 Tools
🪛 Ruff (0.8.2)

27-27: bokeh.themes.Theme imported but unused; consider using importlib.util.find_spec to test for availability

(F401)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fda25d and 15e985f.

📒 Files selected for processing (3)
  • .streamlit/config.toml (1 hunks)
  • environment.yml (1 hunks)
  • src/common/common.py (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • environment.yml
🧰 Additional context used
🪛 Ruff (0.8.2)
src/common/common.py

27-27: bokeh.themes.Theme imported but unused; consider using importlib.util.find_spec to test for availability

(F401)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-openms
  • GitHub Check: build-full-app
🔇 Additional comments (16)
.streamlit/config.toml (2)

10-22: Great job enforcing the light mode theme.

The base property is correctly set to "light", and the background/color settings align well with the PR objective to enforce a consistent light mode.


27-28: Explicitly disabling usage stats.

This change prevents Streamlit from collecting usage statistics. If this aligns with your privacy or organizational requirements, it looks good.

src/common/common.py (14)

11-18: Optional Plotly import handled gracefully.

Good approach using a try/except block to conditionally set PLOTLY_AVAILABLE. This avoids breaking functionality if Plotly is not installed.


19-24: Optional Matplotlib import handled properly.

Similar to Plotly, this is a good pattern for gracefully handling missing optional dependencies.


36-43: Optional Pandas import seems well-structured.

This approach correctly falls back to a substitute class if Pandas is not available, preventing runtime errors.


44-63: Minimal DataFrame substitute is a practical solution.

Providing a lightweight fallback class avoids breaking the UI in environments lacking Pandas.


65-70: Optional psutil import is solid.

Good pattern for systems where psutil is not installed. The rest of the code remains functional without it.


87-118: Robust error handling in monitor_hardware.

Catching errors and providing warnings is beneficial for different platforms and configurations. Nicely done.


211-211: Added page configuration comment.

This clarifies the placement of st.set_page_config. No issues found.


611-619: Export settings block looks fine.

Providing a selectbox for image export formats is straightforward and matches the rest of your UI design.


692-695: Graceful fallback for missing Pandas in display_large_dataframe.

Showing a warning and proceeding is user-friendly and consistent with your optional dependency approach.


717-741: Chunk-based DataFrame display logic is clear.

Paginating large data in manageable chunks helps performance and user experience. Good implementation.


759-779: show_table fallback path is well-handled.

Continuing to display minimal table info when Pandas is absent avoids breaking the UI.


781-815: Dark theme handling duplicates the same conflict.

This function configures both light and dark themes, conflicting with the PR objective of strictly enforcing light mode (already flagged in lines 452-609).


835-944: Plot layout logic again provides dark mode support.

As with earlier comments, this duplicates the conflict with your strict light mode requirement.


976-986: Memory usage calculation is well-handled.

Returning zero when Pandas is unavailable prevents potential crashes and keeps the flow consistent.

@t0mdavid-m
Copy link
Member

Let me know if the PR is ready for review.

@achalbajpai
Copy link
Contributor Author

Hi @t0mdavid-m , yes it is , have upload the final video sample in #168 (comment)

Copy link
Member

@t0mdavid-m t0mdavid-m left a comment

Choose a reason for hiding this comment

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

Looks good overall! Thanks for the changes. I think there was a bit of miscommunication with checking if packages are available. We only need to do this for the plotting packages as they are optional dependencies (i.e. the user can decide which one they want to use and then only install the required ones). All other packages are not optional dependencies and we can thus assume they are installed.

Could you also doublecheck whether the modification of the css styling is neccessary (see relevant comment)?

# Apply immediate visual feedback for the current session
if selected_theme == "dark":
# Apply dark theme CSS immediately
st.markdown(
Copy link
Member

Choose a reason for hiding this comment

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

Is this really necessary? I am a bit fearful that this could be a lot of effort to maintain if Streamlit changes the way they do this internally (i.e. it relies on implementation details). Did you have trouble updating the config in a running server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this really necessary? I am a bit fearful that this could be a lot of effort to maintain if Streamlit changes the way they do this internally (i.e. it relies on implementation details). Did you have trouble updating the config in a running server?

Yes I did have problem updating the config in a running server ,
After extensive testing and research, I've discovered this is a fundamental limitation with Streamlit's theming system.

I tried around 3 approaches , the current one fits the best ( session state , css + selector didnt work properly at all cases )

The Streamlit documentation acknowledges there's no officially supported way to programmatically change themes at runtime , other than the one I tried to figure out.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/common/common.py (3)

15-36: Consider refactoring repeated optional import logic
The try-except blocks for optional libraries (plotly, matplotlib, and bokeh) look fine. As a minor improvement, consider factoring out this pattern into a small helper function to reduce repetition.


416-553: Refactor dynamic config writes for maintainability
Rewriting the .streamlit/config.toml on the fly can complicate concurrency or multi-user scenarios (e.g., conflicting writes). Consider extracting this logic into a dedicated function that locks or queues writes, ensuring more control and clarity.


662-686: Remove leftover debug statement
The print(base_index) call at line 684 appears to be a debug artifact. Consider removing or replacing it with proper logging to keep production code clean.

-            print(base_index)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3424cad and 55ae1f1.

📒 Files selected for processing (1)
  • src/common/common.py (9 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
src/common/common.py

637-637: Undefined name PANDAS_AVAILABLE

(F821)


704-704: Undefined name PANDAS_AVAILABLE

(F821)


921-921: Undefined name PANDAS_AVAILABLE

(F821)

🔇 Additional comments (8)
src/common/common.py (8)

12-13: No issues with added import statement
No concerns here; the additional import of streamlit is straightforward.


53-53: Docstring change looks good
The updated docstring clearly states the function's purpose.


156-156: No concerns regarding page configuration comment
The explanatory comment is fine and aligns with Streamlit requirements.


397-414: Verify “system” theme detection logic
When “system” is selected, you rely on st.get_option("theme.base") to indicate “light” or “dark.” Confirm that no mismatch occurs if the config is actually set to “system.” You may want to handle a true "system" mode or fallback more explicitly.


687-689: Error handling block looks fine
Showing a warning and displaying fallback content on exception is a good approach here.


709-724: Data table display and download flow
The fallback if pandas is unavailable is handled nicely, and the try-except pattern is appropriate for error resilience.


726-760: Plot theme configuration is clear
This function successfully covers all three libraries with safe try-except usage and straightforward style application.


762-893: show_fig implementation seems solid
Passing the figure through theme updates and customizing layout based on the selected theme is a comprehensive approach. No major concerns.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/common/common.py (3)

15-21: Consolidate optional imports for maintainability.
The repeated try/except blocks for Plotly, Matplotlib, and Bokeh are fine for handling optional dependencies. However, you could consider factoring them into a common helper to reduce repetition and streamline installation checks.

Also applies to: 23-28, 30-35


703-737: Central theme configuration is well-structured.
The configure_plot_theme function cleanly configures Matplotlib, Plotly, and Bokeh themes. If you plan to add more libraries in the future, consider exposing a single uniform interface or hooking into session state to avoid repeated calls.


763-867: Dynamic layout updates are good, but consider DRY.
The code to update layout for light/dark themes is thorough but repetitive. Refactoring into a helper function or dictionary-driven approach could reduce duplication and improve readability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 55ae1f1 and ee79da8.

📒 Files selected for processing (1)
  • src/common/common.py (6 hunks)
🔇 Additional comments (6)
src/common/common.py (6)

12-13: Use caution with library version management.
The addition of import streamlit as st is correct, but ensure that the Streamlit version in use supports all utilized features.


53-54: Docstring update confirmed.
The docstring for monitor_hardware is concise and clear.


156-157: Ensure page config is set before other Streamlit calls.
Calling st.set_page_config first is a best practice to avoid exceptions. This looks good.


555-556: Export and spectrum plotting configuration look good.
The additions for image export and spectrum plotting are straightforward. Be sure to add or update tests if needed.

Also applies to: 564-565


757-760: Graceful handling of missing Plotly.
Showing a warning and halting execution of the function is a reasonable approach. This avoids runtime errors if Plotly is absent.


868-869: Robust error handling for figure display.
Catching exceptions and showing a user-facing warning helps avoid silent failures. Consider logging errors as well if you have a logging setup.

@achalbajpai achalbajpai force-pushed the new-testing branch 2 times, most recently from a1ff67c to ee79da8 Compare March 30, 2025 05:04
@achalbajpai
Copy link
Contributor Author

Looks good overall! Thanks for the changes. I think there was a bit of miscommunication with checking if packages are available. We only need to do this for the plotting packages as they are optional dependencies (i.e. the user can decide which one they want to use and then only install the required ones). All other packages are not optional dependencies and we can thus assume they are installed.

Could you also doublecheck whether the modification of the css styling is neccessary (see relevant comment)?

Hi @t0mdavid-m ,

  • The checking is now only for the plotting packages
  • Yes , the modification is important for now as streamlit does not have a proper solution to change at runtime , I tried to read alot of documentations related to this and wasn't able to find a suitable one that solves this , other than this.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
environment.yml (1)

38-54: Remaining Pip Dependencies: Documentation and Essentiality
The final block lists additional pinned packages (from pyparsing to watchdog). While pinning versions ensures reproducibility, please review each dependency to confirm that it is essential for supporting the application's enhanced theming and visualization features. Documenting any non-obvious dependencies could also aid future maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee79da8 and 1871639.

📒 Files selected for processing (1)
  • environment.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-openms
  • GitHub Check: build-full-app
🔇 Additional comments (6)
environment.yml (6)

3-3: Python Version Update: Verify Intentional Downgrade
The Python version is now set to 3.10. Please confirm that this change (if previously using a later version such as 3.11) is deliberate and that all dependencies and project features are compatible with Python 3.10.


4-5: Pip Dependency Declaration: Structure Check
The inclusion of both - pip and the nested - pip: block for specifying pip packages is a conventional practice in conda environments. Confirm that this structure meets your project’s dependency management expectations.


6-9: UI and Plotting Dependencies: Version Compatibility
The added pip dependencies starting with altair==5.5.0, attrs==25.3.0, blinker==1.9.0, and cachetools==5.5.2 are likely tied to UI enhancements and visualization features. Please verify that their pinned versions are fully compatible with the overall theming and plotting improvements introduced in this PR.


10-10: Unexpected captcha Dependency: Confirmation Needed
The addition of captcha==0.5.0 is not clearly aligned with the PR’s focus on enhancing plot and application themes. Please confirm whether this dependency is required for new functionality, or if it has been included inadvertently.


11-35: Pinned Dependencies for Core Libraries: Compatibility & Relevance
This block pins several important libraries (e.g., certifi, charset-normalizer, click, contourpy, cycler, matplotlib==3.10.1, narwhals, numpy, pandas, plotly==5.22.0, etc.). Ensure that these versions are chosen to support the enhanced theming functionalities without causing conflicts. It might also be helpful to review if any of these packages could be updated or streamlined in future iterations for maintainability.


36-37: PyOpenMS and PyOpenMS-Viz Dependencies: Revisit Necessity
Both pyopenms==3.2.0 and pyopenms-viz==1.0.0 are included. As noted in previous reviews, these dependencies might not be needed unless they serve a specific purpose in your Docker build or overall application functionality. Please confirm their necessity, and if they are not required, consider removing them to avoid unnecessary bloat.

@achalbajpai achalbajpai deleted the new-testing branch May 16, 2025 13:17
@achalbajpai achalbajpai restored the new-testing branch May 21, 2025 02:35
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.

Feature : Add Theme Toggle Button to Sidebar

2 participants