summaryrefslogtreecommitdiff
path: root/taskflow/patterns/unordered_flow.py
Commit message (Collapse)AuthorAgeFilesLines
* Update TaskFlow for networkx 2.xMichael Johnson2019-10-181-2/+2
| | | | | | | | | | | The networkx 2.x series has been out for two years now and supports python 3.6 and greater[1]. This patch updates TaskFlow to require a minimum of networkx 2.1. It also updates the code to support recent deprecation expiration introduced in the 2.4 release. [1] https://networkx.github.io/documentation/stable/news.html Change-Id: Ife31d353ba80824ebc63c8b21ee90943badc8da3
* Use graphs as the underlying structure of patternsJoshua Harlow2015-09-181-13/+12
| | | | | | | | | This unifies all the patterns to be graph based so that they are more uniform and there underlying constraints are more easy to understand (taskflow basically processes graphs). Change-Id: Ib2ab07c1c87165cf40a06508128010887f658391
* iter_nodes method added to flowsTimofey Durakov2015-08-281-0/+4
| | | | | | | New method allows to iterate over flow node and get access to node metadata during iteration. Change-Id: Ib0fc77f0597961602fbc3b49ba09e4df815d8230
* Relax the unordered flow symbol constraintsJoshua Harlow2014-09-081-47/+2
| | | | | | | | | | | | In order to make it possible to have a symbol tree we need to relax and remove the constraints that are being imposed by the unordered constraints and later move those constraint checks and validations into the engines compilation stage. Part of blueprint taskflow-improved-scoping Change-Id: I80718b4bc01fbf0dce6a95cd2fac7e6e2e1814d1
* Be smarter about required flow symbolsJoshua Harlow2014-09-081-0/+12
| | | | | | | | | | | | | | Instead of blindly assuming all the symbols that are provided automatically work for all flows even if the flow has ordering constraints we should set the base flow class requires property to be abstract and provide flow specific properties that can do the appropriate analysis to determine what the flows unsatisfied symbol requirements actually are. Part of blueprint taskflow-improved-scoping Change-Id: Ie149c05b3305c5bfff9d9f2c05e7e064c3a6d0c7
* Put provides and requires code to basic FlowIvan A. Melnikov2014-05-071-24/+9
| | | | | | | | | | Code that calculates provides and requires for flow is almost identical for all patterns, so this change makes it completely identical and puts it to the base class. Other patterns are still allowed to override these properties for sake of customization or optimization. Change-Id: I6e875e863047b5287ec727fc9a491f252f144ecf
* Fix spelling mistakeJoshua Harlow2014-03-261-1/+1
| | | | Change-Id: Ic3ae069565f0f9e25f243eead105e1b97fe437fc
* Adjust the exception hierachyJoshua Harlow2014-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Group the exceptions into the following groups * Storage * Jobs * Execution * Other (wrapped failure here) This grouping makes it easier to understand where one type of exception should be used vs using another type of exception. Backwards incompatible changes: * StorageError -> StorageFailure * AlreadyExists -> Duplicate * WrappedFailure now inherits from Exception and not directly from TaskFlowException since it wraps arbitrary other exceptions and is not specific to taskflow. Cleanups: * JobNotFound -> NotFound * EmptyFlow -> Empty * JobAlreadyExists -> AlreadyExists * InvariantViolation (X) * ConnectionFailure (X) Change-Id: I0e1e81b513fbbc7adb8bfaa1244993e345ab70d3
* Iteration over links in flow interfaceIvan A. Melnikov2014-03-211-0/+5
| | | | | | | | | In addition to iteration over its children (atoms or subflows) each pattern now provides iter_links() method that iterates over dependency links. This allows engines to treat all patterns in the same way instead knowing what structure each pattern expresses. Change-Id: I52cb5b0b501eefc8eb56a9ef5303aeb318013e11
* Add retry to Flow patternsAnastasia Karpinska2014-03-141-4/+10
| | | | | | | | Implement dependency checks when adding items to flows: - retry can't be depended on tasks from it's subflow. - retry can't provide same values as tasks or other retries Change-Id: Iffa8e673fd2de39407ae22cd38ad523d484cbba7
* Remove extra quote symbolIvan A. Melnikov2014-03-131-1/+1
| | | | | | Three quotes is just enough to open multiline string literal. Change-Id: I15d489f1a76be81a05b2378ef35120ee84d5eb04
* Remove extraneous vim configuration commentsyangxurong2014-02-141-2/+0
| | | | | | | | | Remove line containing comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4 Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573 Closes-Bug:#1229324
* Doc strings and comments clean-upskudriashev2014-01-261-1/+2
| | | | | | | | * Added missing period for doc strings * Correct syntax errors * Remove H402 from flake8 ignore list Change-Id: Ia8592bf99378e3658d6cca2ceb148bf9eb0b5de8
* Merge "Skip invariant checking and adding when nothing provided"Jenkins2014-01-241-1/+4
|\
| * Skip invariant checking and adding when nothing providedJoshua Harlow2013-12-311-1/+4
| | | | | | | | Change-Id: Icc3dca675820d331fb1d6e8f3a5a4169d1b2d113
* | Exceptions cleanupIvan A. Melnikov2014-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most TaskFlow exception don't have 'Exception' suffix in their names, so we drop it from the few that have it, for sake of consistency and more concise and expressive code. MissingDependencies parent object is changed from InvalidState to InvariantViolation, which is more appropriate. Unused ClosedException is dropped. Breaking change: any client code that used renamed exceptions, ClosedException or relied on catching MissingDependencies as InvariantViolationException is affected. Change-Id: I649b7760d382ccb6df333bdffd667ba6b67a431e
* | Check tasks should not provide same valuesAnastasia Karpinska2014-01-021-1/+9
|/ | | | | | | | | | Check is added to linear_flow and unordered_flow patterns that there are no two child items provide same values. Unit tests added. Change-Id: I7a293d58a962de37ba2fd1dd989bf0a218417430 Closes-Bug: #1264995
* Remove uuid from taskflow.flow.FlowIvan A. Melnikov2013-10-151-2/+2
| | | | | | | In a way our resumption works it may not correspond uuid from flow details, and so it is hardly useful. Change-Id: I090d017e2f0f8475594af94a2430a34e6ed1ce70
* Pattern comment additions/adjustmentsJoshua Harlow2013-10-121-1/+2
| | | | Change-Id: I3154d1c228474d8699f3ae4d0be2fb46406a2f41
* Task decorator was removed and examples updatedAnastasia Karpinska2013-09-231-2/+0
| | | | Change-Id: Ie49fe6c2f48a18130d1fd2a3aa5485cd8cee4ed4
* Verify provides and requiresIvan A. Melnikov2013-09-181-14/+34
| | | | | | | | | | | | | | When flow is being constructed we ensure that it is actually valid by checking its invariants: - for linear flow, no item should depend on items that are executed after it; - for unordered flow, items should be independent. We also add check that all necessary provides were injected to storage before actually running flow. Implements: blueprint flow-verification Change-Id: I499898f543505b7dd6f82716ae8f4011cb08f601
* Add provides and requires properties to FlowAnastasia Karpinska2013-09-111-0/+14
| | | | | | | | | | | Provides and requires properties are used to browse all required and provided values for the whole Flow. The same properties were added to the Task. Appropriate Task properties were renamed to rebind and save_as. Change-Id: I02eb02303a9701a13f1a54f06f20bbf9aebd1d04
* Engine, task, linear_flow unificationJoshua Harlow2013-09-051-0/+55
In order to move away from the existing flows having their own implementation of running, start moving the existing flows to be patterns that only structure tasks (and impose constraints about how the group of tasks can run) in useful ways. Let the concept of running those patterns be handled by an engine instead of being handled by the flow itself. This will allow for varying engines to be able to run flows in whichever way the engine chooses (as long as the constraints set up by the flow are observed). Currently threaded flow and graph flow are broken by this commit, since they have not been converted to being a structure of tasks + constraints. The existing engine has not yet been modified to run those structures either, work is underway to remediate this. Part of: blueprint patterns-and-engines Followup bugs that must be addressed: Bug: 1221448 Bug: 1221505 Change-Id: I3a8b96179f336d1defe269728ebae0caa3d832d7