Skip to content

feat(docs): Quarto-generated documentation site#96

Merged
lukeroantreeONS merged 8 commits intomainfrom
95-set-up-mvp-of-quarto-documentation
Mar 3, 2026
Merged

feat(docs): Quarto-generated documentation site#96
lukeroantreeONS merged 8 commits intomainfrom
95-set-up-mvp-of-quarto-documentation

Conversation

@lukeroantreeONS
Copy link
Collaborator

@lukeroantreeONS lukeroantreeONS commented Dec 14, 2025

📌 Quarto-generated Documentation for the package

✨ Summary

This PR uses Quarto and Quartodoc to build a documentation website for the package, based on the package docstrings, as well as the markdown and notebook files.

Scope - this PR introduces only the requirements to generate the documentation site, and some updates to typehints / docstrings to facilitate forming the documentation.
A short follow-up PR will introduce the CICD YAML changes to build and deploy to GitHub Pages as part of the release workflow.

📜 Changes Introduced

  • feat: quarto-generated documentation site (overall)
  • feat: sidebar with sections for different components, and the demos
  • fix: make it consistently direct to the landing page (index.qmd) on opening
  • chore: make sidebar collapsed by default
  • ci: integrate into CICD pipeline, make / update github.io site

✅ Checklist

Please confirm you've completed these checks before requesting a review.

  • Code passes linting with Ruff
  • Security checks pass using Bandit
  • API and Unit tests are written and pass using pytest
  • Terraform files (if applicable) follow best practices and have been validated (terraform fmt & terraform validate)
  • DocStrings follow Google-style and are added as per Pylint recommendations
  • Documentation has been updated if needed

🔍 How to Test

  1. Run uv sync to get the additional (dev) packages required
  2. Run uv run quartodoc build to build the quarto markdown files
  3. Run uv run quarto render to render html documentation site
  4. Run uv run quarto preview to locally host the documentation site - explore it in a browser
  5. Go to the proof-of-concept GitHub Pages site that I'm temporarily hosting on a fork, verify looks and behaves as the locally hosted one does.

@lukeroantreeONS lukeroantreeONS linked an issue Dec 14, 2025 that may be closed by this pull request
@lukeroantreeONS lukeroantreeONS marked this pull request as ready for review February 15, 2026 11:48
@lukeroantreeONS lukeroantreeONS changed the title feat(docs): WIP - quarto-generated documentation site feat(docs): Quarto-generated documentation site Feb 15, 2026
@github-actions github-actions bot added the enhancement New feature or request label Feb 15, 2026
…boto) and backup font (system - Helvetica Neue)
Copy link
Contributor

@frayle-ons frayle-ons left a comment

Choose a reason for hiding this comment

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

Really cool to see how the quarto docs work in terms of the yaml and styles. And nice work done on adding the documentation and some of the typing on arguments. Looks good overall, I've added a few questions and suggestions but I think most are just small things.

@@ -1,4 +1,30 @@
"""Indexers package."""
# pylint: disable=C0301
"""This module provides functionality for creating a vector index from a text file.
Copy link
Contributor

Choose a reason for hiding this comment

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

"from a csv (text) file" instead?


This class interacts with the Vectoriser class from the vectorisers submodule,
expecting that any vector model used to generate embeddings used in the
VectorStore objects is an instance of one of these classes, most notably
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove the hard reference to there being 3 Vectoriser classes. We might add more, users might make a custom one. Possibly it could refer to the base class instead

Copy link
Contributor

Choose a reason for hiding this comment

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

Should this doctoring also capture the other functionalities of the VectorStore such as search() reverse_saerch(0 and embed(), and from_filesepace(). The key features and doctoring currently only refers to what happens in the index create / constructor step.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestions - I've updated this docstring in full (will push the updates shortly).
I've dropped the dependency information and usage description to keep the information more targeted towards the indexers module.

import shutil
import time
import uuid
from typing import Optional, Self, Union # noqa: F401
Copy link
Contributor

Choose a reason for hiding this comment

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

unused imports?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, thanks!


Returns:
VectorStore: An instance of the `VectorStore` class.
(VectorStore): An instance of the `VectorStore` class.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the parenthesis is not conventional style for writing docstrings - or is this needed for Quarto to work?

https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was needed to get quartodoc to detect & render it as being a datatype rather than a variable name.

an api-endpoint.

from .main import get_router, run_server
These functions interact with the ClassifAI PackageIndexer modules
Copy link
Contributor

Choose a reason for hiding this comment

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

should there be a space between Package and Indexer?

@@ -1,5 +1,12 @@
"""FastAPI server as a package."""
"""This module provides functionality for creating a start a restAPI service which
allows a user to call the search methods of different VectorStore objects, from
Copy link
Contributor

Choose a reason for hiding this comment

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

'allows a user to call the search methods of one or more VectorStore objects'?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking were the TODO sections left intentionally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd initially wanted to keep the scope of the PR to the quarto static site generation, but as these were the only ones missing I'm happy to add them to it.

@frayle-ons
Copy link
Contributor

frayle-ons commented Feb 23, 2026

Final note that I could not get quarto to run locally using the how to test guide. Working on the current branch, I was able to uv sync, but then got the message quartodoc not found when trying to do quartodoc build. i had to run uv pip install quartodoc and tried uv add --dev quartodoc separately, both of which worked. However trying to resolve a similar issue with quarto render, I couldn't get this next line to run at all.

…lasses to website, updated docstrings as suggested, merged schema definitions directly into dataclasses
@lukeroantreeONS lukeroantreeONS requested a review from a team as a code owner February 24, 2026 22:22
@lukeroantreeONS
Copy link
Collaborator Author

Final note that I could not get quarto to run locally using the how to test guide. Working on the current branch, I was able to uv sync, but then got the message quartodoc not found when trying to do quartodoc build. i had to run uv pip install quartodoc and tried uv add --dev quartodoc separately, both of which worked. However trying to resolve a similar issue with quarto render, I couldn't get this next line to run at all.

Apologies for that, I did some of this work on a workstation, where I haveuv set up to directly configure an external virtual environment (so I can jump between uv- and poetry-provisioned projects); so I could use those commands 'directly'.

I'll update the testing instructions for the correct uv way of running them.

Copy link
Contributor

@frayle-ons frayle-ons left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one or two final suggestions after re-reviewing. I still couldn't get the local version of the docs to run as I was getting a ModuleNotFoundError: No module named 'griffe' when trying to run uv run quartodoc build but the temp deployed version looks good.

Can we add something to the GitHub readme page that links to the deployed quarto docs? I can't see anything at the moment in Github that points to new docs site. And can that somehow be hidden in the quarto rendered pages so it doesn't link to itself?

and similarity scores.

This class represents the output of vector store search operations, containing
query information, matched documents, and similarity rankings.
Copy link
Contributor

Choose a reason for hiding this comment

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

and scores?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, addressed in latest commit

batch_size (int): [optional] The batch size for processing the input file and batching to
vectoriser. Defaults to 8.
meta_data (dict, optional): key,value pair metadata column names to extract from the input file and their types.
meta_data (dict): key,value pair metadata column names to extract from the input file and their types.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this one no longer optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I should have updated that to
(dict): [optional]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in latest commit 👍

@lukeroantreeONS
Copy link
Collaborator Author

lukeroantreeONS commented Mar 2, 2026

Looks good to me, just one or two final suggestions after re-reviewing. I still couldn't get the local version of the docs to run as I was getting a ModuleNotFoundError: No module named 'griffe' when trying to run uv run quartodoc build but the temp deployed version looks good.

Thanks for the review, I'll implement the two changes you suggested. I'll check the griffe issue - that's a surprise as I don't think I needed to change anything for that when building & deploying the test GitHub Pages.

Can we add something to the GitHub readme page that links to the deployed quarto docs? I can't see anything at the moment in Github that points to new docs site.

Not at this point - I'll be submitting a follow-up PR to add the static site building & deployment to the CICD workflow, after which we can update the README to reference the GitHub Pages site. The one that's currently deployed is a throwaway one on my personal github pages, for testing / demo purposes.

And can that somehow be hidden in the quarto rendered pages so it doesn't link to itself?

That might be possible, but it wouldn't be straightforward / typical. I don't think having a self-referencing link to the documentation site in the landing page of the documentation site would be especially off-putting to people though.

@lukeroantreeONS
Copy link
Collaborator Author

Thanks for the review @frayle-ons - I've implemented the changes you recommended, and this is ready for re-review

Copy link
Contributor

@frayle-ons frayle-ons left a comment

Choose a reason for hiding this comment

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

LGTM

@lukeroantreeONS lukeroantreeONS merged commit 9f7435e into main Mar 3, 2026
5 checks passed
@lukeroantreeONS lukeroantreeONS deleted the 95-set-up-mvp-of-quarto-documentation branch March 3, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up MVP of Quarto documentation

2 participants