GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 393e0655 authored by Pierre Paleo's avatar Pierre Paleo

Compare current nabu_configuration with file dump nabu configuration

parent af15f694
Pipeline #46335 passed with stage
in 5 minutes and 42 seconds
import os
import posixpath
from ..utils import copy_dict_items
from import NabuConfigParser, validate_nabu_config
from ..utils import copy_dict_items, compare_dicts
from import NabuConfigParser, validate_nabu_config, import_h5_to_dict
from import hdf5_entry_exists, get_h5_value
from .dataset_analyzer import analyze_dataset, DatasetAnalyzer
from .dataset_validator import NabuValidator
......@@ -569,6 +569,29 @@ class ProcessConfig:
return None
raise ValueError(msg)
# Check parameters other than reconstruction
filedump_nabu_config = import_h5_to_dict(
self.dataset_infos.hdf5_entry or "entry",
sections_to_ignore = ["reconstruction"]
for section in sections_to_ignore:
filedump_nabu_config[section] = self.nabu_config[section]
diff = compare_dicts(filedump_nabu_config, self.nabu_config)
if diff is not None:
msg = "Nabu configuration in file %s differ from the current one: %s" % (process_file, diff)
if not raise_on_error:
return None
raise ValueError(msg)
return (dump_start_z, dump_end_z)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment