
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
aiida-workgraph
Advanced tools
A powerful Python library for creating, managing, and executing scalable scientific workflows with automatic data provenance.
AiiDA-WorkGraph empowers researchers and developers to build complex, reproducible workflows with ease.
if/else
statements and loops.pip install aiida-workgraph
First, ensure you have a working AiiDA environment.
verdi presto # Or 'verdi quicksetup' for a detailed setup
Let's create a simple workflow to calculate $(x + y) \times z$.
1️⃣ Define Tasks
Use the @task
decorator to turn Python functions into workflow components.
from aiida_workgraph import task
@task
def add(x, y):
"""Adds two numbers."""
return x + y
@task
def multiply(x, y):
"""Multiplies two numbers."""
return x * y
2️⃣ Compose a Workflow
Use the @task.graph
decorator to link tasks. Data flows naturally from one task's output to the next one's input.
@task.graph
def add_multiply(x, y, z):
"""A workflow to add two numbers and then multiply by a third."""
sum_result = add(x, y).result
product_result = multiply(x=sum_result, y=z).result
return product_result
3️⃣ Run the Workflow
Build the workflow with your inputs and run it.
from aiida import load_profile
# Load your AiiDA profile
load_profile()
# Build and run the workflow
results = add_multiply.run(x=2, y=3, z=4)
# Print the final result
print(f"✅ Result: {results}")
# Expected output: ✅ Result: 20
4️⃣ Automatic Provenance Tracking
AiiDA-WorkGraph automatically generates a detailed provenance graph, tracking the full history of data and calculations to ensure full traceability and reproducibility. Here is an example of the provenance graph generated for the above workflow:
AiiDA-WorkGraph supports three complementary approaches to building workflows, letting you choose the best method for your needs.
🐍 Pythonic Workflows (Recommended): Use @task.graph
for clean, readable, and powerful workflows, as shown in the Quick Start.
👁️ Visual Graph with Explicit Logic: Use zones like If
, While
, and Map
to build a graph where the control flow is visually explicit.
⚙️ Low-Level Node-Graph Programming: Programmatically define each task and link them manually for maximum control and dynamic graph generation.
Visualize, monitor, and debug your workflows in real-time. To launch the GUI, first install the package and then run:
pip install aiida-gui-workgraph
aiida-gui start
Navigate to http://127.0.0.1:8000/workgraph
in your web browser.
Note: The GUI is an experimental feature and is under active development.
FAQs
Design flexible node-based workflow for AiiDA calculation.
We found that aiida-workgraph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.