Mv enrichment plot - #45
Conversation
- order does not yet match between versions of the plot - naming scheme of get vs create not perfect - static plot needs a simpler get_enrichtment_plot function for notebook use
- use pandera schemas - return a single plot
- validate input - create figure (acore version)
255ef2e to
46c4aa8
Compare
Normal DataFrame allowed, but it is always validated against the schema. These function can be moved later to acore.
- imports can be overwritten - next step is to make non-overlapping parameters still not fail the functions
- to be tested
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64fc9f45ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR extracts the enrichment-plot functionality out of src/vuecore/viz.py into a dedicated vuecore.enrichment_analysis package (static matplotlib + interactive Plotly), adds test coverage for the new enrichment plot API and basic plots, and reorganizes/extends the documentation notebooks and toctrees to reflect the new structure.
Changes:
- Removed the legacy
get_enrichment_plotsimplementation fromviz.pyand introducedvuecore.enrichment_analysis(common helpers + static + interactive backends) with schema validation viaEnrichmentAnalysisSchema. - Added pytest coverage for enrichment plotting behavior and basic plot file-export smoke tests.
- Reworked docs navigation and added new/relocated “basic plot examples” and “analysis plots” notebooks (plus generated output artifacts).
Would you like me to stage the files? If so, you can run:
git add src/vuecore tests docs pyproject.toml CONTRIBUTING.md CLAUDE.md
Reviewed changes
Copilot reviewed 21 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_enrichment_plot.py | New tests for static/interactive enrichment plot behavior (comparison inference, validation, error cases). |
| tests/plots_basic/test_violinplot.py | Smoke tests for violin plot creation + file output across multiple formats. |
| tests/plots_basic/test_scatterplot.py | Smoke tests for scatter plot creation + file output across multiple formats. |
| tests/plots_basic/test_lineplot.py | Smoke tests for line plot creation + file output across multiple formats. |
| tests/plots_basic/test_histogramplot.py | Smoke tests for histogram plot creation + file output across multiple formats. |
| tests/plots_basic/test_boxplot.py | Smoke tests for box plot creation + file output across multiple formats. |
| tests/plots_basic/test_barplot.py | Smoke tests for bar plot creation + file output across multiple formats. |
| tests/data/enrichment_analysis.csv | Example enrichment-results fixture used by tests/docs. |
| src/vuecore/viz.py | Removes embedded enrichment plotting function to reduce coupling/dependencies. |
| src/vuecore/static.py | Adds a top-level “static” re-export module for enrichment plotting. |
| src/vuecore/interactive.py | Adds a top-level “interactive” re-export module for enrichment plotting. |
| src/vuecore/enrichment_analysis/static.py | New matplotlib backend for enrichment scatter plots with schema validation. |
| src/vuecore/enrichment_analysis/interactive.py | New Plotly backend for enrichment scatter plots with schema validation. |
| src/vuecore/enrichment_analysis/common.py | Shared helpers for comparison-title formatting and direction→color mapping. |
| src/vuecore/enrichment_analysis/init.py | Public API exports for enrichment analysis plotting helpers/backends. |
| pyproject.toml | Adjusts declared dependencies (network-analysis related deps) and comments. |
| docs/index.md | Updates documentation toctrees (new “Analysis Plots”; moves examples to basic_plot_examples/). |
| docs/conf.py | Adds intersphinx mapping for acore docs. |
| docs/basic_plot_examples/scatter_plot.py | New/relocated scatter plot example (jupytext percent format). |
| docs/basic_plot_examples/scatter_plot.ipynb | New/relocated scatter plot notebook. |
| docs/basic_plot_examples/outputs/scatter_advanced.html | Generated Plotly HTML artifact for docs. |
| docs/basic_plot_examples/outputs/line_plot_advanced.html | Generated Plotly HTML artifact for docs. |
| docs/basic_plot_examples/outputs/box_plot_advanced.html | Generated Plotly HTML artifact for docs. |
| docs/basic_plot_examples/outputs/bar_plot_advanced.html | Generated Plotly HTML artifact for docs. |
| docs/basic_plot_examples/line_plot.py | New/relocated line plot example (jupytext percent format). |
| docs/basic_plot_examples/line_plot.ipynb | New/relocated line plot notebook. |
| docs/basic_plot_examples/jupytext.toml | Adds jupytext sync configuration for basic plot examples. |
| docs/basic_plot_examples/histogram_plot.py | New/relocated histogram plot example (jupytext percent format). |
| docs/basic_plot_examples/box_violin_plot.py | New/relocated combined box+violin example (jupytext percent format). |
| docs/basic_plot_examples/box_violin_plot.ipynb | New/relocated box+violin notebook. |
| docs/basic_plot_examples/bar_plot.py | New/relocated bar plot example (jupytext percent format). |
| docs/basic_plot_examples/bar_plot.ipynb | New/relocated bar plot notebook. |
| docs/analysis_plots/jupytext.toml | Adds jupytext sync configuration for analysis plots. |
| docs/analysis_plots/enrichment_analysis.py | New enrichment analysis plotting example (static + interactive). |
| docs/analysis_plots/enrichment_analysis.ipynb | New enrichment analysis notebook. |
| docs/.gitignore | Minor formatting adjustment. |
| CONTRIBUTING.md | Formatting/structure updates for contribution guidelines. |
| CLAUDE.md | Captures repo workflow guidance (formatting, linting, docstrings, schema validation). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- makes the markersize comparable across groups
might clutter, but as of now I will keep it.
Move enrichmentplot out of
viz.py(to avoid too many dependencies per default)