BlueBrain / snap

The Blue Brain Pythonic Simulation and Network Analysis Productivity layer
https://bluebrainsnap.readthedocs.io/
GNU Lesser General Public License v3.0
19 stars 10 forks source link

Simulation validation #246

Closed joni-herttuainen closed 1 year ago

joni-herttuainen commented 1 year ago

Added schema based validation for simulation configurations.

It would also make sense to further the config values, such as

and possibly add the option to also run the circuit validation for the circuit used in the simulation (provided that network is defined).

But all of the other features should be added in a separate PR, this one is big enough as it is.

codecov-commenter commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9479090) 100.00% compared to head (de5cda6) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #246 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 31 32 +1 Lines 2389 2432 +43 ========================================= + Hits 2389 2432 +43 ``` | [Flag](https://app.codecov.io/gh/BlueBrain/snap/pull/246/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | Coverage Δ | | |---|---|---| | [pytest](https://app.codecov.io/gh/BlueBrain/snap/pull/246/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mgeplf commented 1 year ago

Great idea, looks good to me. I didn't go through all the schema to make sure it's correct though...

joni-herttuainen commented 1 year ago

Can't blame you. It's a whole lot of schemas. I followed the spec religiously, so it should (barring possible mistakes made by me) condone to that but I'm only like 99.9% sure.

If people start using this, they will eventually find any possible discrepancies between the validation and the spec. I hope there aren't too many of them. Validator is not a validator if it validates incorrect things 😅