Skip to content

Fix wavelet example, widget bugs, docs, and tests#3

Merged
jourdain merged 4 commits into
mainfrom
fix/wavelet-and-docs
May 18, 2026
Merged

Fix wavelet example, widget bugs, docs, and tests#3
jourdain merged 4 commits into
mainfrom
fix/wavelet-and-docs

Conversation

@patrickoleary
Copy link
Copy Markdown
Member

Bug Fixes

  • widgets.py — Missing f-string prefix broke symlog icon; showed mdi-stairs instead of mdi-sine-wave
  • module.py — Created missing trame module stub so enable_module works
  • transforms.pyapply_discrete_symlog early returns were 3-tuples instead of 4-tuples

Architecture Changes (wavelet.py)

  • Fix scalar_mode 'points''point' in set_data_array
  • Merge contour + slice pipelines into single mapper via vtkAppendPolyData
  • All four colorbars share one self.mapper, no sync logic needed

Vertical Colorbar Tick Fix (widgets.py)

  • Changed tick layout from flex-direction:column to flex-direction:row
  • Preserved original rotated vertical text styling (writing-mode:vertical-lr)

Docstring/Comment Fixes

  • dataclasses.py — Removed stale ColormapController references, fixed field docs, PRESET_REGISTRYCOLORBAR_CACHE, updated section comments
  • transforms.pyColormapControllerColormapConfig, fixed return type docs
  • wavelet.py — Updated module docstring for merged pipeline
  • trame/widgets/colormaps.py — Added module and function docstrings
  • trame/dataclasses/colormaps.py — Added module docstring

Tests

  • Deleted test_controller.py, test_state.py (imported removed modules)
  • Created test_dataclasses.py, test_widgets.py, test_module.py
  • Updated test_smoke.py with real import tests
  • 138 tests passing, 0 failures

- widgets.py: missing f-string prefix on symlog icon expression
- module.py: create trame module stub so enable_module works
- transforms.py: apply_discrete_symlog early returns 3-tuple -> 4-tuple
- trame/widgets/colormaps.py: add docstrings
- Fix scalar_mode 'points' -> 'point' in set_data_array
- Use vtkAppendPolyData to merge both pipelines into one mapper
- All four colorbars share self.mapper, no sync logic needed
- Update module docstring for new architecture
- dataclasses.py: remove ColormapController refs, fix field docs,
  PRESET_REGISTRY -> COLORBAR_CACHE, update section comments
- transforms.py: already committed (ColormapController -> ColormapConfig)
- trame/dataclasses/colormaps.py: add module docstring
- Delete test_controller.py, test_state.py (imported removed modules)
- Add test_dataclasses.py (defaults, mutations, mapper wiring, presets)
- Add test_widgets.py (buttons helper, f-string regression, exports)
- Add test_module.py (module.setup no-op)
- Update test_smoke.py (trame entry point import tests)
- 138 tests passing
@patrickoleary patrickoleary force-pushed the fix/wavelet-and-docs branch from 2316802 to 19876fd Compare May 17, 2026 12:01
Comment thread src/trame/widgets/colormaps.py
@jourdain jourdain merged commit be63dd0 into main May 18, 2026
4 checks passed
@patrickoleary patrickoleary deleted the fix/wavelet-and-docs branch May 28, 2026 11:23
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