claassenlab / MORESCA

This repository provides a template and some resources on standardized scRNA-seq analysis using Python.
https://moresca.readthedocs.io/
GNU Affero General Public License v3.0
0 stars 0 forks source link

Test validity of config file #36

Closed Baschdl closed 2 weeks ago

Baschdl commented 1 year ago

Add a check if the input is the right type and if possible also validate the values

Baschdl commented 1 year ago

We could write a finalize_hook for gin to validate the user input (https://github.com/google/gin-config/blob/edb08e311bdf3f5795575d2fb704e44c9d04c4c2/gin/config.py#L2672) but it's not really made for it. We could use something like Cerberus (https://docs.python-cerberus.org) which is made for validation but this requires a very explicit specification (e.g. https://gist.github.com/MattSegal/fea30d10d26ef666f3a572e97f03c339). Need to discuss if we really need this.