Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing SDEC docs page #1817

Merged
merged 6 commits into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/development/documentation_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@ Building documentation locally

To build TARDIS documentation locally, use the following commands:

.. code ::
.. code::

cd docs
make html

.. note ::
.. note::

- If you're working on a fresh local copy of the TARDIS repository, you might need to do ``python setup.py develop`` before executing these commands.
- Use ``DISABLE_NBSPHINX=1 make html`` to disable notebook rendering (fast mode).

After running this command, you can find the built docs (i.e. HTML webpages) in ``docs/_build``. Open the ``index.html`` in your browser to see how the documentation looks like with your edits. Navigate to page where you made changes or file that you added to check whether it looks as intended or not.
After running this command, you can find the built docs (i.e. HTML webpages) in ``docs/_build/html``. Open the ``index.html`` in your browser to see how the documentation looks like with your edits. Navigate to page where you made changes or file that you added to check whether it looks as intended or not.


Sharing the built documentation in your PR
==========================================

When you make edits in TARDIS documentation and submit a PR, we can only see the changes in source files in GitHub files diff, but not the built documentation (webpages). This is usually fine unless you have made changes in the way documentation pages are structured or anything that affects lot of files. In such cases, you should share the preview of documentation with your changes by building it online. The steps to do this are described :ref:`here <doc-preview>`. This will help us (the reviewers of your PR) to check how the documentation will look once your PR is merged.

.. note::

On GitHub, built documentation files (including ``.ipynb`` files built by Sphinx) can be a maximum of 100 MB. You can check the file sizes after a documentation build in ``docs/_build/html``. Note that image output in notebooks built by Sphinx are by default in SVG format. For detailed images, these images can be very large. If file size becomes a problem, you will need to change the image format for that notebook (see `here <https://docs.gcp.databricks.com/notebooks/visualizations/matplotlib.html>`_).
12 changes: 8 additions & 4 deletions docs/io/visualization/sdec_plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"source": [
"# We filter out warnings throughout this notebook\n",
"import warnings\n",
"warnings.filterwarnings('ignore');"
"warnings.filterwarnings('ignore');\n",
"\n",
"# Due to the large size of the SDEC plots in SVG format, we request output as a\n",
"# high-resolution PNG\n",
"%config InlineBackend.figure_format='png2x'"
]
},
{
Expand Down Expand Up @@ -426,7 +430,7 @@
},
"outputs": [],
"source": [
"#plotter.generate_plot_ply()"
"plotter.generate_plot_ply()"
]
},
{
Expand All @@ -447,7 +451,7 @@
},
"outputs": [],
"source": [
"#plotter.generate_plot_ply(packets_mode=\"real\")"
"plotter.generate_plot_ply(packets_mode=\"real\")"
]
},
{
Expand Down Expand Up @@ -561,7 +565,7 @@
"outputs": [],
"source": [
"# Interactive plot with virtual packets mode\n",
"#hdf_plotter.generate_plot_ply()"
"hdf_plotter.generate_plot_ply()"
]
}
],
Expand Down