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
6 changes: 0 additions & 6 deletions src/gt4py/cartesian/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import itertools
import json
import os
import pathlib
import string
import sys
import time
Expand Down Expand Up @@ -459,11 +458,6 @@ def warn_experimental_feature(*, feature: str, ADR: str) -> None:
# be nice and remove a potential `/` prefixed
ADR = ADR.removeprefix("/")

repo_root = pathlib.Path(__file__).parent.parent.parent.parent.parent
adr_location = repo_root / "docs" / "development" / "ADRs" / "cartesian" / ADR
if not adr_location.exists():
raise ValueError(f"Could not find ADR for '{feature}' in. Looked in `{adr_location}`.")

warnings.warn(
f"{feature} is an experimental feature. Please read "
f"<https://github.com/GridTools/gt4py/blob/main/docs/development/ADRs/cartesian/{ADR}> "
Expand Down
5 changes: 0 additions & 5 deletions tests/cartesian_tests/unit_tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,3 @@ def test_warn_experimental_feature() -> None:
# even works with pre-fixed slash in (relative) ADR path
with pytest.warns(UserWarning, match="Test feature is an experimental feature."):
gt_util.warn_experimental_feature(feature="Test feature", ADR="/README.md")


def test_warn_experimental_feature_raise_if_adr_not_found() -> None:
with pytest.raises(ValueError, match="Could not find ADR for 'asdf'."):
gt_util.warn_experimental_feature(feature="asdf", ADR="not/existing.md")