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

Decorator allow users to define the inputs manually for dynamic input #281

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Aug 27, 2024

For a calcfunction with dynamic input,

@calcfunction
def get_structure(**datas) -> orm.StructureData:

Allow users to define the input sockets manually

# define the inputs manually for connecting the tasks
@task.calcfunction(inputs=[{"name": "structures"},
                           {"name": "energies"}])
def get_stabest_structure(**kwargs):

@codecov-commenter
Copy link

codecov-commenter commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.80%. Comparing base (5937b88) to head (9e92e86).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   75.75%   79.80%   +4.04%     
==========================================
  Files          70       65       -5     
  Lines        4615     4921     +306     
==========================================
+ Hits         3496     3927     +431     
+ Misses       1119      994     -125     
Flag Coverage Δ
python-3.11 79.71% <100.00%> (+4.05%) ⬆️
python-3.12 79.71% <100.00%> (?)
python-3.9 79.75% <100.00%> (+4.01%) ⬆️

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.

@superstar54 superstar54 force-pushed the feature/define_kwargs_input_manually branch from 9b23ecc to 9e92e86 Compare August 27, 2024 21:34
@superstar54 superstar54 changed the title Allow user to define the inputs manually for dynamic input Decorator allow users to define the inputs manually for dynamic input Aug 27, 2024
@superstar54 superstar54 merged commit 8cf7b81 into main Aug 27, 2024
7 of 8 checks passed
@superstar54 superstar54 deleted the feature/define_kwargs_input_manually branch August 27, 2024 21:35
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