You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scattered throughout Vivarium, we have functions to perform operations on schemas, topologies, and hierarchies, e.g. inverse_topology. I think the codebase would be easier to understand if we pulled these functions into a new library under vivarium/library so that we can document and test them thoroughly.
In this library, we would have 3 kinds of entities:
Hierarchies are trees of data.
Schemas assign metadata to each node in the tree.
Topologies are like MongoDB projections. They describe how to retrieve data from a hierarchy and re-shape it into a desired structure.
The library would provide functions to do the following:
Reach into a hierarchy and retrieve values in the form specified by a topology.
Invert a topology (this function takes in one topology and returns a new topology).
Given a set of schemas and a set of topologies, create a hierarchy. This function should take parameters to describe how to initialize the hierarchy values from the schema rather than hard-coding a special key like _default. This also shouldn't be dependent on the Store class.
Take a hierarchy and figure out what schemas need to change to effect a change in that hierarchy. This function will also need to take the schemas as an argument.
Perform operations (e.g. updates) over a hierarchy based on a set of schemas.
The text was updated successfully, but these errors were encountered:
U8NWXD
changed the title
[WIP] Pull Schema, Topology, and Hierarchy Utilities into Separate Library
Pull Schema, Topology, and Hierarchy Utilities into Separate Library
Mar 23, 2022
Scattered throughout Vivarium, we have functions to perform operations on schemas, topologies, and hierarchies, e.g.
inverse_topology
. I think the codebase would be easier to understand if we pulled these functions into a new library undervivarium/library
so that we can document and test them thoroughly.In this library, we would have 3 kinds of entities:
The library would provide functions to do the following:
_default
. This also shouldn't be dependent on theStore
class.Possibly related: #100
The text was updated successfully, but these errors were encountered: