Skip to content

Commit

Permalink
add aiida profile creation to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
agoscinski committed Jul 24, 2024
1 parent f5425fe commit af66281
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ jobs:
run: |
pip install --upgrade pip
pip install hatch
pip install . # to get verdi
- name: Run test suite
env:
PYTEST_ADDOPTS: "--durations=0"
run: |
verdi presto
hatch test --cover
docs:
Expand Down
2 changes: 1 addition & 1 deletion src/wcflow/cmdline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse

from aiida import load_profile
from aiida.manage.configuration import load_profile

from wcflow import core, wc, workgraph

Expand Down
2 changes: 0 additions & 2 deletions tests/files/scripts/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ def main():
parser = argparse.ArgumentParser(description='A simple script with an optional restart argument.')
parser.add_argument('icon_input', type=str, help='The icon input.')
parser.add_argument('--restart', nargs='?', type=str, help='The icon restart file.')
#parser.add_argument('--restart', nargs='?', const='default', type=str, help='Initiate a restart operation with an optional string argument.')


args = parser.parse_args()

Expand Down
4 changes: 2 additions & 2 deletions tests/test_wc_workflow.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from wcflow import wc
from wcflow import core
from wcflow.workgraph import AiidaWorkGraph
from aiida.manage.configuration import load_profile
import pytest

@pytest.fixture
def small_config_path_str():
return "tests/files/configs/test_config_small.yaml"

def test_small_wc_workflow(small_config_path_str):
load_profile()
wc_workflow = wc.Workflow.from_yaml(small_config_path_str)
core_workflow: core.Workflow = wc_workflow.to_core_workflow()

from aiida import load_profile
load_profile()
aiida_workgraph = AiidaWorkGraph(core_workflow)
result = aiida_workgraph.run()
assert result.get('execution_count') == 0

0 comments on commit af66281

Please sign in to comment.