Skip to content

Commit 9af75f2

Browse files
authored
Add note about parallelization to quick start guide (#280)
1 parent b528db5 commit 9af75f2

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090

9191
# -- copybutton config -------------------------------------------------------
92-
copybutton_prompt_text = r'>>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: '
92+
copybutton_prompt_text = r'>>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: |>'
9393
copybutton_prompt_is_regexp = True
9494

9595

docs/quickstart.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,40 @@ Here is the resulting animation:
6767

6868
----
6969

70+
The CLI generates animations for the Cartesian product of the datasets and shapes
71+
provided. For example, if you wanted to morph both the music and soccer datasets
72+
into both the heart and diamond shapes (i.e., four animations), you could run
73+
the command below:
74+
75+
.. code:: console
76+
77+
$ data-morph --start-shape music soccer --target-shape heart diamond
78+
79+
.. tip::
80+
81+
When doing generating multiple animations, it is recommended that you also specify
82+
the number of jobs you want to run in parallel (limited by the number of CPU cores
83+
on your machine). If you pass ``0``, Data Morph will run as many as possible:
84+
85+
.. code:: console
86+
87+
$ data-morph --start-shape music soccer --target-shape heart diamond --workers 0
88+
89+
If you have the GNU ``parallel`` command on your machine, you can use it to run
90+
a slightly faster parallelized Data Morph (since it incurs less Python overhead),
91+
in which case you don't need to provide the worker count:
92+
93+
.. code:: console
94+
95+
$ parallel --progress -j0 \
96+
> data-morph --start-shape {1} --target-shape {2} \
97+
> ::: music soccer ::: heart diamond
98+
99+
Check out the `GNU parallel documentation <https://www.gnu.org/software/parallel/sphinx.html>`_
100+
for more options.
101+
102+
----
103+
70104
See all available CLI options by passing in ``--help`` or consulting the :doc:`cli`:
71105

72106
.. code:: console

0 commit comments

Comments
 (0)