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

txt.py restructuring and acq read addition #123

Merged
merged 37 commits into from
Feb 5, 2020

Conversation

vinferrer
Copy link
Collaborator

@vinferrer vinferrer commented Jan 10, 2020

Closes issue #137 and #136.
Add acq support mentioned in issue #41

Proposed Changes

  • restructuring populate_phys_input function so it only checks the header and recognizes the file type. File reading has been delegated to secondary functions. Added commented files support both in header and channels
  • process_labchart: new function that process labchart header and channels
  • process_acq: new function that process header and channels
  • read_header_and_channels: new function that reads txt files and separates them into header and channels
  • still missing multi-frequency support

@vinferrer vinferrer added Enhancement New feature or request Refactoring Improve nonfunctional attributes Minormod This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0) labels Jan 10, 2020
@vinferrer vinferrer requested a review from smoia January 10, 2020 09:16
vinferrer and others added 3 commits January 10, 2020 10:33
delete unnecesary f string

Co-Authored-By: Eneko Uruñuela <[email protected]>
Delete unecessary f string

Co-Authored-By: Eneko Uruñuela <[email protected]>
delete unnecesary f string

Co-Authored-By: Eneko Uruñuela <[email protected]>
Copy link
Member

@smoia smoia left a comment

Choose a reason for hiding this comment

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

Looks very promising!
It needs a couple of changes but it's looking good.

One thing: can you add (or collaborate with another developer to add) testing for this new file?
We should start not merging PRs without tests (docs aside). You can ask @eurunuela or @rmarkello for help in the task!

@vinferrer vinferrer requested a review from smoia January 13, 2020 11:51
Copy link
Member

@smoia smoia left a comment

Choose a reason for hiding this comment

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

Ok, we're getting there! A couple of comments and docstring reviews more, and I think we'll be ready!

# get units and names
orig_units = []
orig_names = []
for index1 in range(3, len(header[-1]) + 8, 2):
Copy link
Member

Choose a reason for hiding this comment

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

I think that @eurunuela 's point is still not met. Can you maybe comment this line to make it more clear (so we can help you with a name for the variable?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so basically the variable is an index than used into the header retreats for every channel the original name and units

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could call it ``retriving_indx```?

@vinferrer vinferrer requested a review from smoia January 17, 2020 11:07
@codecov-io
Copy link

codecov-io commented Jan 29, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@dd8c0eb). Click here to learn what that means.
The diff coverage is 97.05%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #123   +/-   ##
========================================
  Coverage          ?   66.7%           
========================================
  Files             ?      11           
  Lines             ?     934           
  Branches          ?       0           
========================================
  Hits              ?     623           
  Misses            ?     311           
  Partials          ?       0
Impacted Files Coverage Δ
phys2bids/utils.py 91.17% <ø> (ø)
phys2bids/tests/test_txt.py 100% <100%> (ø)
phys2bids/phys2bids.py 37.5% <100%> (ø)
phys2bids/cli/run.py 19.23% <50%> (ø)
phys2bids/viz.py 15.09% <50%> (ø)
phys2bids/physio_obj.py 82.95% <88.88%> (ø)

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 dd8c0eb...5c0a7cd. Read the comment docs.

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.

Looks pretty good to me overall, just little details we should probably tackle before merging.

@vinferrer
Copy link
Collaborator Author

@smoia please review

@vinferrer
Copy link
Collaborator Author

Anddddd Travis is working now, I think you can accept the pull request safely @smoia, @eurunuela

Copy link
Member

@smoia smoia left a comment

Choose a reason for hiding this comment

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

Great example of how the PRs should be from now on!
There's only one little issue with the files. Change that and you're good to go!

@vinferrer
Copy link
Collaborator Author

Changes requested done, please accept the review, @smoia @eurunuela

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

@smoia smoia left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉

@vinferrer vinferrer merged commit 88133df into physiopy:master Feb 5, 2020
@vinferrer vinferrer deleted the labchart_read branch February 5, 2020 11:45
@smoia smoia added the released This issue/pull request has been released. label Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Minormod This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0) Refactoring Improve nonfunctional attributes released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants