Python API reference

Python API can be easily documented with sphinx. For more information on all of the options, check out sphinx’s documentation. The reciprocalspaceship docs also do some clever things with sphinx.

In the simplest form, the following code creates the documentation below for the entire module (in this case, all functions living inside the file python_library.py). You can include more of these blocks to document other modules as desired; you could also document different modules on different pages.

{eval-rst}
.. automodule:: rs_template.python_library
   :members:
fancy_read_cif(ciffile)

Read a cif using reciprocalspaceship and also compute resolution

Parameters

ciffilestr

File path to input cif

Returns

rs.DataSet

Data set, including resolution

fancy_read_mtz(mtzfile)

Read an mtz using reciprocalspaceship and also compute resolution

Parameters

mtzfilestr

File path to input mtz

Returns

rs.DataSet

Data set, including resolution