comanlab/gentopo

Validate `config.yml` for expected data

Opened this issue · 0 comments

We generally need a way to handle a configuration file that is standardized regardless of the study/project in question. This means that each file has the same format, including the same default fields, with 'optional' fields only if well-documented along with explicit handler methods for them that fail when those fields are needed for a given network family.

For instance, if using a random network, very few parameters are needed. However, a small world network, such as connected_watts_strogatz_graph, other parameters are required like tries and, adjacently, omega. This implies that tries and omega are only necessary for some network families, which needs to be reflected in validating a configuration file.

Options for implementation:

A. We handle validation on a per network basis, meaning every nx.<generator> must have it's only validation.
B. We group validation handlers per family, meaning every within-family nx.<generator> must have a common validator. Likely this means a family-level abstraction, e.g., small_world(n, k, p, method="", ... ).
C. We use an omnibus validation method that includes case-based handlers.

Not sure which is the best option at this moment. There may be a creative way to thread these together so things are more maintainable/easy to update and add new topological frameworks.