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

function in output_file_template #553

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

djarecka
Copy link
Collaborator

@djarecka djarecka commented Jul 11, 2022

Types of changes

  • New feature (non-breaking change which adds functionality)

Summary

allowing output_file_template to be a function that returns a different templates depending on the values of the input fields

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

…nt templates depending on the values of the input fields
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #553 (2067a05) into master (1bc0f75) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #553      +/-   ##
==========================================
+ Coverage   77.03%   77.06%   +0.02%     
==========================================
  Files          20       20              
  Lines        4311     4316       +5     
  Branches     1210     1212       +2     
==========================================
+ Hits         3321     3326       +5     
  Misses        802      802              
  Partials      188      188              
Flag Coverage Δ
unittests 76.96% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
pydra/engine/helpers_file.py 78.85% <100.00%> (+0.12%) ⬆️
pydra/engine/specs.py 88.59% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bc0f75...2067a05. Read the comment docs.

@djarecka djarecka merged commit eb48e0a into nipype:master Jul 12, 2022
@djarecka
Copy link
Collaborator Author

@yibeichan - please check if this changes (merged to master but not released) would solve your problem with creating a template based on the values of input.

I realized that using callable would not the best option, I simply allow output_file_template to be a function that takes inputs as an argument and returns templates, see tests in this PR

@yibeichan
Copy link
Collaborator

@djarecka thank you! I updated with your code and passed the test locally, but the output from the test seems a bit weird. I'll show you tomorrow morning

@djarecka djarecka deleted the enh/callable_template branch December 30, 2022 20:40
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