File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 44
55import re
66import shutil
7+ import warnings
78from contextlib import suppress
89from pathlib import Path
910from tempfile import TemporaryDirectory
@@ -386,6 +387,16 @@ def update_noise_dist(row):
386387 else :
387388 new_dist = f"{ trans } -{ dist } "
388389
390+ if new_dist == "log10-normal" :
391+ warnings .warn (
392+ f"Noise distribution `{ new_dist } ' for "
393+ f"observable `{ row [v1 .C .OBSERVABLE_ID ]} '"
394+ f" is not supported in PEtab v2. "
395+ "Using `log-normal` instead." ,
396+ stacklevel = 2 ,
397+ )
398+ new_dist = v2 .C .LOG_NORMAL
399+
389400 if new_dist not in v2 .C .NOISE_DISTRIBUTIONS :
390401 raise NotImplementedError (
391402 f"Noise distribution `{ new_dist } ' for "
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ def test_petab1to2_remote():
3030 )
3131
3232
33+ @pytest .mark .filterwarnings (
34+ "ignore:.*Using `log-normal` instead.*:UserWarning"
35+ )
3336@parametrize_or_skip
3437def test_benchmark_collection (problem_id ):
3538 """Test that we can upgrade all benchmark collection models."""
You can’t perform that action at this time.
0 commit comments