Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for authentification objects is missing #279

Closed
pmeier opened this issue Jan 17, 2024 · 2 comments · Fixed by #316
Closed

Documentation for authentification objects is missing #279

pmeier opened this issue Jan 17, 2024 · 2 comments · Fixed by #316
Labels
area: documentation 📖 Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@pmeier
Copy link
Member

pmeier commented Jan 17, 2024

#205 moved the Authentication object from ragna.core to ragna.deploy. However, the latter is not part of our API documentation:

# Python API reference
::: ragna.core
::: ragna.source_storages
::: ragna.assistants

In addition, ragna.deploy is also missing the block in the __init__.py file that hides our internal structure from the documentation. We can just copy the one from ragna.core

# isort: split
from ragna._utils import fix_module
fix_module(globals())
del fix_module

@pmeier pmeier added area: documentation 📖 Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers labels Jan 17, 2024
@kenudeh
Copy link

kenudeh commented Jan 23, 2024

Hi. Was this authentication object documented while it was part of ragna.core? If it wasn't, then the need here is to document the content of the _authentication.py file? Is this correct?

@pmeier
Copy link
Member Author

pmeier commented Jan 23, 2024

Was this authentication object documented while it was part of ragna.core?

Yes, it was. We are automatically creating the API documentation with mkdocstrings

ragna/mkdocs.yml

Lines 45 to 56 in 51fcda4

- mkdocstrings:
default_handler: python
handlers:
python:
options:
show_source: false
show_root_heading: true
show_bases: false
unwrap_annotated: true
import:
- https://docs.python.org/3/objects.inv
- https://fastapi.tiangolo.com/objects.inv

Meaning, if a class or function is included in the __all__ attribute of a module, e.g.

__all__ = [
"Assistant",

and given object has a docstring, e.g.

class Assistant(Component, abc.ABC):
"""Abstract base class for assistants used in [ragna.core.Chat][]"""

This will automatically picked up when the documentation is built.

This was the case when the Authentication class was still part of ragna.core. But this missed when it was moved to ragna.deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation 📖 Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants