Skip to content

Use OpenMS-Insight tables on the downstream pages (#38 rebased onto main's helper) - #41

Merged
t0mdavid-m merged 2 commits into
mainfrom
claude/project-thread-qbi8k0-insight-tables
Oct 19, 2026
Merged

t0mdavid-m merged 2 commits into
mainfrom
claude/project-thread-qbi8k0-insight-tables

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Requested by Tom · project thread

Before: Filtering, Imputation, Normalization, Statistics, PCA, Pathway Analysis and the ProteomicsLFQ results draw their tables with st.dataframe. That sends the whole table to the browser on every rerun, so these pages crawl on full-scale data.

After: these pages show server-side paginated OpenMS-Insight tables, like the Abundance page already does. Each step's result stays visible after the page reruns.

This carries #38 by @hjn0415a forward. It contains their commit plus a merge of current main. Main gained its own show_insight_table in src/common/insight_tables.py (#36) while #38 was open, so the duplicate helper #38 added to common.py is dropped and its new parts move onto main's helper:

  • Tables built from no file (the downstream results held in session state) are cached by a content fingerprint, ported from Use OpenMS-Insight Table for large tables #38. The cache directory defaults to <workspace>/insight_tables.
  • A named index is kept as a column instead of being dropped.
  • show_table() uses the Insight table.
  • Each step's result table is drawn from session state, outside its button block.
  • The tests are ported to the helper's module, plus one that checks content-keyed caching, and the CLAUDE.md rule from Use OpenMS-Insight Table for large tables #38 is kept.

One deliberate difference from #38: the GO tables on the enrichment page stay st.dataframe. They are only drawn inside the "Run GO Enrichment" button block, where an Insight table's first-render rerun would wipe them, and they are small.

How: I merged main into #38's head, resolved the six page conflicts on main's versions, and reapplied #38's page changes. pytest tests/ passes (114 tests) on Python 3.12 with requirements.txt. I opened this PR because the fork branch behind #38 can't be pushed to from here. If merged, it supersedes #38.


Generated by Claude Code

JKVISION1101 and others added 2 commits September 29, 2026 18:28
Replace st.dataframe with a server-side paginated Insight Table so only
the visible page is sent to the browser on full-scale datasets.

- Add show_insight_table() in common.py (also used by show_table()): reuses
  the on-disk cache unless the data changed, converts pandas to Polars and
  handles special column names
- Switch Filtering, Imputation, Normalization, Statistical, PCA,
  Pathway/Enrichment and ProteomicsLFQ tables to it
- Render results from session_state outside the button block, since
  Insight components trigger a rerun on first render that would otherwise
  clear them
- Document the convention in CLAUDE.md and add unit tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Main gained src/common/insight_tables.show_insight_table in #36, so the
duplicate helper in common.py is dropped. What this PR still adds moves
onto main's helper:
- downstream pages (filtering, imputation, normalization, statistics,
  PCA, pathway analysis, ProteomicsLFQ results) and show_table() render
  Insight tables instead of st.dataframe
- tables without source files are cached by a content fingerprint, and
  the cache directory defaults to <workspace>/insight_tables
- a named index is kept as a column
- step results render from session state, outside the button block

The GO tables on the enrichment page stay st.dataframe: they are only
drawn inside the button block, where an Insight table's first-render
rerun would wipe them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUsQzDsQUXSRsys1GoQW3G
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 031df45c-e537-4585-a351-cdcf6896d6f8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@t0mdavid-m t0mdavid-m self-assigned this Oct 19, 2026
@t0mdavid-m
t0mdavid-m merged commit bdfd98c into main Oct 19, 2026
9 checks passed
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.

3 participants