Skip to content

✨ aiida: PWD via @task and @graph - #222

Draft
GeigerJ2 wants to merge 2 commits into
pythonworkflow:mainfrom
GeigerJ2:feature/aiida-core-graph-adapter
Draft

GeigerJ2 wants to merge 2 commits into
pythonworkflow:mainfrom
GeigerJ2:feature/aiida-core-graph-adapter

Conversation

@GeigerJ2

@GeigerJ2 GeigerJ2 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Replace the workgraph adapter with generated @task/@graph source lowered to GraphIR; export GraphIR back to PWD. Static DAGs only. Pin aiida-core to current main.

@jan-janssen

Copy link
Copy Markdown
Member

@GeigerJ2 I fixed the pip installation, by adding it to the conda environment.

There are still parts in the notebooks which need to be updated:

Traceback (most recent call last):
  File "/home/runner/miniconda3/envs/test/bin/papermill", line 10, in <module>
    sys.exit(papermill())
             ^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/papermill/cli.py", line 235, in papermill
    execute_notebook(
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/papermill/execute.py", line 131, in execute_notebook
    raise_for_execution_errors(nb, output_path)
  File "/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/papermill/execute.py", line 251, in raise_for_execution_errors
    raise error
papermill.exceptions.PapermillExecutionError: 
---------------------------------------------------------------------------
Exception encountered at "In [9]":
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[9], line 1
----> 1 wg.run()
AttributeError: 'GraphHandle' object has no attribute 'run'

@GeigerJ2

GeigerJ2 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

Cheers @jan-janssen, thanks for adding the commit on top! This is still very vibey, yes, wg.run should not be there anymore... 😅

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.93651% with 43 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/python_workflow_definition/aiida.py 82.93% 43 Missing ⚠️

📢 Thoughts on this report? Let us know!

@GeigerJ2
GeigerJ2 marked this pull request as draft November 6, 2026 11:46
@GeigerJ2
GeigerJ2 force-pushed the feature/aiida-core-graph-adapter branch 4 times, most recently from a2399b0 to 4c55e5c Compare November 6, 2026 15:03
The workgraph package is retired. The adapter now
emits `@task` and `@graph` source, loads it through
`GraphHandle`, and runs it with `run_get_node`.
Notebooks define the workflows with the new decorators.
Dependencies pin `aiida-core` to a fixed commit.
@GeigerJ2
GeigerJ2 force-pushed the feature/aiida-core-graph-adapter branch from 69e2772 to 283239e Compare November 6, 2026 16:09
@jan-janssen

Copy link
Copy Markdown
Member

@GeigerJ2 looks great to me. Once an official core version is released I am happy to merge this, I am a bit reluctant to bind to the main branch as that might change in the future and break our tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants