Skip to content

Commit

Permalink
examples: remove unrendering code
Browse files Browse the repository at this point in the history
Problem: Some code at the bottom of the job submit
example is not rendering properly.

The code snippet is unnecessary, so remove it.

Fixes flux-framework#207
  • Loading branch information
Al Chu11 committed Feb 16, 2023
1 parent 438c84f commit bea61e3
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 75 deletions.
Binary file modified auto_examples/auto_examples_jupyter.zip
Binary file not shown.
Binary file modified auto_examples/auto_examples_python.zip
Binary file not shown.
18 changes: 0 additions & 18 deletions auto_examples/example_job_submit_api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,6 @@
"source": [
"print(flux.job.submit(handle, jobspec))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is expected to be rendered from docs root\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\nhere = os.path.dirname(os.path.abspath(os.getcwd()))\n\n# This is here for the nice thumbnail :)\nimage = plt.imread(os.path.join(here, \"images\", \"logo.png\"))\nfig = plt.imshow(image)\nplt.axis(\"off\")\nplt.show()"
]
}
],
"metadata": {
Expand Down
11 changes: 0 additions & 11 deletions auto_examples/example_job_submit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,3 @@
# This could have easily been a script, e.g., ./compute.py 120
# You can continue submitting jobs to your same handle, even the same job.
print(flux.job.submit(handle, jobspec))

#%%
# This is expected to be rendered from docs root
import matplotlib.pyplot as plt
here = os.path.dirname(os.path.abspath(os.getcwd()))

# This is here for the nice thumbnail :)
image = plt.imread(os.path.join(here, "images", "logo.png"))
fig = plt.imshow(image)
plt.axis("off")
plt.show()
2 changes: 1 addition & 1 deletion auto_examples/example_job_submit_api.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a694dd5d8adac2dbfa1407e47b12486b
42d8779e36830e8a9638cc47f8657259
36 changes: 4 additions & 32 deletions auto_examples/example_job_submit_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Let's submit the job! We will get the job id.

.. code-block:: none
ƒtGzAJj
ƒ2a3ptoH
Expand All @@ -145,7 +145,7 @@ Let's submit the job! We will get the job id.
This could have easily been a script, e.g., ./compute.py 120
You can continue submitting jobs to your same handle, even the same job.

.. GENERATED FROM PYTHON SOURCE LINES 46-48
.. GENERATED FROM PYTHON SOURCE LINES 46-47
.. code-block:: default
Expand All @@ -154,47 +154,19 @@ You can continue submitting jobs to your same handle, even the same job.
.. rst-class:: sphx-glr-script-out

.. code-block:: none
ƒtv3rMM
.. GENERATED FROM PYTHON SOURCE LINES 49-50
This is expected to be rendered from docs root

.. GENERATED FROM PYTHON SOURCE LINES 50-57
.. code-block:: default
import matplotlib.pyplot as plt
here = os.path.dirname(os.path.abspath(os.getcwd()))
# This is here for the nice thumbnail :)
image = plt.imread(os.path.join(here, "images", "logo.png"))
fig = plt.imshow(image)
plt.axis("off")
plt.show()
.. image-sg:: /auto_examples/images/sphx_glr_example_job_submit_api_001.png
:alt: example job submit api
:srcset: /auto_examples/images/sphx_glr_example_job_submit_api_001.png
:class: sphx-glr-single-img

ƒ2afQbZZ
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.770 seconds)
**Total running time of the script:** ( 0 minutes 0.137 seconds)


.. _sphx_glr_download_auto_examples_example_job_submit_api.py:
Expand Down
Binary file modified auto_examples/example_job_submit_api_codeobj.pickle
Binary file not shown.
4 changes: 2 additions & 2 deletions auto_examples/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

Computation times
=================
**00:00.770** total execution time for **auto_examples** files:
**00:00.137** total execution time for **auto_examples** files:

+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_example_job_submit_api.py` (``example_job_submit_api.py``) | 00:00.770 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_example_job_submit_api.py` (``example_job_submit_api.py``) | 00:00.137 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
11 changes: 0 additions & 11 deletions examples/example_job_submit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,3 @@
# This could have easily been a script, e.g., ./compute.py 120
# You can continue submitting jobs to your same handle, even the same job.
print(flux.job.submit(handle, jobspec))

#%%
# This is expected to be rendered from docs root
import matplotlib.pyplot as plt
here = os.path.dirname(os.path.abspath(os.getcwd()))

# This is here for the nice thumbnail :)
image = plt.imread(os.path.join(here, "images", "logo.png"))
fig = plt.imshow(image)
plt.axis("off")
plt.show()

0 comments on commit bea61e3

Please sign in to comment.