Skip to content

Commit 7f6271b

Browse files
authored
Release v0.0.2 and prepare for pytask 0.0.5. (#1)
1 parent 9685e6f commit 7f6271b

File tree

15 files changed

+46
-34
lines changed

15 files changed

+46
-34
lines changed

.conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ requirements:
2121
run:
2222
- python >=3.6
2323
- cloudpickle
24-
- pytask >=0.0.2
24+
- pytask >=0.0.5
2525

2626
test:
2727
requires:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.1.0
3+
rev: v3.2.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=100']
@@ -10,12 +10,12 @@ repos:
1010
- id: debug-statements
1111
- id: end-of-file-fixer
1212
- repo: https://github.com/asottile/pyupgrade
13-
rev: v2.7.1
13+
rev: v2.7.2
1414
hooks:
1515
- id: pyupgrade
1616
args: [--py36-plus]
1717
- repo: https://github.com/asottile/reorder_python_imports
18-
rev: v2.3.0
18+
rev: v2.3.5
1919
hooks:
2020
- id: reorder-python-imports
2121
- repo: https://github.com/psf/black

CHANGES.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ chronological order. Releases follow `semantic versioning <https://semver.org/>`
66
all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask-parallel>`_.
77

88

9+
0.0.2 - 2020-08-12
10+
------------------
11+
12+
- :gh:`2` prepares the plugin for pytask 0.0.5.
13+
14+
915
0.0.1 - 2020-07-17
1016
------------------
1117

12-
- :gh:`1` combined the whole effort which went into releasing v0.0.1.
18+
- Initial commit which combined the whole effort to release v0.0.1.

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ pytask-parallel
2121
Parallelize the execution of tasks with `pytask-parallel` which is a plugin for `pytask
2222
<https://github.com/pytask-dev/pytask>`_.
2323

24+
Install the plugin via ``conda`` with
25+
26+
.. code-block:: bash
27+
28+
$ conda config --add channels conda-forge --add channels pytask
29+
$ conda install pytask-parallel
30+
2431
The plugin uses the ``ProcessPoolExecutor`` or ``ThreadPoolExecutor`` in the
2532
`concurrent.futures <https://docs.python.org/3/library/concurrent.futures.html>`_ module
2633
to execute tasks asynchronously.

environment.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- pytask
55
dependencies:
6-
- python=3.7
6+
- python
77
- pip
88

99
# Conda
@@ -12,10 +12,11 @@ dependencies:
1212
- conda-verify
1313

1414
# Package dependencies
15-
- pytask
15+
- pytask >= 0.0.5
1616
- cloudpickle
1717

1818
# Misc
19+
- bump2version
1920
- jupyterlab
2021
- matplotlib
2122
- pdbpp

setup.cfg

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
[bumpversion]
2-
current_version = 0.0.1
2+
current_version = 0.0.2
33
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
4-
serialize =
5-
{major}.{minor}.{patch}dev{dev}
6-
{major}.{minor}.{patch}
4+
serialize =
5+
{major}.{minor}.{patch}dev{dev}
6+
{major}.{minor}.{patch}
77

88
[bumpversion:file:setup.py]
99

10-
[bumpversion:file:docs/conf.py]
11-
12-
[bumpversion:file:src/parallel/__init__.py]
10+
[bumpversion:file:src/pytask_parallel/__init__.py]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name="pytask-parallel",
6-
version="0.0.1",
6+
version="0.0.2",
77
packages=find_packages(where="src"),
88
package_dir={"": "src"},
99
entry_points={"pytask": ["pytask_parallel = pytask_parallel.plugin"]},

src/pytask_parallel/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.2"

src/pytask_parallel/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import click
2-
import pytask
2+
from _pytask.config import hookimpl
33

44

5-
@pytask.hookimpl
5+
@hookimpl
66
def pytask_add_parameters_to_cli(command):
77
additional_parameters = [
88
click.Option(

src/pytask_parallel/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os
22

3-
import pytask
4-
from pytask.shared import get_first_not_none_value
3+
from _pytask.config import hookimpl
4+
from _pytask.shared import get_first_not_none_value
55

66

7-
@pytask.hookimpl
7+
@hookimpl
88
def pytask_parse_config(config, config_from_cli, config_from_file):
99
config["n_workers"] = get_first_not_none_value(
1010
config_from_cli, config_from_file, key="n_workers", default=1
@@ -20,7 +20,7 @@ def pytask_parse_config(config, config_from_cli, config_from_file):
2020
)
2121

2222

23-
@pytask.hookimpl
23+
@hookimpl
2424
def pytask_post_parse(config):
2525
# Disable parallelization if debugging is enabled.
2626
if config["pdb"] or config["trace"]:

src/pytask_parallel/execute.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,25 @@
55

66
import cloudpickle
77
import networkx as nx
8-
import pytask
9-
from pytask.report import ExecutionReport
8+
from _pytask.config import hookimpl
9+
from _pytask.report import ExecutionReport
1010
from pytask_parallel.scheduler import TopologicalSorter
1111

12-
1312
PARALLEL_BACKEND = {
1413
"processes": ProcessPoolExecutor,
1514
"threads": ThreadPoolExecutor,
1615
}
1716

1817

19-
@pytask.hookimpl
18+
@hookimpl
2019
def pytask_post_parse(config):
2120
if config["parallel_backend"] == "processes":
2221
config["pm"].register(ProcessesNameSpace)
2322
elif config["parallel_backend"] == "threads":
2423
config["pm"].register(ThreadsNameSpace)
2524

2625

27-
@pytask.hookimpl(tryfirst=True)
26+
@hookimpl(tryfirst=True)
2827
def pytask_execute_create_scheduler(session):
2928
if session.config["n_workers"] > 1:
3029
task_names = {task.name for task in session.tasks}
@@ -40,7 +39,7 @@ def pytask_execute_create_scheduler(session):
4039
return scheduler
4140

4241

43-
@pytask.hookimpl(tryfirst=True)
42+
@hookimpl(tryfirst=True)
4443
def pytask_execute_build(session):
4544
if session.config["n_workers"] > 1:
4645
reports = []
@@ -123,7 +122,7 @@ def pytask_execute_build(session):
123122

124123

125124
class ProcessesNameSpace:
126-
@pytask.hookimpl(tryfirst=True)
125+
@hookimpl(tryfirst=True)
127126
def pytask_execute_task(session, task): # noqa: N805
128127
if session.config["n_workers"] > 1:
129128
bytes_ = cloudpickle.dumps(task)
@@ -136,7 +135,7 @@ def unserialize_and_execute_task(bytes_):
136135

137136

138137
class ThreadsNameSpace:
139-
@pytask.hookimpl(tryfirst=True)
138+
@hookimpl(tryfirst=True)
140139
def pytask_execute_task(session, task): # noqa: N805
141140
if session.config["n_workers"] > 1:
142141
return session.executor.submit(task.execute)

src/pytask_parallel/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import pytask
1+
from _pytask.config import hookimpl
22
from pytask_parallel import cli
33
from pytask_parallel import config
44
from pytask_parallel import execute
55

66

7-
@pytask.hookimpl
7+
@hookimpl
88
def pytask_add_hooks(pm):
99
pm.register(cli)
1010
pm.register(config)

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22

33
import pytest
4-
from pytask.main import main
4+
from pytask import main
55

66

77
@pytest.mark.end_to_end

tests/test_execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from concurrent.futures import ThreadPoolExecutor
55

66
import pytest
7-
from pytask.main import main
7+
from pytask import main
88
from pytask_parallel.execute import ProcessesNameSpace
99
from pytask_parallel.execute import ThreadsNameSpace
1010

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ basepython = python
99
[testenv:pytest]
1010
conda_deps =
1111
cloudpickle
12-
pytask >=0.0.2
12+
pytask >=0.0.5
1313
pytest
1414
pytest-cov
1515
pytest-xdist

0 commit comments

Comments
 (0)