Skip to content

Commit

Permalink
Run run_scm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Feb 28, 2021
1 parent 57c1a23 commit 15f9282
Show file tree
Hide file tree
Showing 18 changed files with 797 additions and 268 deletions.
6 changes: 3 additions & 3 deletions docs/src/auto_examples/howtos/run_doc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\nHow to Author Gensim Documentation\n==================================\n\nHow to author documentation for Gensim.\n\n"
"\nHow to Author Gensim Documentation\n==================================\n\nHow to author documentation for Gensim.\n"
]
},
{
Expand Down Expand Up @@ -54,7 +54,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Authoring Workflow\n------------------\n\nThere are several ways to author documentation.\nThe simplest and most straightforward is to author your ``script.py`` from scratch.\nYou'll have the following cycle:\n\n1. Make changes\n2. Run ``python script.py``\n3. Check standard output, standard error and return code\n4. If everything works well, stop.\n5. Otherwise, go back to step 1).\n\nIf the above is not your cup of tea, you can also author your documentation as a Jupyter notebook.\nThis is a more flexible approach that enables you to tweak parts of the documentation and re-run them as necessary.\n\nOnce you're happy with the notebook, convert it to a script.py.\nThere's a helpful `script <https://github.com/mpenkov/gensim/blob/numfocus/docs/src/tools/to_python.py>`__ that will do it for you.\nTo use it::\n\n python to_python.py < notebook.ipynb > script.py\n\nYou may have to touch up the resulting ``script.py``.\nMore specifically:\n\n- Update the title\n- Update the description\n- Fix any issues that the markdown-to-RST converter could not deal with\n\nOnce your script.py works, put it in a suitable subdirectory.\nPlease don't include your original Jupyter notebook in the repository - we won't be using it.\n\n"
"Authoring Workflow\n------------------\n\nThere are several ways to author documentation.\nThe simplest and most straightforward is to author your ``script.py`` from scratch.\nYou'll have the following cycle:\n\n1. Make changes\n2. Run ``python script.py``\n3. Check standard output, standard error and return code\n4. If everything works well, stop.\n5. Otherwise, go back to step 1).\n\nIf the above is not your cup of tea, you can also author your documentation as a Jupyter notebook.\nThis is a more flexible approach that enables you to tweak parts of the documentation and re-run them as necessary.\n\nOnce you're happy with the notebook, convert it to a script.py.\nThere's a helpful `script <https://github.com/RaRe-Technologies/gensim/blob/develop/docs/src/tools/to_python.py>`__ that will do it for you.\nTo use it::\n\n python to_python.py < notebook.ipynb > script.py\n\nYou may have to touch up the resulting ``script.py``.\nMore specifically:\n\n- Update the title\n- Update the description\n- Fix any issues that the markdown-to-RST converter could not deal with\n\nOnce your script.py works, put it in a suitable subdirectory.\nPlease don't include your original Jupyter notebook in the repository - we won't be using it.\n\n"
]
},
{
Expand All @@ -81,7 +81,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/auto_examples/howtos/run_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
# This is a more flexible approach that enables you to tweak parts of the documentation and re-run them as necessary.
#
# Once you're happy with the notebook, convert it to a script.py.
# There's a helpful `script <https://github.com/mpenkov/gensim/blob/numfocus/docs/src/tools/to_python.py>`__ that will do it for you.
# There's a helpful `script <https://github.com/RaRe-Technologies/gensim/blob/develop/docs/src/tools/to_python.py>`__ that will do it for you.
# To use it::
#
# python to_python.py < notebook.ipynb > script.py
Expand Down
2 changes: 1 addition & 1 deletion docs/src/auto_examples/howtos/run_doc.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b3db0b66859316de13e1a36fa6181657
512a76ce743dd12482d21784a76b60fe
31 changes: 10 additions & 21 deletions docs/src/auto_examples/howtos/run_doc.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.. only:: html

.. note::
:class: sphx-glr-download-link-note
.. note::
:class: sphx-glr-download-link-note

Click :ref:`here <sphx_glr_download_auto_examples_howtos_run_doc.py>` to download the full example code
.. rst-class:: sphx-glr-example-title
Click :ref:`here <sphx_glr_download_auto_examples_howtos_run_doc.py>` to download the full example code
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_howtos_run_doc.py:
.. _sphx_glr_auto_examples_howtos_run_doc.py:


How to Author Gensim Documentation
Expand Down Expand Up @@ -80,15 +78,6 @@ At the very top, you need a docstring describing what your script does.
.. rst-class:: sphx-glr-script-out

Out:

.. code-block:: none
'\nTitle\n=====\n\nBrief description.\n'
The title is what will show up in the gallery.
Expand Down Expand Up @@ -135,7 +124,7 @@ If the above is not your cup of tea, you can also author your documentation as a
This is a more flexible approach that enables you to tweak parts of the documentation and re-run them as necessary.

Once you're happy with the notebook, convert it to a script.py.
There's a helpful `script <https://github.com/mpenkov/gensim/blob/numfocus/docs/src/tools/to_python.py>`__ that will do it for you.
There's a helpful `script <https://github.com/RaRe-Technologies/gensim/blob/develop/docs/src/tools/to_python.py>`__ that will do it for you.
To use it::

python to_python.py < notebook.ipynb > script.py
Expand Down Expand Up @@ -207,9 +196,9 @@ At that stage, give yourself a pat on the back: you're done!

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.112 seconds)
**Total running time of the script:** ( 0 minutes 1.226 seconds)

**Estimated memory usage:** 6 MB
**Estimated memory usage:** 9 MB


.. _sphx_glr_download_auto_examples_howtos_run_doc.py:
Expand All @@ -222,13 +211,13 @@ At that stage, give yourself a pat on the back: you're done!
.. container:: sphx-glr-download sphx-glr-download-python
.. container:: sphx-glr-download
:download:`Download Python source code: run_doc.py <run_doc.py>`
.. container:: sphx-glr-download sphx-glr-download-jupyter
.. container:: sphx-glr-download
:download:`Download Jupyter notebook: run_doc.ipynb <run_doc.ipynb>`
Expand Down
15 changes: 5 additions & 10 deletions docs/src/auto_examples/howtos/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

Computation times
=================
**52:12.903** total execution time for **auto_examples_howtos** files:
**00:01.226** total execution time for **auto_examples_howtos** files:

+----------------------------------------------------------------------------------------+-----------+-----------+
| :ref:`sphx_glr_auto_examples_howtos_run_doc2vec_imdb.py` (``run_doc2vec_imdb.py``) | 52:12.903 | 3494.0 MB |
+----------------------------------------------------------------------------------------+-----------+-----------+
| :ref:`sphx_glr_auto_examples_howtos_run_compare_lda.py` (``run_compare_lda.py``) | 00:00.000 | 0.0 MB |
+----------------------------------------------------------------------------------------+-----------+-----------+
| :ref:`sphx_glr_auto_examples_howtos_run_doc.py` (``run_doc.py``) | 00:00.000 | 0.0 MB |
+----------------------------------------------------------------------------------------+-----------+-----------+
| :ref:`sphx_glr_auto_examples_howtos_run_downloader_api.py` (``run_downloader_api.py``) | 00:00.000 | 0.0 MB |
+----------------------------------------------------------------------------------------+-----------+-----------+
- **00:01.226**: :ref:`sphx_glr_auto_examples_howtos_run_doc.py` (``run_doc.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_howtos_run_compare_lda.py` (``run_compare_lda.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_howtos_run_doc2vec_imdb.py` (``run_doc2vec_imdb.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_howtos_run_downloader_api.py` (``run_downloader_api.py``)
Loading

0 comments on commit 15f9282

Please sign in to comment.