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 main workflow of phys2denoise #17

Merged
merged 28 commits into from
Feb 25, 2021
Merged

Conversation

smoia
Copy link
Member

@smoia smoia commented Nov 12, 2020

Closes #14

Proposed Changes

  • Main structure of phys2denoise
  • parser

Change Type

  • bugfix (+0.0.1)
  • minor (+0.1.0)
  • major (+1.0.0)
  • refactoring (no version update)
  • test (no version update)
  • infrastructure (no version update)
  • documentation (no version update)
  • other

Checklist before review

  • I added everything I wanted to add to this PR.
  • [Code or tests only] I wrote/updated the necessary docstrings.
  • [Code or tests only] I ran and passed tests locally.
  • [Documentation only] I built the docs locally.
  • My contribution is harmonious with the rest of the code: I'm not introducing repetitions.
  • My code respects the adopted style, especially linting conventions.
  • The title of this PR is explanatory on its own, enough to be understood as part of a changelog.
  • I added or indicated the right labels.
  • I added information regarding the timeline of completion for this PR.
  • Please, comment on my PR while it's a draft and give me feedback on the development!

phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
@smoia smoia added Minormod-breaking For development only, this PR increments the minor version (0.+1.0) but breaks compatibility Enhancement New feature or request and removed Enhancement New feature or request labels Nov 13, 2020
@smoia smoia requested a review from 62442katieb November 25, 2020 22:14
@smoia smoia marked this pull request as ready for review November 25, 2020 22:18
@smoia
Copy link
Member Author

smoia commented Nov 25, 2020

We're ready for review!
Apologies for the time it took me to get here.
Question: who contributed to the logger part in phys2bids? @eurunuela and @vinferrer ?

In any case, please have a look! @tsalo @eurunuela @62442katieb, let's see if we can merge this soon(ish)!

phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
@smoia
Copy link
Member Author

smoia commented Nov 25, 2020

Also let me be clear: this is a little, small, first step toward having something that given an input returns an output that makes sense (together with the other bunch of PRs). Nowhere near the state of development we want to get to though!

For this reason I'm using the minormod-breaking label. We're still in alpha after all.

phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
Copy link

@eurunuela eurunuela left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @smoia !

@eurunuela
Copy link

Oh, I almost forgot. You should update the label if you think this is a majormod (I think it is).

@smoia
Copy link
Member Author

smoia commented Nov 27, 2020

Oh, I almost forgot. You should update the label if you think this is a majormod (I think it is).

Yup, you're right in that this is a majormod, however I thought that the general approach we wanted to follow (phys2bids#192) was not to go in the 1.0 + versioning until we leave beta stage. That's why I'm adopting the minormod-breaking label (after the suggestions in phys2bids#192)

@eurunuela
Copy link

Yup, you're right in that this is a majormod, however I thought that the general approach we wanted to follow (phys2bids#192) was not to go in the 1.0 + versioning until we leave beta stage. That's why I'm adopting the minormod-breaking label (after the suggestions in phys2bids#192)

Sounds good! It's also good that we have it written on this thread for future reference.

phys2denoise.py Outdated
**args)
elif metrics == 'retroicor_resp':
args = select_input_args(compute_retroicor_regressors, metric_args)
args['resp'] = True

Choose a reason for hiding this comment

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

Doesn't make more sense to modify this so we don't have two if conditions, one here and another one in the retroicor code?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean @vinferrer ? The two ifs do different things (Or you mean to recode the three functions in retroicor intotwo? But then there's quite a lot of lines that are common...)

Choose a reason for hiding this comment

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

Okay, after seeing that you don't input the metrics argument directly, why don't you put this line inside select_input_args I think you can reduce this if statement at least, another thing is that instead of creating the dictionary entry args['card'] = True when metrics == 'retroicor_card' you could use directly the metrics == 'retroicor_card' inside compute_retroicor_regressors. Do you follow? or should I do suggestions in both PR's?

Choose a reason for hiding this comment

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

I think we can avoid an extra if statement

Choose a reason for hiding this comment

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

I mean, you have a function called select_input_args I would include the type of metric detection inside of this function rather than in the main workflow

phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise.py Outdated
else:
args = select_input_args(metric, metric_args)
print_metric_call(metric, args)
regr[f'{metric}'] = metric(physio, **args)

Choose a reason for hiding this comment

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

Also, what function is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Which one?

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

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

Just a couple of questions/comments. I imagine we'll need to resolve some conflicts between the parameter names in this PR and those in #19, but that's not a big deal and shouldn't slow us down.

phys2denoise/phys2denoise.py Outdated Show resolved Hide resolved
phys2denoise/cli/run.py Outdated Show resolved Hide resolved
phys2denoise/cli/run.py Outdated Show resolved Hide resolved
@smoia smoia assigned tsalo and smoia Feb 25, 2021
@smoia smoia merged commit ad51a00 into physiopy:master Feb 25, 2021
@smoia
Copy link
Member Author

smoia commented Feb 25, 2021

🚀 PR was released in 0.1.0 🚀

@smoia smoia added the released This issue/pull request has been released label Feb 25, 2021
@smoia smoia deleted the enh/skeleton branch February 25, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minormod-breaking For development only, this PR increments the minor version (0.+1.0) but breaks compatibility released This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants