Skip to content

Commit 80bf1e6

Browse files
authored
Update MDDJ usage to v0.4.2 (#1238)
2 parents 8d92757 + 9014efc commit 80bf1e6

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typing = [
7575
"types-jmespath",
7676
]
7777
check-project-metadata = [
78-
"mddj==0.2.0",
78+
"mddj==0.4.2",
7979
{include-group = "yaml"},
8080
"build",
8181
"twine",

scripts/ensure_min_python_is_tested.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
# run via `tox r -e check-min-python-is-tested`
22
import pathlib
3-
import subprocess
43
import sys
54

5+
import mddj.api
66
import ruamel.yaml
77

8+
dj = mddj.api.DJ()
89
YAML = ruamel.yaml.YAML(typ="safe")
910
REPO_ROOT = pathlib.Path(__file__).parent.parent
1011

11-
requires_python_version = subprocess.check_output(
12-
["python", "-m", "mddj", "read", "requires-python", "--lower-bound"],
13-
cwd=REPO_ROOT,
14-
text=True,
15-
).strip()
12+
requires_python_version = dj.read.requires_python(lower_bound=True)
13+
print("requires-python:", requires_python_version)
1614

1715
with open(REPO_ROOT / ".github/workflows/test.yaml") as f:
1816
workflow = YAML.load(f)
@@ -40,13 +38,7 @@
4038
sys.exit(1)
4139

4240

43-
proc = subprocess.run(
44-
["python", "-m", "mddj", "read", "tox", "min-version"],
45-
check=True,
46-
capture_output=True,
47-
cwd=REPO_ROOT,
48-
)
49-
tox_min_python_version = proc.stdout.decode().strip()
41+
tox_min_python_version = dj.read.tox.min_python_version()
5042
if tox_min_python_version != requires_python_version:
5143
print("ERROR: ensure_min_python_is_tested.py failed!")
5244
print(

0 commit comments

Comments
 (0)