Repository navigation
refactor(features): adopt histogram template workflow - #86
Merged
georgezakinih merged 6 commits intoSep 16, 2026
Merged
Conversation
- map semantic inputs to Histogram template parameters - pass canonical AnnData through the memory registry - publish template results after guaranteed cleanup
- describe template delegation in module and server docstrings - clarify the semantic input snapshot responsibility
- Adapt the PNG conversion boundary from plot-caching commit 5d65369 to preserve the template DPI and intrinsic figure boundary while retaining Shiny's render.plot interface. - Close source figures after serialization to avoid retained Matplotlib state. Co-authored-by: Heaven Golladay-Watkins <hgolladay05@gmail.com>
- Replace the Matplotlib display wrapper with direct render.image delivery. - Preserve the template PNG geometry and let Shiny delete delivered temporary files. - Remove the unused PNG-to-figure conversion helper.
zhan4329
marked this pull request as ready for review
September 8, 2026 18:41
georgezakinih
approved these changes
Sep 16, 2026
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- update overview and PR summary to document PR FNLCR-DMAP#86 / FNLCR-DMAP#87 integration strategy - record combined baseline integration requirements in implementation notes - update task reassignment links to match renumbered PR plan entries
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- mark PR FNLCR-DMAP#86 as merged into dev on 2026-09-16 in overview - add decision D21 recording completion of template delegation PR - update next steps to integrate PR FNLCR-DMAP#87 and point to Features facet tracker
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- mark Tasks 3 (verification) and 4 (static Group By controls) complete - record postponement of Task 5 (shared styling) to cross-tab roadmap - add PR FNLCR-DMAP#87 summary covering changes, testing, and notes for review - update overview and implementation notes to coordinate PR FNLCR-DMAP#86 / FNLCR-DMAP#87 integration
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- mark Tasks 3 (verification) and 4 (static Group By controls) complete - record postponement of Task 5 (shared styling) to cross-tab roadmap - add PR FNLCR-DMAP#87 summary covering changes, testing, and notes for review - update overview and implementation notes to coordinate PR FNLCR-DMAP#86 / FNLCR-DMAP#87 integration
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- move features-facet-pr-plan.md into docs/plans/pr-plans/ - update cross-references in development-roadmap.md and future-work.md - record PR FNLCR-DMAP#86 merge in facet plan and prioritize PR 4 (canonical text) before PR 3 - align roadmap calendar milestones with updated PR sequence
zhan4329
added a commit
to zhan4329/SPAC_Shiny
that referenced
this pull request
Sep 16, 2026
- update overview with prerequisite PR FNLCR-DMAP#86 and PR FNLCR-DMAP#87 context and open issues - add decisions D2 (branch stacking) and D3 (inheriting UI structure) - detail template boundary, Together/Facet conflicts, and verification in notes - establish development-details tracker structure for facet implementation
3 of 7 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR refactors
features_server.pyto use the latest SPAC histogram template while preserving the current non-facet user experience.The server now reads canonical AnnData, converts the existing features inputs to the template contract, and runs the template through the in-memory registry. The template's figure and dataframe remain the canonical results for the plot preview and CSV download.
This creates the execution boundary needed for later facet and agent-facing controls.
Related
ffa8644; PNG conversion was adapted from5d65369, with Heaven Golladay-Watkins credited as co-author.Changes
Everything is on the 'Features' tab. The 'Annotation' tab is unchanged.
shared["adata_main"]instead of reconstructing AnnData.save_to_disk=Falseandshow_plot=False, with registry cleanup guaranteed infinally.Plot_By="Feature"andFacet=Falseexplicit for this PR.fig_to_png_bytes()inutils/plot_utils.py, and render the image directly through Shiny. This is to resolve rendering issue introduced by the histogram template.New ui controls including facets will be exposed in the next PR.
Testing
python -m py_compile server/features_server.py utils/plot_utils.py ui/features_ui.pypython -m pytest tests/test_utils/test_plot_utils.py -q—6 passedgit diff --checkThere is not yet committed automated coverage for the new Features adapter or
fig_to_png_bytes().Notes for Review
Suggested order:
server/features_server.py,utils/plot_utils.py, thenui/features_ui.py.The template wrapper must be imported before the Histogram template because the template binds its loader during import.
There is a known issue: in some cases, the title may be too long to render. This needs to be fixed in the SPAC package.