Skip to content
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
16 changes: 11 additions & 5 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ chronological order. Releases follow `semantic versioning <https://semver.org/>`
all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>`_.


0.0.10 - 2020-11-18
-------------------

- :gh:`40` cleans up the capture manager and other parts of pytask.
- :gh:`41` shortens the task ids in the error reports for better readability.
- :gh:`42` ensures that lists with one element and dictionaries with only a zero key as
input for ``@pytask.mark.depends_on`` and ``@pytask.mark.produces`` are preserved as a
dictionary inside the function.
- :gh:`43` releases v0.0.10


0.0.9 - 2020-10-28
------------------

Expand All @@ -19,11 +30,6 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
- :gh:`38` allows to pass dictionaries as dependencies and products and inside the
function ``depends_on`` and ``produces`` become dictionaries.
- :gh:`39` releases v0.0.9.
- :gh:`40` cleans up the capture manager and other parts of pytask.
- :gh:`41` shortens the task ids in the error reports for better readability.
- :gh:`42` ensures that lists with one element and dictionaries with only a zero key as
input for ``@pytask.mark.depends_on`` and ``@pytask.mark.produces`` are preserved as a
dictionary inside the function.


0.0.8 - 2020-10-04
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = "Tobias Raabe"

# The full version, including alpha/beta/rc tags
release = "0.0.9"
release = "0.0.10"


# -- General configuration -------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.9
current_version = 0.0.10
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
serialize =
{major}.{minor}.{patch}dev{dev}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="pytask",
version="0.0.9",
version="0.0.10",
description=DESCRIPTION,
long_description=DESCRIPTION + "\n\n" + README,
long_description_content_type="text/x-rst",
Expand Down
2 changes: 1 addition & 1 deletion src/_pytask/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.9"
__version__ = "0.0.10"
2 changes: 1 addition & 1 deletion src/pytask/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from _pytask.mark import MARK_GEN as mark # noqa: N811

__all__ = ["cli", "hookimpl", "main", "mark"]
__version__ = "0.0.9"
__version__ = "0.0.10"
21 changes: 13 additions & 8 deletions tests/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,33 +222,38 @@ class FalseNode:
path = attr.ib()


_ROOT = Path.cwd()


@pytest.mark.integration
@pytest.mark.parametrize(
"node, paths, expectation, expected",
[
(
FilePathNode.from_path(Path("src/module.py")),
[Path("src")],
FilePathNode.from_path(_ROOT.joinpath("src/module.py")),
[_ROOT.joinpath("alternative_src")],
pytest.raises(ValueError, match="A node must be"),
None,
),
(
FalseNode(Path("src/module.py")),
[Path("src")],
FalseNode(_ROOT.joinpath("src/module.py")),
[_ROOT.joinpath("src")],
pytest.raises(ValueError, match="Unknown node"),
None,
),
(
DummyTask(
Path("top/src/module.py"), "top/src/module.py::task_func", "task_func"
_ROOT.joinpath("top/src/module.py"),
_ROOT.joinpath("top/src/module.py").as_posix() + "::task_func",
"task_func",
),
[Path("top/src")],
[_ROOT.joinpath("top/src")],
does_not_raise(),
"src/module.py::task_func",
),
(
FilePathNode.from_path(Path("top/src/module.py").resolve()),
[Path("top/src").resolve()],
FilePathNode.from_path(_ROOT.joinpath("top/src/module.py")),
[_ROOT.joinpath("top/src")],
does_not_raise(),
"src/module.py",
),
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ addopts = --doctest-modules
filterwarnings =
ignore: the imp module is deprecated in favour of importlib
ignore: Using or importing the ABCs from 'collections' instead of from
ignore: The (parser|symbol) module is deprecated and will be removed in future
markers =
wip: Tests that are work-in-progress.
unit: Flag for unit tests which target mainly a single function.
Expand Down