Skip to content

Comments

Scaffold Material documentation site and update guides#70

Open
EvickaStudio wants to merge 5 commits intodevfrom
feat/mkdocs
Open

Scaffold Material documentation site and update guides#70
EvickaStudio wants to merge 5 commits intodevfrom
feat/mkdocs

Conversation

@EvickaStudio
Copy link
Owner

@EvickaStudio EvickaStudio commented Feb 23, 2026

Create a Material documentation site with structured navigation and rewrite guides to include code-verified workflows. Update dependencies to include mkdocs-material for improved documentation styling. Refresh lockfiles for consistency.

Summary by Sourcery

Scaffold a MkDocs Material documentation site with structured navigation and improved theming, expand and reorganize user-facing docs into tutorials, how-to guides, reference, and explanations, and refresh tooling to support the new docs stack.

Enhancements:

  • Refine configuration, architecture, security, CLI, and Web UI docs for clarity, constraints, and cross-linking, including explicit env var behavior and provider loading rules.
  • Introduce project Makefile targets documentation and contributor workflow guidance for running checks and preparing commits.
  • Update development dependency set and lockfile to include mkdocs-material and bump the regex dependency version.

Documentation:

  • Create a MkDocs configuration using the Material theme with custom styling, navigation structure, and documentation landing page.
  • Add and reorganize documentation sections into tutorials, how-to guides, reference, and explanation indexes with task- and concept-oriented content.
  • Rewrite setup, Web UI configuration, custom provider, first notification tutorial, and security/architecture pages to be code-accurate and workflow-focused.

Note

Low Risk
Docs-only changes plus dev-only dependency/lockfile updates; low runtime risk, with minor risk of doc build/config issues due to new MkDocs Material setup.

Overview
Adds a full MkDocs Material documentation site (mkdocs.yml) with new landing page and sectioned navigation for Tutorials, How-to, Reference, and Explanation, plus custom theme styling in docs/stylesheets/extra.css.

Rewrites/expands guides and references to be more workflow-accurate (Web UI security notes, provider auto-discovery/how to add a provider, dev setup/commit checklist, CLI/config reference), and updates dev dependencies to include mkdocs-material (refreshing requirements* and uv.lock).

Written by Cursor Bugbot for commit f5cc775. This will update automatically on new commits. Configure here.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 23, 2026

Reviewer's Guide

Scaffolds a MkDocs Material documentation site (mkdocs.yml, themed assets, navigation structure) and rewrites key docs into a task/area-structured hierarchy with code-accurate workflows, while updating dev dependencies (mkdocs-material, regex) and refreshing lockfiles/requirements for consistency.

Flow diagram for MkDocs Material documentation structure

graph TD
  Home[index_md]:::page
  TutorialsIndex[tutorials_index_md]:::page
  FirstNotification[tutorials_first_notification_md]:::page

  HowToIndex[how_to_index_md]:::page
  SetupDevEnv[how_to_setup_dev_environment_md]:::page
  ConfigureWebUI[how_to_configure_web_ui_md]:::page
  AddCustomProvider[how_to_add_custom_provider_md]:::page
  PrepareCommit[how_to_prepare_commit_md]:::page

  ReferenceIndex[reference_index_md]:::page
  ConfigRef[reference_configuration_md]:::page
  CLIRef[reference_cli_md]:::page
  MakeTargetsRef[reference_make_targets_md]:::page

  ExplanationIndex[explanation_index_md]:::page
  ArchitecturePage[explanation_architecture_md]:::page
  SecurityPage[explanation_security_md]:::page

  Home --> TutorialsIndex
  Home --> HowToIndex
  Home --> ReferenceIndex
  Home --> ExplanationIndex

  TutorialsIndex --> FirstNotification

  HowToIndex --> SetupDevEnv
  HowToIndex --> ConfigureWebUI
  HowToIndex --> AddCustomProvider
  HowToIndex --> PrepareCommit

  ReferenceIndex --> ConfigRef
  ReferenceIndex --> CLIRef
  ReferenceIndex --> MakeTargetsRef

  ExplanationIndex --> ArchitecturePage
  ExplanationIndex --> SecurityPage

  classDef page fill:#ffe0b2,stroke:#e65100,stroke-width:1.5px,border-radius:6px;
Loading

File-Level Changes

Change Details Files
Introduce MkDocs Material documentation site configuration and styling.
  • Add mkdocs.yml configuring Material theme, navigation tree, plugins, markdown extensions, and social links.
  • Add custom CSS to align colors and card/button styling with project branding.
mkdocs.yml
docs/stylesheets/extra.css
Restructure documentation into Tutorials/How-to/Reference/Explanation sections with index landing pages and a new homepage.
  • Create new docs index landing page with quickstart and navigation overview.
  • Add section index pages for tutorials, how-to guides, reference, and explanation, each linking into existing/rewritten content.
  • Wire new docs into mkdocs.yml navigation (Home, Tutorials, How-to Guides, Reference, Explanation).
docs/index.md
docs/tutorials/index.md
docs/how-to/index.md
docs/reference/index.md
docs/explanation/index.md
mkdocs.yml
Rewrite existing guides to be code-accurate and workflow-oriented.
  • Revise configuration reference to clarify env var loading, add ranges/defaults, and document session/state env variables plus related links.
  • Update custom provider guide to describe actual plugin loading rules, constructor contract, logging, and troubleshooting/related references.
  • Rework dev environment setup guide into uv-first workflow, add make-based test/check guidance, and alternative venv+pip path.
  • Clarify architecture explanation with runtime flow, provider discovery rules, reliability knobs, and design intent.
  • Strengthen Web UI configuration and security docs, listing key endpoints and linking to security explanation.
  • Tighten security model notes around Web UI boundary, config editing limits, session/state storage, and operational recommendations.
  • Polish first-notification tutorial to be shorter, stepwise, uv-focused, and link to follow‑up docs.
  • Add CLI reference details on entrypoints, --test-notification usage, exit behavior, and related configuration docs.
docs/reference/configuration.md
docs/how-to/add-custom-provider.md
docs/how-to/setup-dev-environment.md
docs/explanation/architecture.md
docs/how-to/configure-web-ui.md
docs/explanation/security.md
docs/tutorials/first-notification.md
docs/reference/cli.md
Add contributor-focused workflow documentation for pre-commit checks and Make targets.
  • Introduce "prepare changes before committing" how-to with recommended make commands, CI alignment, and commit message conventions.
  • Document Makefile targets (install, run, test, check, CI, typecheck, dependency export, Docker) and suggested usage patterns.
docs/how-to/prepare-commit.md
docs/reference/make-targets.md
Update dependencies and lockfiles to support docs tooling.
  • Add mkdocs-material to dev dependencies in pyproject.toml.
  • Bump regex dependency version and hashes in requirements.txt.
  • Regenerate uv.lock and refresh requirements-dev.txt to stay in sync with updated dependencies.
pyproject.toml
requirements.txt
requirements-dev.txt
uv.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • You’ve added mkdocs-material only to the dev extra in pyproject.toml; consider also adding it to requirements-dev.txt (or regenerating that file) so non-uv workflows that rely on pip install -r requirements-dev.txt can build the docs site consistently.
  • The edit_uri: edit/dev/docs/ in mkdocs.yml hardcodes the dev branch; if your default or primary docs branch is different (e.g. main), you may want to align this path so the "Edit on GitHub" links point to the branch you actually expect contributors to work against.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- You’ve added `mkdocs-material` only to the `dev` extra in `pyproject.toml`; consider also adding it to `requirements-dev.txt` (or regenerating that file) so non-`uv` workflows that rely on `pip install -r requirements-dev.txt` can build the docs site consistently.
- The `edit_uri: edit/dev/docs/` in `mkdocs.yml` hardcodes the `dev` branch; if your default or primary docs branch is different (e.g. `main`), you may want to align this path so the "Edit on GitHub" links point to the branch you actually expect contributors to work against.

## Individual Comments

### Comment 1
<location> `mkdocs.yml:90-91` </location>
<code_context>
+  - pymdownx.caret
+  - pymdownx.tilde
+  - pymdownx.critic
+  - pymdownx.arithmatex:
+      generic: true
+
+extra_css:
</code_context>

<issue_to_address>
**issue (bug_risk):** Math rendering may not work without including a math JS library alongside `pymdownx.arithmatex`.

This extension only wraps math in spans; you still need a renderer (e.g., MathJax or KaTeX) loaded via `extra_javascript` or the theme for formulas to display. If you use LaTeX-style math, add the appropriate JS include; if you don’t, consider removing this extension to keep the config simpler.
</issue_to_address>

### Comment 2
<location> `docs/reference/configuration.md:89-91` </location>
<code_context>
+
+## Runtime/state/session variables
+
+These are read directly from environment (outside the `MOODLEMATE_` nested model in two cases):
+
+- `MOODLEMATE_SESSION_ENCRYPTION_KEY` (optional): enables encrypted Moodle session cache.
+- `MOODLE_SESSION_FILE` (default `moodle_session.json`): path for encrypted session cache file.
+- `MOODLE_STATE_FILE` (optional): explicit path for state file.
+- `MOODLE_STATE_DIR` (optional): directory for `state.json`.
+
+If neither `MOODLE_STATE_FILE` nor `MOODLE_STATE_DIR` is set and `/app/state` does not exist, fallback is local `./state.json`.

-These are read directly from the environment:
</code_context>

<issue_to_address>
**issue (typo):** Clarify environment-variable description and fix the "two cases" mismatch.

The text says variables are read "from environment" and mentions the `MOODLEMATE_` nested model "in two cases", but then lists four variables. Please fix the grammar (add "the") and either remove the "two cases" wording or make it accurately reflect the subset you intend to highlight.

```suggestion
## Runtime/state/session variables

These are read directly from the environment (outside the `MOODLEMATE_` nested model):
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +90 to +91
- pymdownx.arithmatex:
generic: true
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Math rendering may not work without including a math JS library alongside pymdownx.arithmatex.

This extension only wraps math in spans; you still need a renderer (e.g., MathJax or KaTeX) loaded via extra_javascript or the theme for formulas to display. If you use LaTeX-style math, add the appropriate JS include; if you don’t, consider removing this extension to keep the config simpler.

Comment on lines +89 to +91
## Runtime/state/session variables

These are read directly from environment (outside the `MOODLEMATE_` nested model in two cases):
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (typo): Clarify environment-variable description and fix the "two cases" mismatch.

The text says variables are read "from environment" and mentions the MOODLEMATE_ nested model "in two cases", but then lists four variables. Please fix the grammar (add "the") and either remove the "two cases" wording or make it accurately reflect the subset you intend to highlight.

Suggested change
## Runtime/state/session variables
These are read directly from environment (outside the `MOODLEMATE_` nested model in two cases):
## Runtime/state/session variables
These are read directly from the environment (outside the `MOODLEMATE_` nested model):

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.

1 participant