Bundle demo-catalog flow YAMLs for PyInstaller#548
Conversation
The desktop (Tauri) app freezes the Python backend with PyInstaller, which
stores .py modules as bytecode but does not include arbitrary data files
unless they are listed in the spec's `datas`. The demo-catalog flow YAMLs
(`flowfile_core/catalog/demo_flows/*.yaml`) were only declared for the PyPI
sdist/wheel, so in the packaged app `demo_seed.py` resolved
`Path(__file__).parent / "demo_flows"` to a directory with no YAMLs and
seeding raised:
FileNotFoundError: Flow file not found:
.../Resources/binaries/_internal/flowfile_core/catalog/demo_flows/demo_sales_by_region.yaml
Add `get_demo_flows_datas()` (mirroring the existing alembic / project_shim
helpers) and wire it into the Analysis `datas` so both demo flows ship under
`flowfile_core/catalog/demo_flows/` in the bundle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWr1cBV6omT7tYQcybqXNH
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PyInstaller spec generator in ChangesDemo-catalog YAML bundling in PyInstaller spec
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
✅ Deploy Preview for flowfile-wasm canceled.
|
1 similar comment
✅ Deploy Preview for flowfile-wasm canceled.
|
Summary
Adds PyInstaller data collection for demo-catalog flow YAML files to ensure they are bundled correctly in the compiled application. Without this, the demo catalog seeding fails at runtime because PyInstaller stores
.pyfiles as bytecode only, making relative YAML file lookups inaccessible.Changes
get_demo_flows_datas(): Collects thedemo_flows/directory fromflowfile_core/flowfile_core/catalog/and maps it for PyInstaller bundling toflowfile_core/catalog/demo_flowsin the built application.demo_flows_datasto the PyInstallerAnalysisdatas list alongside existing data collections (numpy, pyarrow, connectorx, alembic, code_generator, etc.).Implementation Details
get_code_generator_datas(),get_alembic_datas()) with a directory existence check.demo_seed.pyat runtime, which reads flows viaPath(__file__).parent / "demo_flows".https://claude.ai/code/session_01PWr1cBV6omT7tYQcybqXNH
Summary by CodeRabbit