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

cmd_arg and cmd_out syntactic sugar funcs for attrs.field in ShellSpec/ShellOutSpec #653

Closed
wants to merge 7 commits into from

Conversation

tclose
Copy link
Contributor

@tclose tclose commented May 11, 2023

Types of changes

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

Summary

Adds the pydra.mark.shell_commands.cmd_arg() and pydra.mark.shell_commands.cmd_out() methods to streamline the definition of input/output specs for shell command task definitions. Instead of creating an attrs.field by hand and setting the metadata directly, cmd_arg and cmd_out do this for you.

The main benefit is that cmd_arg and cmd_out specify the valid metadata fields that can be added to the input and output fields, making the code more self-documenting. It also makes the task definitions slightly less verbose.

Checklist

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

@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (426564e) 81.77% compared to head (39b39ce) 81.76%.

❗ Current head 39b39ce differs from pull request most recent head f855fa1. Consider uploading reports for the commit f855fa1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
- Coverage   81.77%   81.76%   -0.01%     
==========================================
  Files          20       21       +1     
  Lines        4400     4410      +10     
  Branches     1264        0    -1264     
==========================================
+ Hits         3598     3606       +8     
- Misses        798      804       +6     
+ Partials        4        0       -4     
Flag Coverage Δ
unittests 81.76% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
pydra/mark/__init__.py 100.00% <100.00%> (ø)
pydra/mark/shell_commands.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tclose
Copy link
Contributor Author

tclose commented May 11, 2023

If you look at the codecov report, the coverage doesn't actually change, so not sure where the -5.07% drop is coming from

@tclose
Copy link
Contributor Author

tclose commented May 11, 2023

See discussion in #647 for background on this PR

@tclose tclose mentioned this pull request May 15, 2023
2 tasks
@djarecka
Copy link
Collaborator

do I understand correctly that #655 replaces this one?

@tclose
Copy link
Contributor Author

tclose commented Sep 11, 2023

Closing until #692 is settled

@tclose tclose closed this Sep 11, 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.

2 participants