Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Fix typing on Workchain #5836

Merged
merged 3 commits into from
Jul 6, 2023
Merged

Conversation

chrisjsewell
Copy link
Member

No description provided.

@chrisjsewell chrisjsewell requested a review from sphuber December 14, 2022 14:54
@@ -365,7 +368,7 @@ def on_exiting(self) -> None:
self.logger.exception('exception in _store_nodes called in on_exiting')

@Protect.final
def on_wait(self, awaitables: t.Sequence[Awaitable]):
def on_wait(self, awaitables: t.Sequence[t.Awaitable]):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? The Awaitable is something we define. How does this exist in the typing module, and even if it does, that is now what it means does it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well ha, this is what I mentioned in the team meeting; the thing we refer to as "awaitables" in aiida.Workchain have nothing to do with the awaitables in python and plumpy 😒, i.e. things that can be used like await awaitable

In plumpy you can see how the Workchain uses them: /~https://github.com/aiidateam/plumpy/blob/f2dbc1dcc0581c7b6b3438029eeca866df57a24b/src/plumpy/workchains.py#LL57C39-L57C39
None of this is used in aiida

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI In #5838 you can see how I replace our Awaitable class with what it actually is; just a pointer to a child process

@sphuber sphuber self-requested a review July 5, 2023 23:58
@sphuber sphuber merged commit 923cc31 into aiidateam:main Jul 6, 2023
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.

3 participants