aiida-workgraph 0.5.1
pip install aiida-workgraph
Released:
Design flexible node-based workflow for AiiDA calculation.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: Xing Wang
- Tags aiida, workflows
- Requires: Python >=3.9
-
Provides-Extra:
docs
,pre-commit
,tests
Classifiers
- Development Status
- Framework
- License
- Operating System
- Programming Language
- Topic
Project description
AiiDA-WorkGraph
Efficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, error-resistant, and remote execution capabilities.
Installation
pip install aiida-workgraph
To install the latest version from source, first clone the repository and then install using pip
:
git clone https://github.com/aiidateam/aiida-workgraph
cd aiida-workgraph
pip install -e .
Documentation
Explore the comprehensive documentation to discover all the features and capabilities of AiiDA Workgraph.
Demo
Visit the Workgraph Collections repository to see demonstrations of how to utilize AiiDA Workgraph for different computational codes.
Examples
Suppose we want to calculate (x + y) * z
in two steps. First, add x
and y
, then multiply the result with z
.
from aiida_workgraph import WorkGraph, task
# define add task
@task()
def add(x, y):
return x + y
# define multiply task
@task()
def multiply(x, y):
return x*y
# Create a workgraph to link the tasks.
wg = WorkGraph("test_add_multiply")
wg.add_task(add, name="add1")
wg.add_task(multiply, name="multiply1")
wg.add_link(wg.tasks.add1.outputs.result, wg.tasks.multiply1.inputs.x)
Prepare inputs and run the workflow:
from aiida import load_profile
load_profile()
wg.run(inputs = {"add1": {"x": 2, "y": 3}, "multiply1": {"y": 4}})
print("Result of multiply1 is", wg.tasks.multiply1.outputs.result.value)
Web ui
To use the web ui, first install the web ui package:
pip install aiida-workgraph-web-ui
Then, start the web app with the following command:
workgraph web start
Then visit the page http://127.0.0.1:8000/workgraph, you should find a first_workflow
WorkGraph, click the pk and view the WorkGraph.
One can also generate the node graph from the process:
verdi node generate pk
Development
Pre-commit and Tests
To contribute to this repository, please enable pre-commit so the code in commits are conform to the standards.
pip install -e .[tests,pre-commit]
pre-commit install
License
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: Xing Wang
- Tags aiida, workflows
- Requires: Python >=3.9
-
Provides-Extra:
docs
,pre-commit
,tests
Classifiers
- Development Status
- Framework
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aiida_workgraph-0.5.1.tar.gz
.
File metadata
- Download URL: aiida_workgraph-0.5.1.tar.gz
- Upload date:
- Size: 69.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6c9d7442b52245114b904711c2124f162255bd3c04f84c59b8e89b981705102 |
|
MD5 | 996124f7a51b168b13e0396b292579e5 |
|
BLAKE2b-256 | 399ef9bff8afa8ff1fc9f68b831432ca999696f0a4b2f9ed60e12696c8251137 |
File details
Details for the file aiida_workgraph-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: aiida_workgraph-0.5.1-py3-none-any.whl
- Upload date:
- Size: 92.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac9a9c2546fe09e90df9e738a6beb4ab7a0ae586a9fded755797dc9417c26306 |
|
MD5 | c436de8dea67b929545e23fe4ece9d0e |
|
BLAKE2b-256 | 5a4d765776e261dd0fe200612ce4670877dbe4a257af90c8931912551d15b31b |