From 2d7147bb9b63975528a678d043e4e77c52f3d2c0 Mon Sep 17 00:00:00 2001 From: Joni Herttuainen Date: Fri, 17 Nov 2023 17:41:14 +0100 Subject: [PATCH] Update docs, lint fixes --- CHANGELOG.rst | 9 +++++++++ README.rst | 25 +++++++++++++++++++++++++ bluepysnap/circuit_validation.py | 1 - bluepysnap/simulation_validation.py | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2f03d355..436afb85 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog ========= +Version v2.1.0 +-------------- + +New Features +~~~~~~~~~~~~ +- Added simulation config validation +- Added a new commandline subcommand: ``validate-simulation`` + + Version v2.0.2 -------------- diff --git a/README.rst b/README.rst index dfe493dd..a26c6233 100644 --- a/README.rst +++ b/README.rst @@ -73,6 +73,31 @@ Or a python free function: errors = validate("my/circuit/path/circuit_config.json") +Simulation Validation +~~~~~~~~~~~~~~~~~~~~~ + +Similarly to circuit validation, Blue Brain SNAP also provides a SONATA simulation validator for verifying simulation configs. + +Currently, the validator only verifies that: + +- all the mandatory fields are present in the config file +- all the properties in the `simulation config specification `__ have correct data types and accepted values + +This functionality is provided by either the cli function: + +.. code-block:: shell + + bluepysnap validate-simulation my/circuit/path/simulation_config.json + + +Or a python free function: + +.. code-block:: python3 + + from bluepysnap.simulation_validation import validate + errors = validate("my/circuit/path/simulation_config.json") + + Acknowledgements ---------------- diff --git a/bluepysnap/circuit_validation.py b/bluepysnap/circuit_validation.py index ea6f2b73..f7af2b07 100644 --- a/bluepysnap/circuit_validation.py +++ b/bluepysnap/circuit_validation.py @@ -5,7 +5,6 @@ import logging from pathlib import Path -import click import h5py import numpy as np import pandas as pd diff --git a/bluepysnap/simulation_validation.py b/bluepysnap/simulation_validation.py index 1259ec2c..8eca685f 100644 --- a/bluepysnap/simulation_validation.py +++ b/bluepysnap/simulation_validation.py @@ -1,3 +1,4 @@ +"""Standalone module that validates Sonata simulation. See ``validate-simulation`` function.""" from pathlib import Path from bluepysnap import schemas