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

allow stimulus_description in ScalaNWBReader #183

Merged
merged 5 commits into from
Jun 14, 2024
Merged

Conversation

darshanmandge
Copy link
Contributor

  • To get protocol_name from stimulus_description entries to allow ecodes names other than Step
  • Preserves the default protocol_name Step for Scala files
  • Tested for collaborator files for hippocampus and straitum

@darshanmandge darshanmandge self-assigned this Jun 10, 2024
Copy link
Collaborator

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

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

Very nice! Are we sure that the attrs will always have stimulus_description? If not, we should take this edge case into account

@darshanmandge
Copy link
Contributor Author

Thanks @AurelienJaquier . I added a exception AttributeError with a default protocol_name Step.

protocol_name = "Step"
try:
protocol_name = self.content["acquisition"][sweep].attrs["stimulus_description"]
except AttributeError:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be KeyError

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in new commit.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 73.68%. Comparing base (4bfe32a) to head (cb6f730).
Report is 6 commits behind head on master.

Files Patch % Lines
bluepyefe/nwbreader.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
- Coverage   73.78%   73.68%   -0.11%     
==========================================
  Files          38       38              
  Lines        2415     2421       +6     
==========================================
+ Hits         1782     1784       +2     
- Misses        633      637       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@darshanmandge darshanmandge merged commit 348d3a8 into master Jun 14, 2024
4 checks passed
@AurelienJaquier
Copy link
Collaborator

do you still need the update_scala branch @darshanmandge ? If not, could you delete it?

@darshanmandge darshanmandge deleted the update_scala branch June 18, 2024 14:19
@darshanmandge
Copy link
Contributor Author

deleted. thanks!

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