Skip to content

HeshamFS/openphase-cli-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenPhase Wizard

A professional interactive CLI wizard for creating OpenPhase phase-field simulations.

🚀 Overview

The OpenPhase Wizard simplifies the creation of new phase-field simulation projects. It provides a user-friendly terminal interface (TUI) to configure complex material parameters, physics modules, and grid settings, automatically generating all necessary C++ and OPI files ready for compilation within the OpenPhase environment.


📋 Prerequisites

1. OpenPhase Library (REQUIRED)

The wizard is a companion tool and cannot be used effectively without the OpenPhase library. It integrates with your local OpenPhase directory to:

  • Clone and parse existing examples.
  • Automatically update the master CMake build system.
  • Output generated projects directly into the OpenPhase/examples/ structure.

Download OpenPhase here: https://github.com/OpenPhase/OpenPhase

2. Python

  • Python version 3.9 or higher is required.

🛠️ Installation & Setup

Setting the OpenPhase Path

You must tell the wizard where your OpenPhase installation is located.

  1. Environment Variable (Permanent): Set OPENPHASE_PATH to point to your OpenPhase root directory.

    • Windows (PowerShell): [Environment]::SetEnvironmentVariable("OPENPHASE_PATH", "C:\Path\To\OpenPhase", "User")
    • Linux/macOS: Add export OPENPHASE_PATH="/path/to/openphase" to your ~/.bashrc or ~/.zshrc.
  2. Automatic Detection: The wizard will also find OpenPhase if:

    • It is located in a sibling directory named OpenPhase.
    • It is in the default home directory (~/OpenPhase).

Installing the Wizard

Using uv (Recommended)

cd openphase-cli-wizard
uv venv
uv pip install -e .

Using pip

cd openphase-cli-wizard
python -m venv .venv
# Activate venv:
# Windows: .venv\Scripts\activate | Linux: source .venv/bin/activate
pip install -e .

🎮 Usage

Once installed and your path is set, simply run:

openphase-wizard

✨ Key Features

  • Project Cloning: Instantly clone official OpenPhase examples as templates for your own work.
  • Physics Modules: Support for Temperature, Nucleation, Compositional Diffusion, and multiple Driving Force modes.
  • Intelligent Parsing: Automatically detects physics configurations and initialization methods from existing .cpp and .opi files.
  • Modern TUI: A beautiful, interactive interface built with Textual.
  • Automated CMake: Your new projects are automatically added to the OpenPhase build system.

🧪 Development & Testing

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run in development mode (with hot-reload)
textual run --dev openphase_wizard.app:OpenPhaseWizardApp

📄 License

Apache License 2.0


🔗 Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published