hnn-core
hnn-core copied to clipboard
validate the keys of params file
Sometimes, the correct key may not be used because of a typo. The params object should check and not allow any key.
This would be useful. Also mentioned in https://github.com/jonescompneurolab/hnn/issues/22
It could be a good first issue for @rythorpe
@jasmainak Since I haven't encountered this problem myself, is the idea here to add a method referenced by Param.__init__()
, Param.__getitem__()
, and Param.__setitem__()
that validates all new input keys according to a preconfigured set of possible param keys?
yep, you would need to the validation only in setitem
I think. You should raise ValueError
etc. when the right parameters are not present or they are not in the right ranges. Since the param files are all converted to dictionary ultimately, you could probably use JSON schemas to make your life easier.
This is no longer relevant as we are moving to create a new file format with @gtdang's work