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

Add height check in case of compound type #433

Merged
merged 6 commits into from
Jun 2, 2022

Conversation

lawrence-mbf
Copy link
Collaborator

Fixes #432

How to test the behavior?

ccss = types.core.VoltageClampStimulusSeries( ...
    'data', [1, 2, 3, 4, 5], ...
    'sweep_number', uint64(15)...
);

vcs = types.core.VoltageClampSeries( ...
    'data', [0.1, 0.2, 0.3, 0.4, 0.5], ...
    'sweep_number', uint64(15) ...
);

ic_rec_table.stimuli = types.core.IntracellularStimuliTable( ...
    'description', 'Table for storing intracellular stimulus related metadata.', ...
    'colnames', {'stimulus'}, ...
    'id', types.hdmf_common.ElementIdentifiers( ...
        'data', int64([0, 1, 2]) ...
    ), ...
    'stimulus', types.core.TimeSeriesReferenceVectorData( ...
        'description', 'Column storing the reference to the recorded stimulus for the recording (rows)', ...
        'data', struct( ...
            'idx_start', [0, 1, -1], ...
            'count', [5, 3, -1], ...
            'timeseries', [ ...
                types.untyped.ObjectView(ccss), ...
                types.untyped.ObjectView(ccss), ...
                types.untyped.ObjectView(vcs) ...
            ] ...
        )...
    )...
);

should not error.

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?

Specifically, a compound type constructed using a scalar struct with column field names.
Separate data check from Vector Data check. Recurse only when checking data.
@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #433 (543d490) into master (8fc2589) will increase coverage by 0.05%.
The diff coverage is 91.04%.

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   85.97%   86.02%   +0.05%     
==========================================
  Files         125      125              
  Lines        5070     5125      +55     
==========================================
+ Hits         4359     4409      +50     
- Misses        711      716       +5     
Impacted Files Coverage Δ
+io/writeCompound.m 79.16% <72.22%> (-2.32%) ⬇️
+types/+util/+dynamictable/checkConfig.m 92.85% <93.75%> (-0.48%) ⬇️
+tests/+system/DynamicTableTest.m 89.15% <100.00%> (+0.16%) ⬆️
+types/+untyped/DataStub.m 91.90% <100.00%> (+0.27%) ⬆️
+types/+util/+dynamictable/getRow.m 96.90% <100.00%> (+0.65%) ⬆️
+types/+untyped/MetaClass.m 83.33% <0.00%> (+1.85%) ⬆️

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 8fc2589...543d490. Read the comment docs.

@lawrence-mbf lawrence-mbf requested a review from bendichter June 1, 2022 17:31
Copy link
Contributor

@bendichter bendichter left a comment

Choose a reason for hiding this comment

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

lgtm

@lawrence-mbf lawrence-mbf merged commit 5cc0ff6 into master Jun 2, 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]: checkConfig for dynamictable does not detect size of TimeSeriesReferenceVectorData object properly
2 participants