Fitting model docstring generators are fragile for generating documentation
- Quantify version: develop branch
Description
I want to use quantify_core.analysis.fitting_models.get_model_common_doc
and quantify_core.analysis.fitting_models.get_guess_common_doc
for creating docstrings in a custom module outside of quantify-core.
The method works as expected except it raises an error on the snippet
.. admonition:: Usage example for a custom fitting model
:class: dropdown, tip
See the usage example at the end of the :class:`~ResonatorModel` source-code:
.. literalinclude:: ../quantify_core/analysis/fitting_models.py
:pyobject: ResonatorModel
This is because the literal include is folder dependent on where the code is executed. This is fine for most docstrings (and a really cool way of giving examples), but for this case, where it is intended to document custom fitting models, it makes the function break outside of quantify_core.
I propose we remove the literal include here. @caenrigen , what do you think?