From c72325750af309839a7d2d265d1990a25d2cbb04 Mon Sep 17 00:00:00 2001 From: superstar54 Date: Tue, 3 Dec 2024 16:18:41 +0100 Subject: [PATCH 1/2] Update readme and fix tests --- README.md | 6 ++++++ aiida_workgraph_web_ui/__init__.py | 1 - docs/source/conf.py | 2 -- pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8cc2e60..2ee57c8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ +# Welcome to AiiDA WorkGraph Web UI! +[![PyPI version](https://badge.fury.io/py/aiida-workgraph-web-ui.svg)](https://badge.fury.io/py/aiida-workgraph-web-ui) +[![Docs status](https://readthedocs.org/projects/aiida-workgraph-web-ui/badge)](http://aiida-workgraph-web-ui.readthedocs.io/) +[![Unit test](https://github.com/aiidateam/aiida-workgraph-web-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/aiidateam/aiida-workgraph-web-ui/actions/workflows/ci.yml) +Web UI to visualize and manage the AiiDA WorkGraph. + ## Frontend Use `rete-kit` to create the frontend, using `react` diff --git a/aiida_workgraph_web_ui/__init__.py b/aiida_workgraph_web_ui/__init__.py index 36e61c6..3dc1f76 100644 --- a/aiida_workgraph_web_ui/__init__.py +++ b/aiida_workgraph_web_ui/__init__.py @@ -1,2 +1 @@ - __version__ = "0.1.0" diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f4b0cd..a450687 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,8 +12,6 @@ # import os import sys -import shutil -from pathlib import Path sys.path.insert(0, os.path.abspath("../..")) diff --git a/pyproject.toml b/pyproject.toml index a7af23b..b8328e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,8 @@ requires-python = ">=3.9" dependencies = [ "numpy~=1.21", "scipy", - "ase", "aiida-core>=2.3", + "aiida_workgraph", "cloudpickle", "fastapi", "uvicorn", From 4b600fa334644af9da1c076f6a3bd9ffd75d9d50 Mon Sep 17 00:00:00 2001 From: superstar54 Date: Tue, 3 Dec 2024 16:30:29 +0100 Subject: [PATCH 2/2] Add conftest.py --- tests/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..6b32095 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,15 @@ +import pytest +from aiida_workgraph import WorkGraph + +pytest_plugins = "aiida.tools.pytest_fixtures" + + +@pytest.fixture +def wg_calcfunction() -> WorkGraph: + """A workgraph with calcfunction.""" + + wg = WorkGraph(name="test_debug_math") + sumdiff1 = wg.add_task("workgraph.test_sum_diff", "sumdiff1", x=2, y=3) + sumdiff2 = wg.add_task("workgraph.test_sum_diff", "sumdiff2", x=4) + wg.add_link(sumdiff1.outputs[0], sumdiff2.inputs[1]) + return wg