Skip to content

Commit

Permalink
Merging release/0.4.0 into master. RE:#BITBUCKET-11
Browse files Browse the repository at this point in the history
Branch: master
  • Loading branch information
phargogh committed Apr 18, 2018
2 parents 58f2f4a + 679af0b commit ac060b9
Show file tree
Hide file tree
Showing 5 changed files with 355 additions and 123 deletions.
9 changes: 9 additions & 0 deletions HISTORY.rst
@@ -1,5 +1,14 @@
.. :changelog:
.. Unreleased Changes
0.4.0 (2018-04-18)
------------------
* Auto-versioning now happens via ``setuptools_scm``, replacing previous calls to ``natcap.versioner``.
* Added an option to `TaskGraph` constructor to allow negative values in the `n_workers` argument to indicate that the entire object should run in the main thread. A value of 0 will indicate that no multiprocessing will be used but concurrency will be allowed for non-blocking `add_task`.
* Added an abstract class `task.EncapsulatedTaskOp` that can be used to instance a class that needs scope in order to be used as an operation passed to a process. The advantage of using `EncapsulatedTaskOp` is that the `__name__` hash used by `TaskGraph` to determine if a task is unique is calculated in the superclass and the subclass need only worry about implementation of `__call__`.
* Added a `priority` optional scalar argument to `TaskGraph.add_task` to indicates the priority preference of the task to be executed. A higher priority task whose dependencies are satisfied will executed before one with a lower priority.

0.3.0 (2017-11-17)
------------------
* Refactor of core scheduler. Old scheduler used asynchronicity to attempt to test if a Task was complete, occasionally testing all Tasks in potential work queue per task completion. Scheduler now uses bookkeeping to keep track of all dependencies and submits tasks for work only when all dependencies are satisfied.
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Expand Up @@ -5,7 +5,9 @@

setup(
name='taskgraph',
natcap_version='taskgraph/version.py',
use_scm_version={'version_scheme': 'post-release',
'local_scheme': 'node-and-date'},
setup_requires=['setuptools_scm'],
description='Parallel task graph framework.',
long_description=README,
maintainer='Rich Sharp',
Expand Down

0 comments on commit ac060b9

Please sign in to comment.