Open niksirbi opened 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.70%. Comparing base (
2e406e1
) to head (32d6c75
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Description
What is this PR
Why is this PR needed? Our API reference started getting a bit out of hand, as we add more and more functions and it's getting harder to find the functions you need at a glance. Moreover, when implementing a new function/class, one has to remember to always add it to the
api_index.rst
, which is easily forgotten. In some occasions this has resulted in new features being added without them appearing in the API index.What does this PR do?
It overhauls the auto-documentation of API in some major ways:
api_index.rst
only when we add/rename modules (which happens much less often). Moreover, having the module table at the top level makes the index more hierarchically organised, making the relevant parts of the API docs more findable. Additionally, because now we have separate pages on the module level, we can easily reference an entire module from elsewhere in the docs (e.g. using:py:func:`movement.sample_data`
in rst syntax). I've also sanitised the module-level docstrings, because now they're prominently displayed on the module table.sphinx-autosummary
, which are placed indocs/source/_templates/autosummary
. Those enable us o implement the aforementioned recursive generation of index pages, but also allow us to fully control the appearance of classes/functions in the API index. This solves some of the problems mentioned in #178, but we can further customise them to our heart's content. @lochhh let me know if this is how you wanted classes to display, if not feel free to play with theclass.rst
template.MovementDataset
) instead of the full "path" (e.g.movement.move_accessor.MovementDataset
) which is often long and overflows to the right of the page. The full "path" is anyhow visible in the navigation bar (left) and in the signature of the object itself (below the header, see next screenshot). This was achiever via modifying the relevant jinja templates to display "name" instead of "fullname".References
178
How has this PR been tested?
The docs were rendered and viewed locally. This is also the recommended way to review the PR.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
It is in itself an update of documentation.
Checklist: