Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions petab/v2/petab1to2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import re
import shutil
import warnings
from contextlib import suppress
from pathlib import Path
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -386,6 +387,16 @@ def update_noise_dist(row):
else:
new_dist = f"{trans}-{dist}"

if new_dist == "log10-normal":
warnings.warn(
f"Noise distribution `{new_dist}' for "
f"observable `{row[v1.C.OBSERVABLE_ID]}'"
f" is not supported in PEtab v2. "
"Using `log-normal` instead.",
stacklevel=2,
)
new_dist = v2.C.LOG_NORMAL

if new_dist not in v2.C.NOISE_DISTRIBUTIONS:
raise NotImplementedError(
f"Noise distribution `{new_dist}' for "
Expand Down
3 changes: 3 additions & 0 deletions tests/v2/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def test_petab1to2_remote():
)


@pytest.mark.filterwarnings(
"ignore:.*Using `log-normal` instead.*:UserWarning"
)
@parametrize_or_skip
def test_benchmark_collection(problem_id):
"""Test that we can upgrade all benchmark collection models."""
Expand Down
Loading