Skip to content

Claude/code review improvements my e wt#18

Open
Trophime wants to merge 5 commits intoseparate-coolingfrom
claude/code-review-improvements-MyEWt
Open

Claude/code review improvements my e wt#18
Trophime wants to merge 5 commits intoseparate-coolingfrom
claude/code-review-improvements-MyEWt

Conversation

@Trophime
Copy link
Collaborator

No description provided.

claude added 5 commits March 5, 2026 19:54
Synthesizes two rounds of code review into a single, phased
working plan covering readability, maintainability, extensibility,
API integration (python_magnetapi), and interactive dashboards.

https://claude.ai/code/session_01BFYugbXH42GbSWM9y1uSEA
One detailed, actionable prompt per improvement plan phase:
- phase1_quick_wins.md       — 10 targeted fixes (enum, logging, CI, paths)
- phase2_architecture.md     — module splits, config unification, tooling
- phase3_extensibility.md    — DataLoader protocol, registries, Parquet export
- phase3b_api_integration.md — MagnetAPIClient, Pydantic models, upload/cache
- phase4_dashboards.md       — Panel/hvplot dashboards, notebook generator

Each prompt includes: objective, prerequisites, per-task steps with
code examples, and a verification checklist.

https://claude.ai/code/session_01BFYugbXH42GbSWM9y1uSEA
Single reference document covering every library, tool, and stdlib
module recommended across the five improvement phases:
- Quick-reference table: package, version, pyproject group, mandatory phase
- Packages to remove (iapws, nlopt, ht, requests shadow)
- Target pyproject.toml shape with all extras
- Per-phase breakdown with rationale notes
- httpx vs requests rationale
- Panel/hvplot vs Dash/Streamlit rationale
- Minimum Python version justification (3.11)
- Stdlib-only modules inventory

https://claude.ai/code/session_01BFYugbXH42GbSWM9y1uSEA
The presence of FEPC hybrid data at 10 kHz (10 M+ points per run)
requires dynamic, viewport-aware downsampling. plotly-resampler provides
MinMaxLTTB aggregation server-side on every pan/zoom, which Panel/hvplot
cannot match without bespoke pre-aggregation code.

Changes:
- software_stack.md: replace panel/hvplot/bokeh/holoviews rows with
  plotly/dash/plotly-resampler/tsdownsample in the quick-reference table
  and pyproject.toml shape; add FigureResampler vs FigureWidgetResampler
  table; add Panel vs Dash comparison table with large-time-series column;
  clarify requests→fetchers renaming must precede httpx adoption (ordering
  note now in both "Packages to remove" table and the Phase 3b rationale)
- phase4_dashboards.md: rewrite context, prerequisites, Task 4.2 (widgets
  → figures.py with plain go.Figure builders), Task 4.3 (run_overview now
  uses FigureResampler + FigureWidgetResampler), Task 4.6 (hybrid_monitor
  fully rewritten around plotly-resampler — loads full-resolution kHz/RMS
  data, lets FigureResampler handle aggregation per viewport), Task 4.7
  (__init__.py now exposes *_app/*_widget pairs), Task 4.8 (CLI drives
  Dash apps via app.run()), verification checklist updated, commit
  strategy updated

https://claude.ai/code/session_01BFYugbXH42GbSWM9y1uSEA
Key findings from tool research:
- Voilà (server): FigureWidgetResampler works — no design change needed
- Voici (WASM): ipywidgets not fully supported, 2 GB browser memory cap
  → cannot do live resampling for FEPC data; pre-downsampled static figure only
- Marimo: ipywidgets not supported (confirmed in issue #4091);
  use mo.ui.plotly() with plain go.Figure + tsdownsample LTTB

Design changes:
- Add a third output mode *_static(run, max_pts) to every dashboard:
  returns a plain go.Figure pre-downsampled via tsdownsample.LTTBDownsampler;
  works in Marimo, Voici, static HTML — no Dash or plotly-resampler needed
- Split _require_dashboard_deps() into _require_plotly() (static path)
  and full guard (interactive path) so *_static() doesn't need Dash installed
- Add hybrid_monitor_static() with t_start/t_end window narrowing for
  FEPC data: user selects time window first, then LTTB over that slice
- Add marimo_generator.py: generates .py Marimo apps using mo.ui.plotly()
  + reactive slider for max_pts; includes overview and hybrid templates
  (with inline script metadata for uv/pipx dependency declaration)
- Add to-marimo CLI subcommand alongside to-notebook
- Add voila>=0.5 to [notebook] extras; add marimo>=0.9 as [marimo] extra
- Document deployment compatibility matrix:
  *_app() → Dash; *_widget() → Jupyter+Voilà; *_static() → everywhere

https://claude.ai/code/session_01BFYugbXH42GbSWM9y1uSEA
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