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

[Feature]: enh mock to include nwbfile #1705

Closed
3 tasks done
bendichter opened this issue Jun 20, 2023 · 1 comment · Fixed by #1707
Closed
3 tasks done

[Feature]: enh mock to include nwbfile #1705

bendichter opened this issue Jun 20, 2023 · 1 comment · Fixed by #1707
Assignees
Labels
category: enhancement improvements of code or code behavior topic: testing issues related to testing
Milestone

Comments

@bendichter
Copy link
Contributor

What would you like to see added to PyNWB?

in response to #1701

change all mock functions to include an nwbfile parameter

e.g.

def mock_ElectrodeGroup(
    name=None,
    description="description",
    location="location",
    device=None,
    position=None,
    nwbfile: Optional[NWBFile] = None,
):

    electrode_group = ElectrodeGroup(
        name=name or name_generator("ElectrodeGroup"),
        description=description,
        location=location,
        device=device or mock_Device(nwbfile=nwbfile),
        position=position,
    )

    if nwbfile is not None:
        nwbfile.electrode_groups.append(electrode_group)

    return electrode_group

Is your feature request related to a problem?

No response

What solution would you like?

do for all neurodata types and add tests

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

@oruebel oruebel added category: enhancement improvements of code or code behavior topic: testing issues related to testing labels Jun 20, 2023
@oruebel oruebel added this to the Next Release milestone Jun 20, 2023
@mavaylon1
Copy link
Collaborator

I'll tackle this starting Monday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior topic: testing issues related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants