Skip to content

Commit

Permalink
[CIVIS-5495] ENH keep track of and expose exceptions (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonlee-civis authored Mar 2, 2023
1 parent 02b8015 commit 6023b84
Show file tree
Hide file tree
Showing 30 changed files with 347 additions and 13,155 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Security


## [1.1.0] - 2023-03-02

### Added
- Keep track of and expose exceptions. (#6)

## [1.0.0] - 2023-01-05

First release!
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 4bfd3cf6192c12404221f739af79d3ef
config: 74646dc92bb4ca6dc0e7482b5aaed7ae
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 2 additions & 0 deletions docs/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ API Reference

.. autoclass:: async_graph_data_flow.AsyncGraph
:members:
:special-members: __init__

.. autoclass:: async_graph_data_flow.AsyncExecutor
:members:
:special-members: __init__

.. autoclass:: async_graph_data_flow.graph.InvalidAsyncGraphError
17 changes: 17 additions & 0 deletions docs/_sources/more_examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ set ``max_tasks`` at :func:`~async_graph_data_flow.AsyncGraph.add_node`.
:language: python
:emphasize-lines: 25

.. _Halting Graph Execution upon Exceptions:

Halting Graph Execution upon Exceptions
---------------------------------------

Expand All @@ -80,6 +82,21 @@ This behavior can be altered in two different ways:
:language: python
:emphasize-lines: 36

Accessing and Raising an Exception
----------------------------------

While it's possible to halt the graph execution due to unhandled exceptions
(see `Halting Graph Execution upon Exceptions`_),
these exceptions are not raised from within the :func:`~async_graph_data_flow.AsyncExecutor.execute` call.
Instead, :class:`~async_graph_data_flow.AsyncExecutor`'s :attr:`~async_graph_data_flow.AsyncExecutor.exceptions`
allows access to the exceptions from the nodes,
and you can determine what to do with this information
(e.g., raise an exception on your own).

.. literalinclude:: ../../examples/raising_an_exception.py
:language: python
:emphasize-lines: 24-27

Incorporating a Synchronous Function
------------------------------------

Expand Down
134 changes: 0 additions & 134 deletions docs/_static/_sphinx_javascript_frameworks_compat.js

This file was deleted.

5 changes: 4 additions & 1 deletion docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -324,13 +324,15 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}

nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

nav.contents,
aside.topic,
div.topic {
Expand Down Expand Up @@ -606,6 +608,7 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}

aside.footnote > span,
div.citation > span {
float: left;
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
Loading

0 comments on commit 6023b84

Please sign in to comment.