Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 2, 2024
1 parent 1bd7743 commit d9e29e9
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ______________________________________________________________________
#### Is your feature request related to a problem?

Provide a description of what the problem is, e.g. "I wish I could use pytask-julia to
do \[...\]".
do [...]".

#### Describe the solution you'd like

Expand Down
2 changes: 1 addition & 1 deletion src/pytask_julia/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pytask import PTask
from pytask import PTaskWithPath

__all__ = ["create_path_to_serialized", "serialize_keyword_arguments", "SERIALIZERS"]
__all__ = ["SERIALIZERS", "create_path_to_serialized", "serialize_keyword_arguments"]

_HIDDEN_FOLDER = ".pytask/pytask-julia"

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ def invoke(self, *args, **kwargs):
return super().invoke(*args, **kwargs)


@pytest.fixture()
@pytest.fixture
def runner():
return CustomCliRunner()
6 changes: 3 additions & 3 deletions tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

import pytest
from pytask import Mark

from pytask_julia.collect import SERIALIZERS
from pytask_julia.collect import _parse_julia_mark
from pytask_julia.collect import _parse_project

from tests.conftest import ROOT


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
(
"mark",
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_parse_julia_mark( # noqa: PLR0913
assert out == expected


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("project", "root", "expected"),
[
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pytask import build


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_marker_is_configured(tmp_path):
session = build(paths=tmp_path)
assert "julia" in session.config["markers"]
22 changes: 11 additions & 11 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
from pytask import Task
from pytask import build
from pytask import cli
from pytask_julia.execute import pytask_execute_task_setup

from pytask_julia.execute import pytask_execute_task_setup
from tests.conftest import ROOT
from tests.conftest import needs_julia
from tests.conftest import parametrize_parse_code_serializer_suffix


@pytest.mark.unit()
@pytest.mark.unit
def test_pytask_execute_task_setup_missing_julia(monkeypatch):
"""Make sure that the task setup raises errors."""
# Act like julia is installed since we do not test this.
Expand All @@ -37,7 +37,7 @@ def test_pytask_execute_task_setup_missing_julia(monkeypatch):


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
@pytest.mark.parametrize("depends_on", ["'in_1.txt'", "['in_1.txt', 'in_2.txt']"])
def test_run_jl_script( # noqa: PLR0913
Expand Down Expand Up @@ -86,7 +86,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_run_jl_script_w_task_decorator(
runner, tmp_path, parse_config_code, serializer, suffix
Expand Down Expand Up @@ -123,7 +123,7 @@ def run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_raise_error_if_julia_is_not_found(
tmp_path,
Expand Down Expand Up @@ -169,7 +169,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_run_jl_script_w_wrong_cmd_option(
runner,
Expand Down Expand Up @@ -208,7 +208,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize("n_threads", [2, 3])
@parametrize_parse_code_serializer_suffix
def test_check_passing_cmd_line_options( # noqa: PLR0913
Expand Down Expand Up @@ -249,7 +249,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.xfail(
condition=sys.platform == "win32" and os.environ.get("CI") == "true",
reason="Test folder and repo are on different drives causing relpath to fail.",
Expand Down Expand Up @@ -303,7 +303,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.xfail(
condition=sys.platform == "win32" and os.environ.get("CI") == "true",
reason="Test folder and repo are on different drives causing relpath to fail.",
Expand Down Expand Up @@ -349,7 +349,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_jl_script_w_custom_serializer(runner, tmp_path):
task_source = f"""
import pytask
Expand Down Expand Up @@ -382,7 +382,7 @@ def task_run_jl_script():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_jl_script_fails_w_multiple_markers(runner, tmp_path):
task_source = """
import pytask
Expand Down
2 changes: 1 addition & 1 deletion tests/test_normal_execution_w_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pytask import cli


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize(
"dependencies",
[(), ("in.txt",), ("in_1.txt", "in_2.txt")],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_parallel_parametrization_over_source_files_w_loop(
runner,
Expand Down Expand Up @@ -75,7 +75,7 @@ def task_execute_julia():


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_parallel_parametrization_over_source_file_w_loop(
runner,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@needs_julia
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@parametrize_parse_code_serializer_suffix
def test_parametrized_execution_of_jl_script_w_loop(
runner,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from contextlib import ExitStack as does_not_raise # noqa: N813

import pytest

from pytask_julia.shared import julia


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("args", "kwargs", "expectation", "expected"),
[
Expand Down

0 comments on commit d9e29e9

Please sign in to comment.