Skip to content

Commit

Permalink
Add more doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Aug 14, 2024
1 parent 66922b2 commit 0f04923
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions pineappl_py/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
autosummary_imported_members = True

extlinks = {
"yadism": ("https://nnpdf.github.io/yadism/%s", "yadism - %s"),
"rustdoc": ("https://docs.rs/pineappl/latest/pineappl/%s", "PineAPPL - %s"),
"pineko": ("https://github.com/NNPDF/pineko/%s", "pineko - %s"),
}

templates_path = ['_templates']
Expand Down
3 changes: 1 addition & 2 deletions pineappl_py/docs/source/implementation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Implementation
==============

The wrapper is built using PyO3 to interface Rust to Python. This requires (for the moment) unfortunately a bit of overhead code so there exist four layers of code:
The wrapper is built using PyO3 to interface Rust to Python.

- The original Rust library that actually provides all the functionality. Any true code should be placed here as this is shared by all interfaces.
- The PyO3 wrapper objects written in Rust that define which methods are exposed to Python and that takes care of the type conversion from Python-understandable types to Rust types.
- The PyO3 wrapper objects in Python which are an exact mirror of their Rust equivalent. This translation is provided by PyO3 and note that it also preserves the associated documentation.
- The additional Python wrappers around the raw PyO3 objects which provide convenience wrappers to cast arbitrary Python objects to objects that can actually used by PyO3.
14 changes: 2 additions & 12 deletions pineappl_py/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ PineAPPL is a computer library that makes it possible to produce fast-interpolat
The :doc:`installation` instructions are given :doc:`here <installation>`.

A practical example can be found in the ``example/`` subfolder of the `repository <https://github.com/NNPDF/pineappl/>`_.
The Python wrapper is also used in :yadism:`\ ` and :pineko:`\ `. We also list some common :doc:`recipes` here.
The Python wrapper is also used in `yadism <https://nnpdf.github.io/yadism/>`_ and `pineko <https://github.com/NNPDF/pineko/>`_.
We also list some common :doc:`recipes` here.

.. toctree::
:maxdepth: 1
Expand All @@ -20,14 +21,3 @@ The Python wrapper is also used in :yadism:`\ ` and :pineko:`\ `. We also list s
implementation
API <modules/pineappl>
indices

.. important::

If you are looking for the methods of a specific class, be aware that part of
them are just passed to the underlying Rust object, whose class is the same
of the user-facing one, but prefixed with a ``Py``, e.g.:
:class:`pineappl.grid.Grid` and :class:`pineappl.pineappl.grid.PyGrid`.

You will find the documentation of the unwrapped method in the raw ``Py``
class, while part of the methods are wrapped and thus even documented in the
user-facing class.

0 comments on commit 0f04923

Please sign in to comment.