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

Reorganizing docs for website release #1835

Merged
merged 8 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MANIFEST
# Sphinx
docs/api
docs/_build
docs/ZENODO.rst
docs/resources/ZENODO.rst
docs/tutorials.rst
docs/io/configuration/components/models/converters/density_parse.csv
docs/io/configuration/components/models/converters/abund_parse.csv
Expand Down
1 change: 0 additions & 1 deletion docs/CHANGELOG.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/CODE_OF_CONDUCT.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/CONTRIBUTING.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
exclude_patterns.append("_templates")
exclude_patterns.append("_build")
exclude_patterns.append("**.ipynb_checkpoints")
exclude_patterns.append("research/research_done_using_TARDIS/ads.ipynb")
exclude_patterns.append("resources/research_done_using_TARDIS/ads.ipynb")

# This is added to the end of RST files - a good place to put substitutions to
# be used globally.
Expand Down Expand Up @@ -345,7 +345,7 @@ def generate_ZENODO(app):
"""Creating ZENODO.rst
Adapted from: https://astrodata.nyc/posts/2021-04-23-zenodo-sphinx/"""
CONCEPT_DOI = "592480" # See: https://help.zenodo.org/#versioning
zenodo_path = pathlib.Path("ZENODO.rst")
zenodo_path = pathlib.Path("resources/ZENODO.rst")

try:
headers = {"accept": "application/x-bibtex"}
Expand Down
1 change: 1 addition & 0 deletions docs/contributing/CHANGELOG.md
1 change: 1 addition & 0 deletions docs/contributing/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ When making or adding changes to the functionality of an aspect of TARDIS, an ``
RST Documentation
-----------------

Documentation not featuring interactive code examples is written in Sphinx's reStructuredText (see `here <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_). Files written in reStructuredText have a ``.rst`` file extension, and are then built as HTML filed by Sphinx during the documentation build. Only the RST file, not the built HTML file, are committed to the repository. Documentation should be clear and concise. See :doc:`../io/visualization/using_widgets` as a good example of an RST-generated page.
Documentation not featuring interactive code examples is written in Sphinx's reStructuredText (see `here <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_). Files written in reStructuredText have a ``.rst`` file extension, and are then built as HTML filed by Sphinx during the documentation build. Only the RST file, not the built HTML file, are committed to the repository. Documentation should be clear and concise. See :doc:`../../io/visualization/using_widgets` as a good example of an RST-generated page.


IPYNB Documentation
-------------------

Often, code examples can help explain concepts better. The TARDIS utilizes `Jupyter notebooks <https://jupyter.org/>`_ (``.ipynb`` file extension) to demonstrate features of the code package within our documentation. See :doc:`../quickstart/quickstart` or :doc:`../physics/montecarlo/initialization` for good examples.
Often, code examples can help explain concepts better. The TARDIS utilizes `Jupyter notebooks <https://jupyter.org/>`_ (``.ipynb`` file extension) to demonstrate features of the code package within our documentation. See :doc:`../../quickstart` or :doc:`../../physics/montecarlo/initialization` for good examples.

TARDIS uses the `nbsphinx <https://nbsphinx.readthedocs.io/>`_ extension to turn these notebooks into HTML pages in the documentation. During a documentation build, nbsphinx runs all notebooks in the documentation with cleared output and places their output in the HTML. **Thus, notebook output must always be cleared before it is submitted** to ensure that the notebooks are run by nbsphinx. Running these notebooks during the documentation build helps ensure that the documentation is kept up-to-date, as notebook output will reflect the current state of the TARDIS code. Additionally, if updates in the code are inconsistent with the documentation, the documentation build will return an error, alerting TARDIS developers to the inconsistency.

An added benefit of IPYNB documentation is the ability to have interactive tutorials. All notebooks in the TARDIS documentation feature a button at the top encouraging users to launch the interactive version of the notebook (see the previously mentioned examples). This directs users to the TARDIS repository on `Binder <https://mybinder.org/>`_, where the notebook can be run using an online Jupyter kernel. Additionally, all notebooks in the Input/Output section of the documentation are automatically linked to on the :doc:`../tutorials` page.
An added benefit of IPYNB documentation is the ability to have interactive tutorials. All notebooks in the TARDIS documentation feature a button at the top encouraging users to launch the interactive version of the notebook (see the previously mentioned examples). This directs users to the TARDIS repository on `Binder <https://mybinder.org/>`_, where the notebook can be run using an online Jupyter kernel. Additionally, all notebooks in the Input/Output section of the documentation are automatically linked to on the :doc:`../../tutorials` page.


Including Your Page in the TARDIS Documentation
Expand All @@ -37,8 +37,8 @@ Including Your Page in the TARDIS Documentation
Whether your page is written in reStructuredText or as a Jupyter notebook, it must be included in the TARDIS documentation. This has three steps:

1. Determine the appropriate location for the page within the documentation. Feel free to reach out to someone in the TARDIS collaboration for help with this step.
2. Place your file in the corresponding directory in the ``docs/`` directory of the repository. For example, the :doc:`../io/visualization/using_widgets` is a subpage of "Visualization Tools and Widgets" under the Input/Output section of the documentation, so it is placed in ``docs/io/visualization/``.
3. Include your file in the/a `toctree <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree>`_ of the corresponding ``index.rst``. For example, :doc:`../io/visualization/using_widgets` was included in a toctree of ``docs/io/visualization/index.rst``.
2. Place your file in the corresponding directory in the ``docs/`` directory of the repository. For example, the :doc:`../../io/visualization/using_widgets` is a subpage of "Visualization Tools and Widgets" under the Input/Output section of the documentation, so it is placed in ``docs/io/visualization/``.
3. Include your file in the/a `toctree <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree>`_ of the corresponding ``index.rst``. For example, :doc:`../../io/visualization/using_widgets` was included in a toctree of ``docs/io/visualization/index.rst``.

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Preparation and Working with Git
================================

In this document, we refer to the TARDIS ``master`` branch as the *trunk*. The first step is to setup up a python environment. We recommend using
Anaconda for this purpose; refer to our :doc:`Installation guide <../installation>` which covers this topic.
Anaconda for this purpose; refer to our :doc:`Installation guide <../../installation>` which covers this topic.

.. _forking:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/contributing/development/profiling/tardis_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you think your could be dealing with scenario B, then:
.. note::

- If you don't have enough privileges to run the pipelines, tag a TARDIS developer capable of doing so.
- If any of these two pipelines fail, please tag the :ref:`CI/CD responsible <team>`.
- If any of these two pipelines fail, please tag a TARDIS team member responsible for CI/CD.

If everything went well, the reference data will have been updated by the TARDIS bot and the commit
message should include the pull request number that triggered the update.
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion docs/development/profiling/tardis_example.yml

This file was deleted.

Binary file removed docs/graphics/esa.png
Binary file not shown.
Binary file removed docs/graphics/github.png
Binary file not shown.
Binary file removed docs/graphics/google.png
Binary file not shown.
Binary file removed docs/graphics/numfocus.png
Binary file not shown.
48 changes: 20 additions & 28 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@
TARDIS Core Package Documentation
##################################

|

.. raw:: html

<p style="text-align:center"><a href="http://tardis-sn.github.io/"><span style="font-size:36px">Click here for the TARDIS collaboration website</span></a></p>

|

isaacgsmith marked this conversation as resolved.
Show resolved Hide resolved
.. image:: graphics/tardis_banner.svg

|

TARDIS is an open-source Monte Carlo radiative-transfer spectral synthesis code
for 1D models of supernova ejecta. It is designed for rapid spectral modelling
of supernovae. It is developed and maintained by a :ref:`multi-disciplinary team <team>`
of supernovae. It is developed and maintained by a multi-disciplinary team
isaacgsmith marked this conversation as resolved.
Show resolved Hide resolved
including software engineers, computer scientists, statisticians,
and astrophysicists.

Expand Down Expand Up @@ -49,7 +57,7 @@ Mission Statement
:hidden:

installation
quickstart/quickstart
quickstart
tutorials
API <api/modules>

Expand All @@ -76,41 +84,25 @@ Mission Statement
physics/spectrum/index


.. toctree::
:maxdepth: 2
:caption: Research with TARDIS
:hidden:

Overview <research/index>


.. toctree::
:maxdepth: 2
:caption: Team & Credits
:hidden:

team_and_governance/index
credits
Code of Conduct <CODE_OF_CONDUCT.md>
sponsors


.. toctree::
:maxdepth: 2
:caption: Contributing to TARDIS
:hidden:

CONTRIBUTING.md
development/index
CHANGELOG.md
roadmap
contributing/CONTRIBUTING.md
contributing/development/index
contributing/CHANGELOG.md
contributing/roadmap


.. toctree::
:caption: References
:caption: Other Resources
:hidden:

zreferences

resources/credits
resources/research_done_using_TARDIS/research_papers
resources/code_comparison/index
resources/zreferences


.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/io/configuration/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TARDIS Example Configuration
The simple and fast TARDIS setup is provided by ``tardis_example.yml`` which
may be obtained `here
<https://raw.githubusercontent.com/tardis-sn/tardis/master/docs/tardis_example.yml>`_. We suggest every new user of TARDIS to run this
setup first, which can be done using the :doc:`quickstart guide <../../quickstart/quickstart>`.
setup first, which can be done using the :doc:`quickstart guide <../../quickstart>`.

It calculates a spectrum for a Type Ia supernova model 13 days after explosion,
requesting a total output luminosity of
Expand Down
Loading