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
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ jobs:

- name: Upload test coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5

- name: Run tests with lowest resolution
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
run: uv run --group test --resolution lowest-direct pytest --nbmake -n auto

- name: Run tests with highest resolution
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
run: uv run --group test --resolution highest pytest --nbmake -n auto
59 changes: 30 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
"attrs>=21.3",
"click>=7,<8.2.0",
"click-default-group",
"networkx>=2.4",
"optree>=0.9",
"packaging",
"attrs>=21.3.0",
"click>=8.1.8,<8.2.0",
"click-default-group>=1.2.4",
"networkx>=2.4.0",
"optree>=0.9.0",
"packaging>=23.0.0",
"pluggy>=1.3.0",
"rich",
"sqlalchemy>=2",
"rich>=13.8.0",
"sqlalchemy>=2.0.31",
'tomli>=1; python_version < "3.11"',
'typing-extensions; python_version < "3.11"',
'typing-extensions>=4.8.0; python_version < "3.11"',
"universal-pathlib>=0.2.2",
]

Expand All @@ -49,30 +49,31 @@ email = "raabe@posteo.de"
[dependency-groups]
dev = ["pygraphviz>=1.11;platform_system=='Linux'"]
docs = [
"furo",
"furo>=2024.8.6",
"ipython>=8.13.2",
"matplotlib",
"myst-parser",
"myst-nb",
"sphinx",
"sphinx-click",
"sphinx-copybutton",
"matplotlib>=3.5.0",
"myst-parser>=3.0.0",
"myst-nb>=1.2.0",
"sphinx>=7.0.0",
"sphinx-click>=6.0.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.3",
"sphinx-toolbox",
"sphinxext-opengraph",
"sphinx-toolbox>=4.0.0",
"sphinxext-opengraph>=0.10.0",
]
plugin-list = ["httpx", "tabulate[widechars]", "tqdm"]
plugin-list = ["httpx>=0.27.0", "tabulate[widechars]>=0.9.0", "tqdm>=4.66.3"]
test = [
"deepdiff",
"nbmake",
"pexpect",
"pytest",
"pytest-cov",
"pytest-xdist",
"syrupy",
"aiohttp", # For HTTPPath tests.
"coiled",
"cloudpickle",
"deepdiff>=7.0.0",
"nbmake>=1.5.5",
"pygments>=2.18.0",
"pexpect>=4.9.0",
"pytest>=8.4.0",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.6.1",
"syrupy>=4.5.0",
"aiohttp>=3.11.0", # For HTTPPath tests.
"coiled>=1.42.0",
"cloudpickle>=3.0.0",
]
typing = ["mypy>=1.9.0,<1.11", "nbqa>=1.8.5"]

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def _remove_variable_info_from_output(data: str, path: Any) -> str: # noqa: ARG
new_info_line = new_info_line.replace(platform, "<platform>")
pattern = re.compile(version.VERSION_PATTERN, flags=re.IGNORECASE | re.VERBOSE)
new_info_line = re.sub(pattern=pattern, repl="<version>", string=new_info_line)
new_info_line = new_info_line.replace("pluggy <version>", "pluggy <version>")

# Remove dynamic root path
index_collected = next(
Expand Down
6 changes: 3 additions & 3 deletions tests/test_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def task_show_capture():
"""
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))

result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)

assert result.exit_code == ExitCode.FAILED

Expand Down Expand Up @@ -128,7 +128,7 @@ def test_wrong_capture_method(tmp_path):
"""
tmp_path.joinpath("workflow.py").write_text(textwrap.dedent(source))

result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
assert result.exit_code == ExitCode.CONFIGURATION_FAILED
assert "Value 'a' is not a valid" in result.stdout
assert "Traceback" not in result.stdout
Expand Down Expand Up @@ -255,7 +255,7 @@ def task_unicode():
tmp_path.joinpath("workflow.py").write_text(
textwrap.dedent(source), encoding="utf-8"
)
result = run_in_subprocess(("python", "workflow.py"), cwd=tmp_path)
result = run_in_subprocess(("uv", "run", "python", "workflow.py"), cwd=tmp_path)
assert result.exit_code == ExitCode.OK
assert "1 Succeeded" in result.stdout

Expand Down
7 changes: 5 additions & 2 deletions tests/test_dag_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
_TEST_SHOULD_RUN = _IS_PYGRAPHVIZ_INSTALLED or (
os.environ.get("CI") and sys.platform == "linux"
)
_GRAPH_LAYOUTS = ["neato", "dot", "fdp", "sfdp", "twopi", "circo"]
_GRAPH_LAYOUTS = ["dot"]
_TEST_FORMATS = ["dot", "pdf", "png", "jpeg", "svg"]


Expand Down Expand Up @@ -92,7 +92,10 @@ def main():
tmp_path.joinpath("input.txt").touch()

result = subprocess.run(
("python", "task_example.py"), cwd=tmp_path, check=True, capture_output=True
("uv", "run", "python", "task_example.py"),
cwd=tmp_path,
check=True,
capture_output=True,
)

assert result.returncode == ExitCode.OK
Expand Down
3 changes: 2 additions & 1 deletion tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ def create_file(
"""
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))
result = subprocess.run(
("python", tmp_path.joinpath("task_module.py").as_posix()), check=False
("uv", "run", "python", tmp_path.joinpath("task_module.py").as_posix()),
check=False,
)
assert result.returncode == ExitCode.OK
assert tmp_path.joinpath("file.txt").read_text() == "This is the text."
Expand Down
5 changes: 4 additions & 1 deletion tests/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@ def task_second():
tmp_path.joinpath("task_example.py").write_text(textwrap.dedent(source))

result = subprocess.run(
("python", "task_example.py"), cwd=tmp_path, capture_output=True, check=False
("uv", "run", "python", "task_example.py"),
cwd=tmp_path,
capture_output=True,
check=False,
)
assert "2 Succeeded" in result.stdout.decode()
assert result.returncode == ExitCode.OK
Expand Down
Loading