{"id":25019521,"url":"https://github.com/aiidateam/aiida-workgraph","last_synced_at":"2025-04-13T04:07:16.695Z","repository":{"id":184649977,"uuid":"671498758","full_name":"aiidateam/aiida-workgraph","owner":"aiidateam","description":"Efficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, and remote execution capabilities.","archived":false,"fork":false,"pushed_at":"2025-03-31T16:38:16.000Z","size":4076,"stargazers_count":10,"open_issues_count":67,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T04:07:03.253Z","etag":null,"topics":["aiida","database","materials-science","nodetree","provenance-tracking","science","workflow"],"latest_commit_sha":null,"homepage":"https://aiida-workgraph.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiidateam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-27T13:04:59.000Z","updated_at":"2025-03-31T16:38:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c77cbc5-8680-42c4-ae70-4666eb139bb6","html_url":"https://github.com/aiidateam/aiida-workgraph","commit_stats":{"total_commits":75,"total_committers":2,"mean_commits":37.5,"dds":"0.013333333333333308","last_synced_commit":"830d3852a4399335cb7b690afd3402b7369e3f86"},"previous_names":["superstar54/aiida-worktree","superstar54/aiida-workgraph","aiidateam/aiida-workgraph"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidateam%2Faiida-workgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidateam%2Faiida-workgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidateam%2Faiida-workgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidateam%2Faiida-workgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiidateam","download_url":"https://codeload.github.com/aiidateam/aiida-workgraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661705,"owners_count":21141450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiida","database","materials-science","nodetree","provenance-tracking","science","workflow"],"created_at":"2025-02-05T11:50:54.877Z","updated_at":"2025-04-13T04:07:16.685Z","avatar_url":"https://github.com/aiidateam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AiiDA-WorkGraph\n[![PyPI version](https://badge.fury.io/py/aiida-workgraph.svg)](https://badge.fury.io/py/aiida-workgraph)\n[![Unit test](https://github.com/aiidateam/aiida-workgraph/actions/workflows/ci.yaml/badge.svg)](https://github.com/aiidateam/aiida-workgraph/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/aiidateam/aiida-workgraph/branch/main/graph/badge.svg)](https://codecov.io/gh/aiidateam/aiida-workgraph)\n[![Docs status](https://readthedocs.org/projects/aiida-workgraph/badge)](http://aiida-workgraph.readthedocs.io/)\n\nEfficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, error-resistant, and remote execution capabilities.\n\n\n\n## Installation\n\n```console\n    pip install aiida-workgraph\n```\n\nTo install the latest version from source, first clone the repository and then install using `pip`:\n\n```console\ngit clone https://github.com/aiidateam/aiida-workgraph\ncd aiida-workgraph\npip install -e .\n```\n\n\n## Documentation\nExplore the comprehensive [documentation](https://aiida-workgraph.readthedocs.io/en/latest/) to discover all the features and capabilities of AiiDA Workgraph.\n\n## Demo\nVisit the [Workgraph Collections repository](https://github.com/superstar54/workgraph-collections) to see demonstrations of how to utilize AiiDA Workgraph for different computational codes.\n\n## Examples\nSuppose we want to calculate ```(x + y) * z ``` in two steps. First, add `x` and `y`, then multiply the result with `z`.\n\n```python\nfrom aiida_workgraph import WorkGraph, task\n\n# define add task\n@task()\ndef add(x, y):\n    return x + y\n\n# define multiply task\n@task()\ndef multiply(x, y):\n    return x*y\n\n# Create a workgraph to link the tasks.\nwg = WorkGraph(\"test_add_multiply\")\nwg.add_task(add, name=\"add1\")\nwg.add_task(multiply, name=\"multiply1\")\nwg.add_link(wg.tasks.add1.outputs.result, wg.tasks.multiply1.inputs.x)\n\n```\n\nPrepare inputs and run the workflow:\n\n```python\nfrom aiida import load_profile\n\nload_profile()\n\nwg.run(inputs = {\"add1\": {\"x\": 2, \"y\": 3}, \"multiply1\": {\"y\": 4}})\nprint(\"Result of multiply1 is\", wg.tasks.multiply1.outputs.result.value)\n```\n## Web ui\nTo use the web ui, first install the web ui package:\n```console\npip install aiida-workgraph-web-ui\n```\nThen, start the web app with the following command:\n```console\n\nworkgraph web start\n```\n\nThen visit the page http://127.0.0.1:8000/workgraph, you should find a `first_workflow` WorkGraph, click the pk and view the WorkGraph.\n\n\u003cimg src=\"docs/source/_static/images/first-workflow.png\" /\u003e\n\n\nOne can also generate the node graph from the process:\n```console\nverdi node generate pk\n```\n\n\u003cimg src=\"docs/source/_static/images/add_multiply.png\"/\u003e\n\n\n## Development\n\n### Pre-commit and Tests\nTo contribute to this repository, please enable pre-commit so the code in commits are conform to the standards.\n```console\npip install -e .[tests,pre-commit]\npre-commit install\n```\n\n## License\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiidateam%2Faiida-workgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiidateam%2Faiida-workgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiidateam%2Faiida-workgraph/lists"}