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

Raise error if expected attribute does not exist on a Container #196

Merged
merged 4 commits into from
Nov 13, 2019

Conversation

rly
Copy link
Contributor

@rly rly commented Nov 12, 2019

Currently, if a custom class is written for a spec, and the class does not have a field that corresponds to a group or dataset or attribute in the spec, no error or warning is thrown; the class writer would not be aware of their missing mapping. Since this missing field is almost certainly a bug, check for the missing field and throw an exception.

This has caught the missing Container fields for NWBFile/general/intracellular_ephys/filtering and TimeSeries/sync.

@rly rly marked this pull request as ready for review November 12, 2019 18:38
@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #196 into dev will decrease coverage by 0.15%.
The diff coverage is 37.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #196      +/-   ##
==========================================
- Coverage   70.42%   70.27%   -0.16%     
==========================================
  Files          30       30              
  Lines        5907     5920      +13     
  Branches     1382     1385       +3     
==========================================
  Hits         4160     4160              
- Misses       1316     1326      +10     
- Partials      431      434       +3
Impacted Files Coverage Δ
src/hdmf/common/table.py 54.73% <36.36%> (-0.25%) ⬇️
src/hdmf/build/map.py 67.02% <40%> (-0.6%) ⬇️

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 dd0b466...1be948f. Read the comment docs.

@rly rly merged commit 3cc14f9 into dev Nov 13, 2019
@rly rly deleted the check_container_attr branch November 13, 2019 00:57
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