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

Problem with proposed validation strategy proposed in #10 #13

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

VisLab
Copy link
Member

@VisLab VisLab commented Feb 22, 2024

This draft PR implements the proposed validation strategy of issue #10. This would result in considerable simplification, including getting rid of the HedVersion class. Since the HEDTools cache the HedSchema objects for given schema versions, once one has been created, trying to create another with load_schema_version just uses the cached version.

The fundamental flaw with this approach is illustrated in lines 67 and 68 of test_hed_tags. The HedTags object must have a HED version when it is created, but it seems that adding columns to dynamic tables does not have the flexibility of passing additional parameters.

Help would be appreciated.
@rly @oruebel

@VisLab VisLab requested review from rly and oruebel February 22, 2024 21:20
@VisLab
Copy link
Member Author

VisLab commented Mar 11, 2024

@oruebel @rly would you please provide some help in resolving this issue?

@rly
Copy link
Collaborator

rly commented Mar 14, 2024

Hi @VisLab sorry for my delay in response.

This is a bug in pynwb. I created an issue here: NeurodataWithoutBorders/pynwb#1860
I'll resolve it and push a release out early next week.

In the meantime, you can do this workaround:

nwbfile.trials = TimeIntervals(name='trials', description='experimental trials')
nwbfile.trials.add_column(name="HED", hed_version="8.2.0", description="temp", col_cls=HedTags, data=[])

@VisLab
Copy link
Member Author

VisLab commented Mar 14, 2024

Thanks for the response @rly. I'll try your code and will watch for the PR. Could you also remind me of how to enable the bugger for this. I didn't put it in my notes.

@rly
Copy link
Collaborator

rly commented Mar 31, 2024

We are making a new release of PyNWB in the next two weeks - sorry for the delay on that. You can use the dev branch of PyNWB if you would like to test this sooner.

To enable the debugger, comment out this line:

addopts = "--cov --cov-report html"

That line runs the test and produces coverage reports. Apparently the debugger cannot run at the same time as code coverage tracking.

@VisLab VisLab marked this pull request as ready for review July 8, 2024 17:58
@VisLab VisLab merged commit 755c434 into hed-standard:main Jul 8, 2024
2 checks passed
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