summaryrefslogtreecommitdiff
path: root/src/mailman/app/workflow.py
Commit message (Collapse)AuthorAgeFilesLines
* Create mailman.workflows package. Move base Workflow there.J08nY2017-08-071-151/+0
| | | | | - Also introduce IWorkflow, ISubscriptionWorkflow, IUnsubscriptionWorkflow.
* Convert to click for CLI optionsBarry Warsaw2017-07-221-1/+1
|
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Workflow: support dependencies between attributesAurélien Bompard2016-11-211-2/+6
| | | | | | Restore the attributes in the order they are declared in `SAVE_ATTRIBUTES` to allow for dependencies between attributes (required by the `SubscriptionWorkflow`).
* 99% test coverage.Barry Warsaw2016-10-211-1/+1
| | | | | | | | | Also: * Ignore coverage in the testing submodule. * Remove some unreachable code. * Spelling. * Fix a bug in run_thru().
* Simplify the implementation.Barry Warsaw2016-10-171-6/+2
| | | | | | | | | | | | | | | | | | | | | | This merges the SubscriptionManager and UnsubscriptionManager into a single SubscriptionManager implementation that handles both register() and unregister(). This allows us to use direct class-based adaptation instead of the more clunky getAdapter() API. We can also eliminate the funky _get_workflow() implementation detail. This has a couple of side-effects. .confirm() must lookup the token in the pendings database and pull out the pending type, dispatching to the proper class depending on the type, or raising a LookupError if the token is None or there is no pendable associated with the given token. This feels like an acceptable trade-off. However, this *also* means that IWorkflowStateManager must lose its 'name' argument in its methods. That's because we won't actually know the name until its too late. Honestly, the name wasn't providing much value anyway (it was always the subclass's name), so losing that seems fine too. The complication here is that the name was a primary key in the 'workflowstate' table, so we need to add its removal in the database migration.
* First massive round of cleanups.Barry Warsaw2016-03-231-6/+2
| | | | | | | | * Get rid of explicit __all__ settings and use the @public decorator. * Get rid of ^L's * Use expected_count argument for get_queue_messages() * Various code modernizations. * Other minor changes to make flake8 happy.
* Boost coverage and remove dead code.Barry Warsaw2016-01-251-4/+3
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Checkpointing.Barry Warsaw2015-04-141-7/+9
|
* The SubscriptionWorkflow class doesn't need to include the expiry date in itsBarry Warsaw2015-04-131-0/+4
| | | | | | | | | pendable data since that gets added automatically by the IPendings utility. After the user is subscribed, clean up the saved workflows and reset the token to None. Give the SubscriptionWorkflow a name property for convenience.
* Subscription workflow checkpointing.Barry Warsaw2015-04-091-0/+6
| | | | | | | | | | * TO DO: - hook up sending of confirmation - processing confirmations and continuing workflow - get tokens for saving workflows - integrate with RequestRecord - integrate with hold_subscription - after getting moderator approval, continue workflow
* Add run_thru() and run_until() to workflow, mostly for testing purposes.Barry Warsaw2015-04-071-0/+42
|
* Check pointingBarry Warsaw2015-04-061-4/+4
|
* Fix some typos.Barry Warsaw2015-03-301-1/+1
|
* * Refactor test_workflow into a separate module.Barry Warsaw2015-03-291-17/+28
| | | | | | | | | * save_state() -> save() * restore_state() -> restore() * Add push() as the public API for pushing new state on the deque. * Uppercase class attributes. * Add logging on exception. * Minor style fixes.
* Refactorings and tests.Barry Warsaw2015-03-291-0/+91
* Move the basic Workflow class to a module in mailman.app. * Rename the interface and model modules. * Update the configure.zcml. * Minor style fixes. * Add a test for the workflow model.