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

add add_node and add_link #75

Merged
merged 4 commits into from
Jul 16, 2024
Merged

add add_node and add_link #75

merged 4 commits into from
Jul 16, 2024

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented May 11, 2024

  • Add add_node and add_link
  • Make them the default in the docs

Note: the original nodes.new and links.new is still kept.

@superstar54 superstar54 linked an issue May 11, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2024

Codecov Report

Attention: Patch coverage is 99.41860% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.25%. Comparing base (089d6ed) to head (832e0be).

Files Patch % Lines
tests/conftest.py 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   75.19%   75.25%   +0.05%     
==========================================
  Files          69       69              
  Lines        4580     4591      +11     
==========================================
+ Hits         3444     3455      +11     
  Misses       1136     1136              
Flag Coverage Δ
python-3.11 75.16% <99.41%> (+0.05%) ⬆️
python-3.9 75.23% <99.41%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

Update add_node method to add_task following new convention.

A bit more context

It is important that these new AiiDA tools keep the end user not only in mind but of utmost importance. Interface like add_task and add_link don't add much to the code. However, they can have a serious impact on user experience. add_task() (one method) vs. tasks.new() (two methods) is actually a big difference w.r.t UX.

NOTE: Highly opinionated 😎

aiida_workgraph/workgraph.py Outdated Show resolved Hide resolved
Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM!

@superstar54 superstar54 merged commit 50d552a into main Jul 16, 2024
11 checks passed
@superstar54 superstar54 deleted the add_node branch July 16, 2024 13:12
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.

wg.add_node()
3 participants