Skip to main content

Package to created a second layer to flowchem.

Project description

ChemUnited-Drive

ChemUnited-Drive Application

This application provides a graphical interface to manage, configure, and run FlowChem projects. It allows users to load project configuration files, discover connected devices, edit settings, and launch the FlowChem server directly from the interface.

🚀 Installation

To install the package, simply run:

pip install Chemunited-drive

🛠️ Install Directly from GitHub

If you prefer to install the latest development version (with the newest updates and experimental features), you can install ChemUnited-Drive directly from the Git repository:

pip install git+https://github.com/<your-username>/Chemunited-drive.git

🧩 Overview

ChemUnited-Drive acts as a friendly GUI for FlowChem configurations, and easily integration whit ChemUnited Orchestration. It bridges the gap between device setup and automation, allowing you to:

  • Load existing FlowChem project folders.

  • View and edit the __configuration_file.toml.

  • Discover supported FlowChem devices (serial or Ethernet).

  • Start and stop FlowChem servers from the GUI.

  • View process logs in real time.

🖼️ Application Workflow

1. Main Interface

The main window provides four tabs for navigation:

Tab Purpose
FlowChem View and edit the configuration file.
Project Manage and open existing project folders.
Discover Automatically find connected FlowChem devices.
Logging View logs and FlowChem process messages.

2. Projects View

ChemUnited-Drive

The Project tab lists all recent FlowChem projects stored in your workspace.

Each card offers:

  • ▶️ Run – Load and execute the project’s configuration file.

  • 📂 Open Folder – Open the project directory in the system file browser.

3. Configuration View

ChemUnited-Drive

When a project is loaded, its configuration file (__configuration_file.toml) is displayed and can be edited.

Use:

  • Run → to start the FlowChem server.

  • Stop → to terminate it.

A progress bar shows the initialization status, and the application provides live feedback and clickable server links once the process is running.

4. Run and Monitor FlowChem

ChemUnited-Drive

When you press Run, the GUI performs the following sequence:

  • Saves any edits to a temporary TOML file.

  • Asks if you want to terminate existing FlowChem processes.

  • Launches FlowChem as a subprocess (flowchem.main.py) via QProcess.

  • Displays logs and connection information.

Once the server starts (http://127.0.0.1:8000), a direct link appears in the GUI.

Stopping the server gracefully sends a SIGINT or CTRL_BREAK_EVENT, ensuring a clean shutdown.

⚙️ Architecture

The project is composed of modular components:

Module Purpose
gui.py Defines the main GUI (DriveGUI) and its logic for configuration, running, and process control.
frames.py Contains reusable dialog windows and card widgets (e.g., project cards, IP request dialog).
flowchem_thread.py Manages the FlowChem subprocess using QProcess, including logging, startup, and graceful termination.
main.py Extends the GUI with device discovery logic for serial and Ethernet interfaces.
utils.py Provides helper functions (e.g., checking server URL, managing temp directories).
__main__.py Entry point to start the full GUI application.

🚀 Running the Application

To start the GUI manually, run:

python -m ChemunitedDrive

or, if installed as a package:

chemunited-drive

🧰 Device Discovery

ChemUnited-Drive

The Discover tab uses built-in FlowChem finders to detect connected devices:

  • Serial devices (via pyserial and aioserial).

  • Ethernet devices (via broadcast search using user-defined IP).

Each discovered device automatically appends its configuration block to the current TOML file.

🗂️ Temporary Files

All temporary and recent project files are stored in:

%APPDATA%/ChemUnited/ChemUnited_Recent_Projects

This includes:

  • __temporary_cfg.toml – last edited configuration.

  • recent_projects.toml – list of project paths.

🧾 Logging

The application logs:

  • QProcess messages from FlowChem.

  • Success, warning, and error InfoBars.

  • Full traceback details in case of exceptions.

Logs appear both in the Logging tab and in the console (via loguru).

🤝 Contributing

Contributions are very welcome!

If you`d like to report bugs, suggest new features, or contribute code improvements, please follow these guidelines:

1 Fork the repository on GitHub.

2 Create a new branch for your feature or fix:

git checkout -b feature/my-new-feature

3 Commit your changes with clear messages:

git commit -m "Add feature X or fix bug Y"

4 Push your branch to your fork:

git push origin feature/my-new-feature

5 Open a Pull Request (PR) in the main repository.

git push origin feature/my-new-feature

Describe clearly what your change does and, if possible, include screenshots or code snippets.

🐛 Reporting Issues

If you find a bug or unexpected behavior:

Open the Issues tab in the GitHub repository.

Provide:

  • A clear title and short description.

  • Steps to reproduce the issue.

  • Expected vs. observed behavior.

  • (Optional) Screenshots or error logs.

This helps maintainers reproduce and fix the problem quickly.

❤️ Join the Project

ChemUnited-Drive is an open collaborative project developed within the Automation Group – Department of Biomolecular Systems.

We welcome external contributions, bug reports, and ideas for new features. Your participation helps make FlowChem integration more powerful and accessible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chemunited_drive-0.0.4.tar.gz (63.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chemunited_drive-0.0.4-py3-none-any.whl (65.4 kB view details)

Uploaded Python 3

File details

Details for the file chemunited_drive-0.0.4.tar.gz.

File metadata

  • Download URL: chemunited_drive-0.0.4.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chemunited_drive-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5669ae22cc7bdcb59d1ceaa8a68ff971744437ac0ecf900b922819a3cbca9d71
MD5 231cdfac8a60df2d3605142dab2703a3
BLAKE2b-256 da4a4cd88f5e8d81e712c45320ebb7e62b55ede12a7471608fb5fd7033f34a3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemunited_drive-0.0.4.tar.gz:

Publisher: publish.yml on automatedchemistry/chemunited-drive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chemunited_drive-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for chemunited_drive-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6de8c5ad710039e0c694c8bc2f1c7e0ea33e147e1f6babf4999e7fdb5217afc3
MD5 82b023db7e0d3ac89631b327154ba0f2
BLAKE2b-256 014607c496863303037d213f16e613fd409ee766a0e9ded256e01cad54fb992f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemunited_drive-0.0.4-py3-none-any.whl:

Publisher: publish.yml on automatedchemistry/chemunited-drive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page