Skip to content

Align to pytask 0.1.0 and fix tests. #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ 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
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/pytask_stata/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pytask_stata/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down