rly / ndx-structured-behavior

An NWB extension for storing structured behavior programs and data, such as from BAABL/BEADL
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Tasks class fails in example notebook with latest version of HDMF #5

Closed oruebel closed 2 years ago

oruebel commented 2 years ago

Could you help me with the following issue. Using the dev branch of HDMF, I'm getting the following error when trying to run the example notebook.

Screen Shot 2022-07-15 at 11 29 57 AM

When looking at the help for the Tasks class, at least at first glance it seems to look ok:

Screen Shot 2022-07-15 at 11 33 11 AM
mavaylon1 commented 2 years ago

Weird. I am using an older version of dev. I'll take a look.

oruebel commented 2 years ago

The following recent PR could be relevant https://github.com/hdmf-dev/hdmf/pull/741 @rly do you think this could be related to that PR?

mavaylon1 commented 2 years ago

After some fiddling I saw that Tasks has two unnamed datasets, the task_program and the task_schema. I gave them names, but was met with the error that it can't have a name if quantity was "+". I commented out quantity so that It's back to 1. This fixed the error; however, we don't have quantity as "+" anymore. Thoughts?

oruebel commented 2 years ago

I commented out quantity so that It's back to 1.

I think that is fine since if you were to use multiple programs I think one would would probably create separate Tasks rather than having multiple programs for a single task. @rly what do you think?

However, I think we should still investigate the error in HDMF as well, since the schema was valid and the class generation should have still worked.

oruebel commented 2 years ago

I gave them names,

When using a quantity of 1 or ?, we should use the singular for the names, i.e, we should change the name task_programs to task_program and task_schemas to task_schema``