Skip to content

Commit 58eeef9

Browse files
authored
Align to pytask 0.1.0 and fix tests. (#14)
1 parent 3ad16d5 commit 58eeef9

File tree

7 files changed

+15
-9
lines changed

7 files changed

+15
-9
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
21-
python-version: ['3.6', '3.7', '3.8', '3.9']
21+
python-version: ['3.7', '3.8', '3.9']
2222

2323
steps:
2424
- uses: actions/checkout@v2

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ an
1111
------------------
1212

1313
- :gh:`11` fixes the ``README.rst``.
14+
- :gh:`14` fixes tests and aligns pytask-stata with pytask 0.1.0.
1415

1516

1617
0.0.6 - 2021-03-05

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ dependencies:
1313
- conda-verify
1414

1515
# Package dependencies
16-
- pytask >=0.0.9
17-
- pytask-parallel >=0.0.4
16+
- pytask >=0.1.0
17+
- pytask-parallel >=0.0.9
1818

1919
# Misc
2020
- black

src/pytask_stata/collect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from typing import Union
99

1010
from _pytask.config import hookimpl
11-
from _pytask.mark import get_specific_markers_from_task
12-
from _pytask.mark import has_marker
11+
from _pytask.mark_utils import get_specific_markers_from_task
12+
from _pytask.mark_utils import has_marker
1313
from _pytask.nodes import FilePathNode
1414
from _pytask.nodes import PythonFunctionTask
1515
from _pytask.parametrize import _copy_func

src/pytask_stata/execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33

44
from _pytask.config import hookimpl
5-
from _pytask.mark import get_specific_markers_from_task
5+
from _pytask.mark_utils import get_specific_markers_from_task
66
from pytask_stata.shared import convert_task_id_to_name_of_log_file
77
from pytask_stata.shared import get_node_from_dictionary
88
from pytask_stata.shared import STATA_COMMANDS

tests/test_collect.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ def test_pytask_collect_task(name, expected):
124124
],
125125
)
126126
@pytest.mark.parametrize("platform", ["win32", "darwin", "linux"])
127-
def test_pytask_collect_task_teardown(depends_on, produces, platform, expectation):
127+
def test_pytask_collect_task_teardown(
128+
tmp_path, depends_on, produces, platform, expectation
129+
):
128130
session = DummyClass()
129131
session.config = {
130132
"stata": "stata",
@@ -134,9 +136,11 @@ def test_pytask_collect_task_teardown(depends_on, produces, platform, expectatio
134136

135137
task = DummyClass()
136138
task.depends_on = {
137-
i: FilePathNode.from_path(Path(n)) for i, n in enumerate(depends_on)
139+
i: FilePathNode.from_path(tmp_path / n) for i, n in enumerate(depends_on)
140+
}
141+
task.produces = {
142+
i: FilePathNode.from_path(tmp_path / n) for i, n in enumerate(produces)
138143
}
139-
task.produces = {i: FilePathNode.from_path(Path(n)) for i, n in enumerate(produces)}
140144
task.function = task_dummy
141145
task.name = "task_dummy"
142146
task.path = Path()

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ignore =
3939
E203 ; ignores whitespace around : which is enforced by Black.
4040
W503 ; ignores linebreak before binary operator which is enforced by Black.
4141
PT006 ; ignores that parametrizing tests with tuple argument names is preferred.
42+
PT023 ; ignores parentheses at the end of markers.
4243
max-line-length = 88
4344
warn-symbols =
4445
pytest.mark.wip = Remove 'wip' flag for tests.

0 commit comments

Comments
 (0)