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

fix invalid dynamic table typing #459

Merged
merged 11 commits into from
Aug 18, 2022
Merged

Conversation

lawrence-mbf
Copy link
Collaborator

Fixes #457

Motivation

Match language spec here: https://schema-language.readthedocs.io/en/latest/description.html#sec-dtype

How to test the behavior?

See #457

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

Should now use the NWB language spec.
Function name didn't match file name.
@lawrence-mbf lawrence-mbf marked this pull request as draft August 16, 2022 19:03
Mappings now go through file.mapType before reaching checkDtype or correctType.
This ensures that a strict subset of types are actually used for type checking and that all
documentation uses MATLAB types instead of NWB types.
Should not use nwb schema language, but MATLAB language.
@lawrence-mbf lawrence-mbf changed the title 457 fix invalid dynamic tables fix invalid dynamic table typing Aug 16, 2022
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #459 (8744228) into master (3b26777) will increase coverage by 0.12%.
The diff coverage is 90.81%.

@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
+ Coverage   87.48%   87.60%   +0.12%     
==========================================
  Files         127      127              
  Lines        5232     5236       +4     
==========================================
+ Hits         4577     4587      +10     
+ Misses        655      649       -6     
Impacted Files Coverage Δ
+io/getMatTypeSize.m 88.88% <ø> (+22.22%) ⬆️
+file/mapType.m 91.42% <88.46%> (-4.03%) ⬇️
+types/+util/correctType.m 89.68% <89.60%> (+1.68%) ⬆️
+types/+util/checkDtype.m 83.33% <96.87%> (+1.23%) ⬆️
+file/Dataset.m 97.26% <100.00%> (-0.04%) ⬇️
+tests/+util/verifyContainerEqual.m 98.03% <100.00%> (ø)
+io/getBaseType.m 88.23% <0.00%> (-5.89%) ⬇️
NwbFile.m 82.48% <0.00%> (-0.73%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lawrence-mbf lawrence-mbf marked this pull request as ready for review August 17, 2022 16:39
@bendichter
Copy link
Contributor

@lawrence-mbf I'm still getting an error with:

nwb = NwbFile( ...
    'session_description', 'mouse in open exploration',...
    'identifier', 'Mouse5_Day3', ...
    'session_start_time', datetime(2018, 4, 25, 2, 30, 3) ...
);


trials = types.core.TimeIntervals(...
    'description', 'trials table', ...
    'colnames', {'start_time', 'stop_time', 'is_correct'} ...
);

trials.addRow('start_time', 1., 'stop_time', 2., 'is_correct', true);
trials.addRow('start_time', 1.5, 'stop_time', 2., 'is_correct', false);
trials.addRow('start_time', 2.5, 'stop_time', 2.5, 'is_correct', true);

@lawrence-mbf
Copy link
Collaborator Author

lawrence-mbf commented Aug 18, 2022

@bendichter That's error is being worked on in #461. this pr is for #457

@lawrence-mbf
Copy link
Collaborator Author

@bendichter sorry, #461

@lawrence-mbf lawrence-mbf merged commit 0e22ed9 into master Aug 18, 2022
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.

[Bug]: tutorials creating invalid DynamicTables
2 participants