Skip to content

Commit

Permalink
large cleanup operation
Browse files Browse the repository at this point in the history
working apidoc
  • Loading branch information
wkerzendorf committed Jul 22, 2019
1 parent 6d35962 commit 0149d89
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 45 deletions.
11 changes: 9 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.graphviz',
'sphinx.ext.viewcode',
'numpydoc',
'nbsphinx',
'sphinx.ext.autodoc',
'sphinx-jsonschema',
'recommonmark'
'recommonmark',
'sphinxcontrib.apidoc'
]

source_suffix = {
Expand Down Expand Up @@ -105,6 +106,12 @@
release = tardis.__version__


# -- APIDoc configuration -----------------------------------------------------
apidoc_module_dir = '../tardis'
apidoc_output_dir = 'api'
apidoc_excluded_paths = ['*tests*', '*setup_package*']
apidoc_separate_modules = True

# -- Options for HTML output ---------------------------------------------------

# A NOTE ON HTML THEMES
Expand Down
2 changes: 1 addition & 1 deletion docs/development/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ or generate new ones.

Both of of these require a configuration file for the integration tests:

.. literalinclude:: yml_files/integration.yml
.. literalinclude:: integration.yml
:language: yaml

Inside the atomic data directory there needs to be atomic data for each of
Expand Down
17 changes: 10 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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>`
including software engineers, computer scientists, statisticians,
and astrophysicists .
and astrophysicists. `--- dsfjsdlkfjsdlf`

If you use this code for any publications or presentations please follow our
citation guidelines in :ref:`tardiscredits`
Expand All @@ -42,17 +42,12 @@ assistance.


.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Using TARDIS
:hidden:


running/index
running/configuration/configuration
atomic/atomic_data
models/index
examples/index
scripts/index


.. toctree::
Expand Down Expand Up @@ -90,6 +85,14 @@ assistance.
development/index
CHANGELOG.md

.. toctree::
:maxdepth: 2
:caption: API
:hidden:

api/modules



.. toctree::
:caption: References
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/physics/montecarlo/lineinteraction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ shows the situation in the resonant scatter mode, the middle one for the
downbranching scheme and the right one the macro atom results.

.. image::
../graphics/scatter_downbranch_ma.png
images/scatter_downbranch_ma.png
:width: 700
4 changes: 2 additions & 2 deletions docs/physics/montecarlo/propagation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ following sketch (taken from :cite:`Noebauer2014`):


.. image::
../graphics/spherical_symmetry.png
images/spherical_symmetry.png
:width: 400


Expand Down Expand Up @@ -182,7 +182,7 @@ the sketch below (taken from :cite:`Noebauer2014`, adapted from
:cite:`Mazzali1993`):

.. image::
../graphics/optical_depth_summation.png
images/optical_depth_summation.png
:width: 400

Three possible cases are highlighted. In the first case, the drawn optical
Expand Down
16 changes: 6 additions & 10 deletions docs/physics/plasma/plasma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,13 @@ Here's an example how to instantiate a simple base plasma::
28 0.5 513016973.936
26 0.5 539183641.472







Plasma Types
------------
.. toctree::
:maxdepth: 0

plasma_doc/lte_plasma.rst
plasma_doc/nebular_plasma.rst
lte_plasma.rst
nebular_plasma.rst


.. _tau_sobolev:
Expand All @@ -90,9 +84,11 @@ This function calculates the Sobolev optical depth :math:`\tau_\textrm{Sobolev}`
.. toctree::
:maxdepth: 1

.. include:: plasma_doc/macroatom.rst
.. include:: plasma_doc/nlte.rst
macroatom.rst
nlte.rst


.. .. automodapi:: tardis.plasma_array
Expand Down
21 changes: 3 additions & 18 deletions docs/running/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The TARDIS code needs three components to calculate spectra:
:maxdepth: 1
:numbered:

../models/index.rst
../configuration/index.rst
3. Atom Database <https://tardis-sn.github.io/carsus/>
../models/index
../configuration/index
../atomic/atomic_data


A quick start guide to run TARDIS can be found
Expand All @@ -26,21 +26,6 @@ A quick start guide to run TARDIS can be found
gui
notebooks/index.rst

.. _quickstart:


Running TARDIS interactively in a Jupyter notebook (recommended)
================================================================

To get more information from each run of TARDIS one can run it interactively and
have full access to the model properties (as described in :ref:`physical_quantities`)

.. toctree::
:maxdepth: 1

examples/run_simple_example.ipynb





9 changes: 6 additions & 3 deletions docs/running/notebooks/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Interactive TARDIS runs
=======================
TARDIS interactive runs
==================================================

xxx
To get more information from each run of TARDIS one can run it interactively and
have full access to the model properties (as described in :ref:`physical_quantities`)

.. examples/run_simple_example.ipynb
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ author = TARDIS Collaboration
author_email = wkerzendorf@gmail.com
license = BSD (3 clause)
url = http://tardis.readthedocs.org/
edit_on_github = False
edit_on_github = True
github_project = tardis-sn/tardis
version = 3.0.dev
minimum_python_version = 3.6
Expand Down
10 changes: 10 additions & 0 deletions tardis/io/atom_data/atom_web_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@
logger = logging.getLogger(__name__)

def get_atomic_repo_config():
"""
Get the repo configuration dictionary for the atomic data
Returns
-------
: dict
"""

atomic_repo_fname = get_internal_data_path('atomic_data_repo.yml')
return yaml.load(open(atomic_repo_fname))


def download_atom_data(atomic_data_name=None):
"""
Download the atomic data from the repository
Parameters
----------
atomic_data_name: str
Expand Down

0 comments on commit 0149d89

Please sign in to comment.