Skip to content

Commit

Permalink
Documentation updates and removal of unused modules (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
olemke authored Nov 7, 2024
2 parents 54de28f + 5affaed commit a9e2b7e
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 159 deletions.
13 changes: 13 additions & 0 deletions python/doc/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,16 @@
.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand, .wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand {
color: rgb(64, 64, 64);
}

div.nbinput.container, div.nboutput.container {
margin-bottom: 24px;
}

.rst-content .toctree-wrapper>p.caption, h1, h2, h3, h4, h5, h6, legend {
margin-top: 24px;
}

.rst-content .toctree-wrapper > p.caption, .rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4, .rst-content h5, .rst-content h6 {
margin-bottom:12px;
}

2 changes: 0 additions & 2 deletions python/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(os.path.join('..', '..', 'src')))

from pyarts.environment import environ

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
5 changes: 5 additions & 0 deletions python/doc/source/contact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Contact
GitHub
------
* `Submit a bug report <https://github.com/atmtools/arts/issues/new/choose>`_
* `Discussions on GitHub <https://github.com/atmtools/arts/discussions>`_

.. note::
Please use the Github issue tracker for bug reports and the discussions section for questions and comments if possible.
Only use the mailing lists if you're unable to use the GitHub website.

User email list
---------------
Expand Down
5 changes: 5 additions & 0 deletions python/doc/source/indices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ Indices
* :ref:`genindex`
* :ref:`modindex`

.. toctree::
:hidden:

genindex
modindex
37 changes: 35 additions & 2 deletions python/doc/source/pyarts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,48 @@ API Reference

.. toctree::
:maxdepth: 2
:hidden:

pyarts.arts
pyarts.cat
pyarts.data
pyarts.environment
pyarts.hitran
pyarts.plots
pyarts.recipe
pyarts.sensor
pyarts.utils
pyarts.workspace
pyarts.xml


.. rubric:: Modules

.. autosummary::

pyarts.arts
pyarts.cat
pyarts.data
pyarts.hitran
pyarts.plots
pyarts.recipe
pyarts.utils
pyarts.workspace
pyarts.xml


.. rubric:: Classes

.. list-table::

* - :class:`~pyarts.workspace.Workspace`
- The ARTS workspace.


.. rubric:: Decorators

.. list-table::

* - :class:`~pyarts.workspace.arts_agenda`
- Decorator for creating ARTS agendas.
* - :class:`~pyarts.workspace.callback_operator`
- Callback operator decorator.

3 changes: 2 additions & 1 deletion python/doc/source/pyarts.workspace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ pyarts.workspace

pyarts.workspace.Workspace

.. rubric:: Creating an agenda
.. rubric:: Decorators

.. autosummary::
:toctree: stubs

arts_agenda
callback_operator

pyarts.workspace.utility
------------------------
Expand Down
12 changes: 4 additions & 8 deletions python/src/pyarts/__init__.py.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# -*- coding: utf-8 -*-
"""This module contains functions to interact with ARTS."""

"""This module contains functions to interact with ARTS.
"""

from pyarts import sensor # noqa
from pyarts import xml # noqa
from pyarts import arts # noqa
from pyarts import data # noqa
Expand All @@ -13,10 +10,9 @@ from pyarts import hitran # noqa
from pyarts import cat # noqa
from pyarts import fields # noqa
from pyarts import recipe # noqa
from pyarts.workspace import Workspace, arts_agenda # noqa
from pyarts.workspace.callback import callback_operator # noqa

__all__ = [s for s in dir() if not s.startswith('_')]
__all__ = [s for s in dir() if not s.startswith("_")]
__version__ = "@ARTS_VERSION@"
version = __version__

# Name the workspace
Workspace = workspace.Workspace
69 changes: 0 additions & 69 deletions python/src/pyarts/environment.py

This file was deleted.

76 changes: 0 additions & 76 deletions python/src/pyarts/sensor.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/python_interface/py_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void py_lookup(py::module_& m);
* 3) Implicit conversion can only be defined between two python-defined Arts types
*/
NB_MODULE(arts, m) try {
m.doc() = "Interface directly to the C++ types via python";
m.doc() = "Interface directly to the C++ types, functions and modules via python";
py::class_<Workspace> ws(m, "CxxWorkspace");

static bool init = true;
Expand Down

0 comments on commit a9e2b7e

Please sign in to comment.