diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 3a30cd0..9cbd896 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9'] steps: - uses: actions/checkout@v2 diff --git a/CHANGES.rst b/CHANGES.rst index 840c0e2..cc10d01 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,7 @@ all releases are available on `PyPI `_ an ------------------ - :gh:`11` fixes the ``README.rst``. +- :gh:`14` fixes tests and aligns pytask-stata with pytask 0.1.0. 0.0.6 - 2021-03-05 diff --git a/environment.yml b/environment.yml index 2068657..db898d1 100644 --- a/environment.yml +++ b/environment.yml @@ -13,8 +13,8 @@ dependencies: - conda-verify # Package dependencies - - pytask >=0.0.9 - - pytask-parallel >=0.0.4 + - pytask >=0.1.0 + - pytask-parallel >=0.0.9 # Misc - black diff --git a/src/pytask_stata/collect.py b/src/pytask_stata/collect.py index 08836ee..5ae5b7a 100644 --- a/src/pytask_stata/collect.py +++ b/src/pytask_stata/collect.py @@ -8,8 +8,8 @@ from typing import Union from _pytask.config import hookimpl -from _pytask.mark import get_specific_markers_from_task -from _pytask.mark import has_marker +from _pytask.mark_utils import get_specific_markers_from_task +from _pytask.mark_utils import has_marker from _pytask.nodes import FilePathNode from _pytask.nodes import PythonFunctionTask from _pytask.parametrize import _copy_func diff --git a/src/pytask_stata/execute.py b/src/pytask_stata/execute.py index 50c988a..0fc84bb 100644 --- a/src/pytask_stata/execute.py +++ b/src/pytask_stata/execute.py @@ -2,7 +2,7 @@ import re from _pytask.config import hookimpl -from _pytask.mark import get_specific_markers_from_task +from _pytask.mark_utils import get_specific_markers_from_task from pytask_stata.shared import convert_task_id_to_name_of_log_file from pytask_stata.shared import get_node_from_dictionary from pytask_stata.shared import STATA_COMMANDS diff --git a/tests/test_collect.py b/tests/test_collect.py index 34362c8..0343936 100644 --- a/tests/test_collect.py +++ b/tests/test_collect.py @@ -124,7 +124,9 @@ def test_pytask_collect_task(name, expected): ], ) @pytest.mark.parametrize("platform", ["win32", "darwin", "linux"]) -def test_pytask_collect_task_teardown(depends_on, produces, platform, expectation): +def test_pytask_collect_task_teardown( + tmp_path, depends_on, produces, platform, expectation +): session = DummyClass() session.config = { "stata": "stata", @@ -134,9 +136,11 @@ def test_pytask_collect_task_teardown(depends_on, produces, platform, expectatio task = DummyClass() task.depends_on = { - i: FilePathNode.from_path(Path(n)) for i, n in enumerate(depends_on) + i: FilePathNode.from_path(tmp_path / n) for i, n in enumerate(depends_on) + } + task.produces = { + i: FilePathNode.from_path(tmp_path / n) for i, n in enumerate(produces) } - task.produces = {i: FilePathNode.from_path(Path(n)) for i, n in enumerate(produces)} task.function = task_dummy task.name = "task_dummy" task.path = Path() diff --git a/tox.ini b/tox.ini index cfe6e1b..ba776eb 100644 --- a/tox.ini +++ b/tox.ini @@ -39,6 +39,7 @@ ignore = E203 ; ignores whitespace around : which is enforced by Black. W503 ; ignores linebreak before binary operator which is enforced by Black. PT006 ; ignores that parametrizing tests with tuple argument names is preferred. + PT023 ; ignores parentheses at the end of markers. max-line-length = 88 warn-symbols = pytest.mark.wip = Remove 'wip' flag for tests.