-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move examples into documentation (#355)
* Move examples into the documentation, and add screenshots and brief descriptions * Remove examples directory * Update ci for new examples location * Remove more references to the removed 'examples' directory * Move the quick_start example code to the same place as the rest of the examples * Fix import order
- Loading branch information
1 parent
7165120
commit 55be7ca
Showing
15 changed files
with
68 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ include MANIFEST.in | |
include README.rst | ||
include DEVELOP.rst | ||
graft docs | ||
graft examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.. | ||
(C) Copyright 2018-2021 Enthought, Inc., Austin, TX | ||
All rights reserved. | ||
This software is provided without warranty under the terms of the BSD | ||
license included in LICENSE.txt and may be redistributed only under | ||
the conditions described in the aforementioned license. The license | ||
is also available online at http://www.enthought.com/licenses/BSD.txt | ||
|
||
Thanks for using Enthought open source! | ||
|
||
Complete examples | ||
================= | ||
|
||
This section describes three complete examples, that make use of the | ||
three different background task types that Traits Futures currently supports. | ||
|
||
Slow squares | ||
------------ | ||
|
||
.. image:: images/slow_squares.png | ||
:alt: Screenshot of the slow squares GUI in action | ||
|
||
This :download:`example script <examples/slow_squares.py>` demonstrates a | ||
simple TraitsUI application that allows several background calculations to be | ||
running simultaneously, and displays the state of all previously submitted | ||
calculations in a table. Each "calculation" is a squaring operation; the | ||
calculation may fail randomly, with an increased chance of failure for larger | ||
inputs. | ||
|
||
.. literalinclude:: examples/slow_squares.py | ||
|
||
Prime counting | ||
-------------- | ||
|
||
.. image:: images/prime_counting.png | ||
:alt: Screenshot of the prime counting GUI in action | ||
|
||
This :download:`example script <examples/prime_counting.py>` demonstrates the | ||
:class:`~.ProgressFuture`, which reports progress information back to the | ||
GUI as the background computation progresses. | ||
|
||
.. literalinclude:: examples/prime_counting.py | ||
|
||
Approximating Pi | ||
---------------- | ||
|
||
.. image:: images/pi_iterations.png | ||
:alt: Screenshot of the π approximation GUI in action | ||
|
||
The final :download:`example <examples/pi_iterations.py>` uses the Chaco 2d | ||
plotting library and shows the use of the :class:`~.IterationFuture`. | ||
Successive approximations to π are computed and plotted, with the plot | ||
updated live with each new value reported by the background task. | ||
|
||
.. literalinclude:: examples/pi_iterations.py |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters