Skip to content

Commit f1495ca

Browse files
authored
Test lowest dependency resolution. (#684)
1 parent b55800c commit f1495ca

File tree

8 files changed

+390
-373
lines changed

8 files changed

+390
-373
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,11 @@ jobs:
5757

5858
- name: Upload test coverage reports to Codecov with GitHub Action
5959
uses: codecov/codecov-action@v5
60+
61+
- name: Run tests with lowest resolution
62+
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
63+
run: uv run --group test --resolution lowest-direct pytest --nbmake -n auto
64+
65+
- name: Run tests with highest resolution
66+
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
67+
run: uv run --group test --resolution highest pytest --nbmake -n auto

pyproject.toml

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ classifiers = [
2121
]
2222
dynamic = ["version"]
2323
dependencies = [
24-
"attrs>=21.3",
25-
"click>=7,<8.2.0",
26-
"click-default-group",
27-
"networkx>=2.4",
28-
"optree>=0.9",
29-
"packaging",
24+
"attrs>=21.3.0",
25+
"click>=8.1.8,<8.2.0",
26+
"click-default-group>=1.2.4",
27+
"networkx>=2.4.0",
28+
"optree>=0.9.0",
29+
"packaging>=23.0.0",
3030
"pluggy>=1.3.0",
31-
"rich",
32-
"sqlalchemy>=2",
31+
"rich>=13.8.0",
32+
"sqlalchemy>=2.0.31",
3333
'tomli>=1; python_version < "3.11"',
34-
'typing-extensions; python_version < "3.11"',
34+
'typing-extensions>=4.8.0; python_version < "3.11"',
3535
"universal-pathlib>=0.2.2",
3636
]
3737

@@ -49,30 +49,31 @@ email = "raabe@posteo.de"
4949
[dependency-groups]
5050
dev = ["pygraphviz>=1.11;platform_system=='Linux'"]
5151
docs = [
52-
"furo",
52+
"furo>=2024.8.6",
5353
"ipython>=8.13.2",
54-
"matplotlib",
55-
"myst-parser",
56-
"myst-nb",
57-
"sphinx",
58-
"sphinx-click",
59-
"sphinx-copybutton",
54+
"matplotlib>=3.5.0",
55+
"myst-parser>=3.0.0",
56+
"myst-nb>=1.2.0",
57+
"sphinx>=7.0.0",
58+
"sphinx-click>=6.0.0",
59+
"sphinx-copybutton>=0.5.2",
6060
"sphinx-design>=0.3",
61-
"sphinx-toolbox",
62-
"sphinxext-opengraph",
61+
"sphinx-toolbox>=4.0.0",
62+
"sphinxext-opengraph>=0.10.0",
6363
]
64-
plugin-list = ["httpx", "tabulate[widechars]", "tqdm"]
64+
plugin-list = ["httpx>=0.27.0", "tabulate[widechars]>=0.9.0", "tqdm>=4.66.3"]
6565
test = [
66-
"deepdiff",
67-
"nbmake",
68-
"pexpect",
69-
"pytest",
70-
"pytest-cov",
71-
"pytest-xdist",
72-
"syrupy",
73-
"aiohttp", # For HTTPPath tests.
74-
"coiled",
75-
"cloudpickle",
66+
"deepdiff>=7.0.0",
67+
"nbmake>=1.5.5",
68+
"pygments>=2.18.0",
69+
"pexpect>=4.9.0",
70+
"pytest>=8.4.0",
71+
"pytest-cov>=5.0.0",
72+
"pytest-xdist>=3.6.1",
73+
"syrupy>=4.5.0",
74+
"aiohttp>=3.11.0", # For HTTPPath tests.
75+
"coiled>=1.42.0",
76+
"cloudpickle>=3.0.0",
7677
]
7778
typing = ["mypy>=1.9.0,<1.11", "nbqa>=1.8.5"]
7879

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def _remove_variable_info_from_output(data: str, path: Any) -> str: # noqa: ARG
3838
new_info_line = new_info_line.replace(platform, "<platform>")
3939
pattern = re.compile(version.VERSION_PATTERN, flags=re.IGNORECASE | re.VERBOSE)
4040
new_info_line = re.sub(pattern=pattern, repl="<version>", string=new_info_line)
41+
new_info_line = new_info_line.replace("pluggy <version>", "pluggy <version>")
4142

4243
# Remove dynamic root path
4344
index_collected = next(

tests/test_capture.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def task_show_capture():
8787
"""
8888
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))
8989

90-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
90+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
9191

9292
assert result.exit_code == ExitCode.FAILED
9393

@@ -128,7 +128,7 @@ def test_wrong_capture_method(tmp_path):
128128
"""
129129
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))
130130

131-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
131+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
132132
assert result.exit_code == ExitCode.CONFIGURATION_FAILED
133133
assert "Value 'a' is not a valid" in result.stdout
134134
assert "Traceback" not in result.stdout
@@ -255,7 +255,7 @@ def task_unicode():
255255
tmp_path.joinpath("workflow.py").write_text(
256256
textwrap.dedent(source), encoding="utf-8"
257257
)
258-
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
258+
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
259259
assert result.exit_code == ExitCode.OK
260260
assert "1 Succeeded" in result.stdout
261261

tests/test_dag_command.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
_TEST_SHOULD_RUN = _IS_PYGRAPHVIZ_INSTALLED or (
2424
os.environ.get("CI") and sys.platform == "linux"
2525
)
26-
_GRAPH_LAYOUTS = ["neato", "dot", "fdp", "sfdp", "twopi", "circo"]
26+
_GRAPH_LAYOUTS = ["dot"]
2727
_TEST_FORMATS = ["dot", "pdf", "png", "jpeg", "svg"]
2828

2929

@@ -92,7 +92,10 @@ def main():
9292
tmp_path.joinpath("input.txt").touch()
9393

9494
result = subprocess.run(
95-
("python", "task_example.py"), cwd=tmp_path, check=True, capture_output=True
95+
("uv", "run", "python", "task_example.py"),
96+
cwd=tmp_path,
97+
check=True,
98+
capture_output=True,
9699
)
97100

98101
assert result.returncode == ExitCode.OK

tests/test_execute.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,8 @@ def create_file(
602602
"""
603603
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))
604604
result = subprocess.run(
605-
("python", tmp_path.joinpath("task_module.py").as_posix()), check=False
605+
("uv", "run", "python", tmp_path.joinpath("task_module.py").as_posix()),
606+
check=False,
606607
)
607608
assert result.returncode == ExitCode.OK
608609
assert tmp_path.joinpath("file.txt").read_text() == "This is the text."

tests/test_task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,10 @@ def task_second():
667667
tmp_path.joinpath("task_example.py").write_text(textwrap.dedent(source))
668668

669669
result = subprocess.run(
670-
("python", "task_example.py"), cwd=tmp_path, capture_output=True, check=False
670+
("uv", "run", "python", "task_example.py"),
671+
cwd=tmp_path,
672+
capture_output=True,
673+
check=False,
671674
)
672675
assert "2 Succeeded" in result.stdout.decode()
673676
assert result.returncode == ExitCode.OK

0 commit comments

Comments
 (0)