Skip to content

Electron Application Integration and Packaging - #11

Merged
Developer-Simon merged 19 commits into
masterfrom
Simon/add-installation-methods
Jul 18, 2026
Merged

Developer-Simon merged 19 commits into
masterfrom
Simon/add-installation-methods

Conversation

@Developer-Simon

Copy link
Copy Markdown
Owner

This pull request introduces a new Electron packaging system for the project, enabling the Streamlit dashboard to be distributed as a standalone desktop application. The main changes include the addition of an Electron app with custom build scripts, a robust cross-language version synchronization mechanism, and improvements to version management in both Python and JavaScript. These changes ensure that the Electron package version stays in sync with the canonical project version, and that the Python runtime is bundled and built automatically for the Electron app.

Electron Application Integration and Packaging:

  • Added a complete Electron app under the electron/ directory, including main.js for launching Streamlit as a subprocess, preload.js for secure context bridging, and scripts for icon generation and version synchronization. The Electron app launches the dashboard and handles lifecycle events. [1] [2] [3] [4] [5] [6]
  • Added workflows and scripts for packaging the Electron app, including a GitHub Actions workflow (.github/workflows/electron-package.yml) and scripts for building a Python runtime (build_python_runtime.py, build-python-runtime.sh). [1] [2] [3]

Version Synchronization and Management:

  • Introduced a new src/version.py module with a get_canonical_version() function that determines the project version from several sources (installed package, pyproject.toml, setuptools_scm, or version files). This is now the single source of truth for the project version.
  • Updated dashboard/settings.py to use get_canonical_version() from src.version instead of reading pyproject.toml directly, ensuring consistent version reporting. [1] [2]
  • Added Node.js scripts (sync_version.js and logic in main.js) to automatically synchronize the Electron package version and a version artifact (electron/VERSION) with the canonical Python version. [1] [2]

Testing and Documentation:

  • Added a unit test (test/test_version_sync.py) to verify that the Electron package version matches the canonical project version.
  • Added documentation about icon usage and customization for the Electron app (icon-usage-note.md).

These changes provide a robust foundation for distributing the dashboard as a desktop application, with automated version management and packaging.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

@Developer-Simon
Developer-Simon force-pushed the Simon/add-installation-methods branch from 3e29eab to 82dba9b Compare July 18, 2026 12:16
@Developer-Simon
Developer-Simon force-pushed the Simon/add-installation-methods branch from 82dba9b to e980cdd Compare July 18, 2026 12:18
@Developer-Simon
Developer-Simon force-pushed the Simon/add-installation-methods branch from 70c5dbb to 84f3cd7 Compare July 18, 2026 14:10
@Developer-Simon
Developer-Simon force-pushed the Simon/add-installation-methods branch from e75ba6f to 2450d40 Compare July 18, 2026 18:00
@Developer-Simon
Developer-Simon merged commit 4f7b631 into master Jul 18, 2026
3 checks passed
@Developer-Simon
Developer-Simon deleted the Simon/add-installation-methods branch September 6, 2026 15:22
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.

1 participant