diff --git a/multiarea_model/multiarea_model.py b/multiarea_model/multiarea_model.py index fb7c0a162b3031cbb174f5f9692e82ba16090a56..6eb06a4a009aa0234d673028da4541b37c3afe81 100644 --- a/multiarea_model/multiarea_model.py +++ b/multiarea_model/multiarea_model.py @@ -136,7 +136,8 @@ class MultiAreaModel: self.K = ind else: if self.params['connection_params']['K_stable'] is True: - print('Stabilization procedure has to be integrated.') + raise NotImplementedError('Stabilization procedure has ' + 'to be integrated.') elif isinstance(self.params['connection_params']['K_stable'], np.ndarray): raise ValueError("Not supported. Please store the " "matrix in a file and define the path to the file as " @@ -160,7 +161,14 @@ class MultiAreaModel: self.label = dicthash.generate_hash_from_dict({'params': self.params, 'K': self.K, 'N': self.N, - 'structure': self.structure}) + 'structure': self.structure}, + blacklist=[('params', 'fullscale_rates'), + ('params', + 'connection_params', + 'K_stable'), + ('params', + 'connection_params', + 'replace_cc_input_source')]) if isinstance(network_spec, dict): parameter_fn = os.path.join(base_path, diff --git a/tests/test_stabilization.py b/tests/test_stabilization.py new file mode 100644 index 0000000000000000000000000000000000000000..ddedbb966c7dd6d4fa7249b912581d450c31d5dc --- /dev/null +++ b/tests/test_stabilization.py @@ -0,0 +1,15 @@ +from multiarea_model import MultiAreaModel +import pytest + + +def test_meanfield(): + """ + Test stabilization procedure. Since this algorithm is not + implemented yet, we here test if this properly raises a + NotImplementedError. + """ + + network_params = {'connection_params': {'K_stable': True}} + theory_params = {} + with pytest.raises(NotImplementedError): + MultiAreaModel(network_params, theory=True, theory_spec=theory_params)