Skip to content

Fix Workflow pages and Layout Managers crashing on a fresh install - #102

Open
t0mdavid-m wants to merge 2 commits into
developfrom
claude/project-thread-rfg7be
Open

t0mdavid-m wants to merge 2 commits into
developfrom
claude/project-thread-rfg7be

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Before: when FLASHApp was run from the repository, the FLASHDeconv and FLASHTnT Workflow pages crashed with FileNotFoundError: example-data/deconv/example_lc_ms.mzML in any workspace without uploads. Both Layout Managers crashed with KeyError: st.session_state has no key "workspace" when opened by direct link or after a refresh.

After: the Workflow pages fall back to the example mzML and FASTA files that already ship in the default demo workspace, and the Layout Managers open from any link.

The example paths in src/Workflow.py pointed at example-data/deconv/ and example-data/tnt/, which are not in the repository. Fixing them revealed a third crash. When no TOPP tool has written its .ini yet, the parameter summary indexed an empty tool list, so that case is now guarded.

How: EXAMPLE_DATA and the FASTA fallback now point at example-data/workspaces/default/.../input-files/. page_setup() moves above the FileManager setup in both Layout Managers. export_parameters_markdown() checks for an empty list. The daily usability check had reported these 6 failures every day. Against this branch it passes all 26 page visits in a fresh workspace, a demo workspace and by direct link. pytest tests/ passes (52 tests), and pylint --errors-only is clean on the changed files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KyJg47YNaoYnCCj1QYkHEy


Generated by Claude Code

- Point the example data fallbacks at the mzML and FASTA files shipped in
  the default demo workspace; the old example-data/deconv and
  example-data/tnt paths do not exist, so the Workflow pages raised
  FileNotFoundError in any workspace without uploads.
- Call page_setup() before the Layout Managers read
  st.session_state['workspace'], so opening them by direct link or after
  a refresh no longer raises KeyError.
- Do not index an empty tool list in the parameter summary when no TOPP
  tool .ini has been written yet.

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

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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: 6d1b731c-9f59-48d6-b791-2d9f2f7d3397

  • 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.

polars 2.0 removed the no-argument pl.count(), so CI, which installs the
newest polars allowed by requirements.txt (>=1.0.0), failed
test_nonempty_input_passes_through_binning. pl.len() exists since 0.20.

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

Copy link
Copy Markdown
Member Author

pytest failed on tests/test_render_compression.py::test_nonempty_input_passes_through_binning. The cause isn't this PR's diff: requirements.txt allows polars>=1.0.0, CI now installs polars 2.0, and 2.0 removed the no-argument pl.count() that src/render/compression.py:63 calls. develop would fail the same way on its next run, because its last green pytest was on 2026-09-10. I've added edc9e2b, a one-line change to pl.len(), which has existed since polars 0.20. All 52 tests now pass locally with polars 2.0.0.


Generated by Claude Code

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