diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index 0f1975d..2d094f4 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -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-r to do -\[...\]". +[...]". #### Describe the solution you'd like diff --git a/src/pytask_r/serialization.py b/src/pytask_r/serialization.py index 908725d..b444eea 100644 --- a/src/pytask_r/serialization.py +++ b/src/pytask_r/serialization.py @@ -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-r" diff --git a/tests/conftest.py b/tests/conftest.py index c8d16f2..8420099 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -92,6 +92,6 @@ def invoke(self, *args, **kwargs): return super().invoke(*args, **kwargs) -@pytest.fixture() +@pytest.fixture def runner(): return CustomCliRunner() diff --git a/tests/test_collect.py b/tests/test_collect.py index 9d79377..5110f56 100644 --- a/tests/test_collect.py +++ b/tests/test_collect.py @@ -4,12 +4,13 @@ import pytest from pytask import Mark + from pytask_r.collect import _parse_r_mark from pytask_r.collect import r from pytask_r.serialization import SERIALIZERS -@pytest.mark.unit() +@pytest.mark.unit @pytest.mark.parametrize( ("args", "kwargs", "expectation", "expected"), [ @@ -43,7 +44,7 @@ def test_r(args, kwargs, expectation, expected): assert result == expected -@pytest.mark.unit() +@pytest.mark.unit @pytest.mark.parametrize( ( "mark", diff --git a/tests/test_config.py b/tests/test_config.py index e4c224d..3afc1dc 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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 "r" in session.config["markers"] diff --git a/tests/test_execute.py b/tests/test_execute.py index f2ad26c..b6cf786 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -9,13 +9,13 @@ from pytask import Task from pytask import build from pytask import cli -from pytask_r.execute import pytask_execute_task_setup +from pytask_r.execute import pytask_execute_task_setup from tests.conftest import needs_rscript from tests.conftest import parametrize_parse_code_serializer_suffix -@pytest.mark.unit() +@pytest.mark.unit def test_pytask_execute_task_setup(monkeypatch): """Make sure that the task setup raises errors.""" # Act like r is installed since we do not test this. @@ -33,7 +33,7 @@ def test_pytask_execute_task_setup(monkeypatch): @needs_rscript -@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_r_script( # noqa: PLR0913 @@ -70,7 +70,7 @@ def task_run_r_script(produces = Path("out.txt")): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_run_r_script_w_task_decorator( runner, tmp_path, parse_config_code, serializer, suffix @@ -100,7 +100,7 @@ def run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_raise_error_if_rscript_is_not_found( tmp_path, monkeypatch, parse_config_code, serializer, suffix @@ -132,7 +132,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_run_r_script_w_saving_workspace( runner, tmp_path, parse_config_code, serializer, suffix @@ -167,7 +167,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_run_r_script_w_wrong_cmd_option( runner, tmp_path, parse_config_code, serializer, suffix @@ -202,7 +202,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end def test_run_r_script_w_custom_serializer(runner, tmp_path): task_source = """ import pytask @@ -232,7 +232,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end def test_run_r_script_fails_w_multiple_markers(runner, tmp_path): task_source = """ import pytask @@ -252,7 +252,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end def test_run_r_script_with_capital_extension(runner, tmp_path): task_source = """ import pytask @@ -280,7 +280,7 @@ def task_run_r_script(): ... @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_run_r_script_w_nested_inputs( runner, tmp_path, parse_config_code, serializer, suffix diff --git a/tests/test_normal_execution_w_plugin.py b/tests/test_normal_execution_w_plugin.py index d14f598..dd5a773 100644 --- a/tests/test_normal_execution_w_plugin.py +++ b/tests/test_normal_execution_w_plugin.py @@ -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")], diff --git a/tests/test_parallel.py b/tests/test_parallel.py index a6754a4..1a2f612 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -25,7 +25,7 @@ @needs_rscript -@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, tmp_path, parse_config_code, serializer, suffix @@ -69,7 +69,7 @@ def task_execute_r_script(): @needs_rscript -@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, tmp_path, parse_config_code, serializer, suffix @@ -106,7 +106,7 @@ def execute_r_script(): @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix @pytest.mark.xfail(reason="@task does not support partialed functions.") def test_parallel_parametrization_over_source_file_w_loop_and_lambda( diff --git a/tests/test_parametrize.py b/tests/test_parametrize.py index 6e9cb94..8f15217 100644 --- a/tests/test_parametrize.py +++ b/tests/test_parametrize.py @@ -11,7 +11,7 @@ @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_parametrized_execution_of_r_script_w_loop( runner, tmp_path, parse_config_code, serializer, suffix @@ -53,7 +53,7 @@ def task_run_r_script(): @needs_rscript -@pytest.mark.end_to_end() +@pytest.mark.end_to_end @parametrize_parse_code_serializer_suffix def test_parametrize_r_options_and_product_paths_w_loop( runner, tmp_path, parse_config_code, serializer, suffix