Skip to content

refactor providers #12

@sneakers-the-rat

Description

@sneakers-the-rat

providers are currently all over the map, one of the last major things that needs to be fixed. Their design is, dare i say, batshit and bullshit. and i am allowed to say that because i designed them.

What we want:

  • A way of abstracting getting models..
  • from a variety of sources
  • on-demand (ie. we might only have the NWB schema and need to generate the linkml and pydantic models)
  • with correctly resolved versions

TODO:

  • just build into nwb_models or else use it for the namespace everywhere
  • split out sources into separate classes, switching between the builtin models and cached models is messy as hell
  • use the ectopic model finder to replace much of the pydantic provider, ideally the interface would just be to from nwb_models.{namespace}.{version}.{schema} import {class}
  • make add_schema methods rather than build, which make for clearer semantics - when loading an nwb file, add all the models we don't have to the cache directory, and then we can just access them forever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions