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

[ENH] Allow tedpca argument to be a float inside a string #665

Merged
merged 5 commits into from
Jan 28, 2021

Conversation

notZaki
Copy link
Contributor

@notZaki notZaki commented Jan 28, 2021

Closes none.

Got a parser error while trying the variance-based PCA introduced in #658.
I think it's because the inputs to workflows.tedana.main_ are strings but the parser treats "0.95" as an invalid input.

This PR modifies workflows.parser_utils.check_tedpca_value to accept floats-inside-strings. The function got refactored a bit while I was debugging.

@tsalo
Copy link
Member

tsalo commented Jan 28, 2021

This is definitely a much cleaner approach. It looks like there are style issues that need to be addressed and I might have some changes to the whitespace to request, but overall this looks great!

@codecov
Copy link

codecov bot commented Jan 28, 2021

Codecov Report

Merging #665 (1540513) into master (74b922d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #665      +/-   ##
==========================================
- Coverage   93.75%   93.75%   -0.01%     
==========================================
  Files          26       26              
  Lines        2019     2017       -2     
==========================================
- Hits         1893     1891       -2     
  Misses        126      126              
Impacted Files Coverage Δ
tedana/workflows/parser_utils.py 96.00% <100.00%> (-0.30%) ⬇️

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 74b922d...1540513. Read the comment docs.

eurunuela
eurunuela previously approved these changes Jan 28, 2021
Copy link
Collaborator

@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!

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.

One minor change for readability.

tedana/workflows/parser_utils.py Outdated Show resolved Hide resolved
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.

The changes look great!

@tsalo tsalo merged commit ca7e145 into ME-ICA:master Jan 28, 2021
@notZaki notZaki deleted the float_tedpca branch January 28, 2021 19:34
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.

3 participants