Skip to content

Some housekeeping. #57

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 3 commits into from
Apr 22, 2023
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and
## 0.3.1 - 2023-xx-xx

- {pull}`56` refactors the `ProcessPoolExecutor`.
- {pull}`57` does some housekeeping.

## 0.3.0 - 2023-01-23

Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,15 @@ extend-ignore = [

[tool.ruff.pydocstyle]
convention = "numpy"


[tool.pytest.ini_options]
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
testpaths = ["test"]
markers = [
"wip: Tests that are work-in-progress.",
"unit: Flag for unit tests which target mainly a single function.",
"integration: Flag for integration tests which may comprise of multiple unit tests.",
"end_to_end: Flag for tests that cover the whole program.",
]
norecursedirs = [".idea", ".tox"]
10 changes: 3 additions & 7 deletions src/pytask_parallel/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,10 @@ def pytask_execute_build(session: Session) -> bool | None: # noqa: C901, PLR091


def _parse_future_exception(
exception: BaseException | None,
exc: BaseException | None,
) -> tuple[type[BaseException], BaseException, TracebackType] | None:
"""Parse a future exception."""
return (
None
if exception is None
else (type(exception), exception, exception.__traceback__)
)
"""Parse a future exception into the format of ``sys.exc_info``."""
return None if exc is None else (type(exc), exc, exc.__traceback__)


class ProcessesNameSpace:
Expand Down
31 changes: 0 additions & 31 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,3 @@ conda_channels =
commands =
pip install --no-deps -e .
pytest {posargs}

[flake8]
docstring-convention = numpy
ignore =
D
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.
max-line-length = 88
pytest-mark-no-parentheses = true
warn-symbols =
pytest.mark.wip = Remove 'wip' mark for tests.
pytest.mark.skip = Remove 'skip' flag for tests.

[pytest]
testpaths =
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
tests
addopts = --doctest-modules
filterwarnings =
ignore: the imp module is deprecated in favour of importlib
ignore: The (symbol|parser) module is deprecated and will be removed in future
ignore: Using or importing the ABCs from 'collections' instead of from
markers =
wip: Tests that are work-in-progress.
unit: Flag for unit tests which target mainly a single function.
integration: Flag for integration tests which may comprise of multiple unit tests.
end_to_end: Flag for tests that cover the whole program.
norecursedirs =
.idea
.tox