Skip to content

Refactor the API Ref - #1639

Closed
nanjekyejoannah wants to merge 7 commits into
geomstats:masterfrom
nanjekyejoannah:api_ref
Closed

nanjekyejoannah wants to merge 7 commits into
geomstats:masterfrom
nanjekyejoannah:api_ref

Conversation

@nanjekyejoannah

@nanjekyejoannah nanjekyejoannah commented Sep 7, 2022 •

Copy link
Copy Markdown
Contributor

@LPereira95 before I commit everything, can we go through this draft API ref for the geometry module and verify what we want before I modify the rest of the docs.

@luisfpereira luisfpereira left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nanjekyejoannah!

For the changes with autosummary I agree (it is exactly what I was thinking).

One thing I wonder is if we can simplify the name in the left table of contents (e.g. if I'm within geomstats.geometry.manifold.Manifold, it suffices to have the name manifold.Manifold - and later even Manifold will suffice).

For the changes in the docstrings, please take a look to linting errors (see link below). Additionally, check in the contributing guide how you can run flake8 locally, so you can immediately see what are the (linting) errors you may introduce.

Comment thread geomstats/geometry/euclidean.py Outdated
Comment on lines +9 to +10
"""
Class for Euclidean spaces.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice this is not allowed by linting (check e.g. here).

It is expected that the first line of the docstring contains a brief description of the class/function/method.

def parallel_transport(
self, tangent_vec, base_point, direction=None, end_point=None
):
r"""Compute the parallel transport of a tangent vector.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When escapes are used within the docstrings, e.g. within math expressions, we need to add "r" to allow proper rendering. Notice that linting also checks it.

@nanjekyejoannah

nanjekyejoannah commented Sep 21, 2022 •

Copy link
Copy Markdown
Contributor Author

I have the API ref PR updated, several things:

  • There is lots of fixing for doc strings, I have separated this in separate PRs
  • Autosummary now shows many errors to be fixed in imports
  • Notebooks has so many errors
    I know we had agreed that we will try to address all the sphinx-related errors but I am now worried if its realistic, many areas are affected and most are not related to docs.

We can chat tomorrow and scope what we can reasonably address.

@luisfpereira
luisfpereira marked this pull request as draft September 22, 2022 15:03
@luisfpereira

Copy link
Copy Markdown
Collaborator

I'll close this as we decide to move in smaller steps. #1663 addresses the same issues as here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants