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

TermSet Config #1789

Closed
wants to merge 6 commits into from
Closed

TermSet Config #1789

wants to merge 6 commits into from

Conversation

mavaylon1
Copy link
Collaborator

Motivation

What was the reasoning behind this change? Please explain the changes briefly.

We want to integrate the TermSet class into pynwb such that we provide default termsets to validate fields within an object. The approach here is to have a config file that stores the object type, the fields within the object that uses a termset, and the path to the termset. These termsets will love within nwb-schema, along with the config file.

On the pynwb side, init_validation is a method call prior to setting the fields and calling init from the super class. This will go through the fields of the object and check the config file for fields that support termsets. These fields will have their values replaced with a TermSetWrapper.

How to test the behavior?

Show how to reproduce the new behavior (can be a bug fix or a new feature)

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@mavaylon1
Copy link
Collaborator Author

TODO/Discussion:

  1. Make the validation step a boolean.
  2. Most likely move the init_validation to AbstractContainer. I kept it here for a quick proof of concept.
  3. Finalize this approach in general.

@mavaylon1 mavaylon1 closed this Jan 18, 2024
@mavaylon1 mavaylon1 deleted the config branch January 18, 2024 21:50
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.

1 participant