Skip to content

docs: set up documentation on Read the Docs - #56

Merged
uniqueg merged 40 commits into
devfrom
docs/read-the-docs
Nov 6, 2026
Merged

uniqueg merged 40 commits into
devfrom
docs/read-the-docs

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #40. Closes #49. (Part of #51; #40's acceptance criteria include a short README that points to the docs, which is #49, so both are in one PR.)

  • Docs on Read the Docs, MkDocs Material, styled and configured like cloud-registry's (mkdocs.yml, strict validation, .readthedocs.yaml with a fail-on-warning build). Pages: Home, Usage (repositories, users, subscriptions, publishing, notifications), Deployment (chart, configuration, builds, moving from chart 0.1), API (spec, endpoint table), Development (tests, CI, publishing, signatures, docs, versioning). Content moved from the README, checked against the API spec, config and chart.
  • README aligned with cloud-registry's: ELIXIR On-Cloud logo, shields (license, CI, docs, Codecov, tag, image), synopsis and quick start (included in the docs home page as snippets), citation (points to CITATION.cff; no DOI before the first release), contributing, license. The old "optional link with the Cloud Registry" claim is dropped on purpose: there's no such integration in the code.
  • CI: a Docs job (strict build, as on Read the Docs), part of the gate.
  • Pubgrade-Sidecar's docs as a section ("Section in Pubgrade"): the Sidecar keeps its docs in its own repo with a strict build in its CI. This site pulls them in from a git submodule external/pubgrade-sidecar, pinned to a commit of the Sidecar's dev; the MkDocs hook docs/hooks.py adds its docs/ under sidecar/ (where the Sidecar's own links and site_url point), appends its nav as the last section, and fails on snippets in its pages (they would resolve against this repo). Its code reference builds with mkdocstrings pointed at the submodule's app/. Read the Docs checks out submodules (submodules: include: all), CI's Docs job too, and Dependabot's gitsubmodule entry proposes the newest Sidecar commit monthly.
    • Why a submodule: the pin is an exact commit recorded in Git (reproducible builds of every Pubgrade version), Read the Docs and actions/checkout support it natively, Dependabot bumps it, and no extra plugin or network code runs during the build. The multirepo plugin pins branches only, and copying pages would drift.
  • setup.py: a docs extra (moves to pyproject.toml with ci: add lint, type checks and pyproject.toml #38); long_description no longer reads the README.
  • .dockerignore: docs, submodule, build output and venvs stay out of the image; /config.yaml (a deployment's copy with tokens, as the quick start suggests keeping it outside the checkout) is ignored in Git and images.
  • Old unused images removed; schema images moved to docs/images/.

How it was verified

Declined review findings

  • "Edit this page" links: not enabled, as in cloud-registry; the hook doesn't set edit URLs.

🤖 Generated with Claude Code

Summary by Sourcery

Establish a strict, Read the Docs-hosted documentation site with refreshed project guidance and integrated Pubgrade-Sidecar documentation.

New Features:

  • Publish comprehensive MkDocs Material documentation on Read the Docs covering usage, deployment, API, development, and Pubgrade-Sidecar.
  • Include Pubgrade-Sidecar documentation as a pinned Git submodule section with reproducible builds and automated dependency updates.

Bug Fixes:

  • Correct documentation and README guidance to remove the unsupported Cloud Registry integration claim and keep deployment configuration copies out of source and container images.

Enhancements:

  • Refresh the README with project branding, status badges, synopsis, quick start, citation, contribution, and license information, while moving detailed guidance into the documentation.
  • Add strict documentation builds to CI and Read the Docs, including validation for broken links and warnings.
  • Add a documentation dependency extra and reorganize documentation assets and configuration for the new site.

Build:

  • Add MkDocs, theme, API reference, and documentation tooling dependencies through a dedicated docs extra.

CI:

  • Make the strict documentation build a required CI gate and check out documentation submodules in CI.

Documentation:

  • Document API usage, Helm deployment and configuration, image publishing, notifications, development workflows, and chart migration guidance.
  • Configure Read the Docs to build and publish the MkDocs site with all submodules enabled and warning failures enabled.

Chores:

  • Configure monthly Dependabot updates for the Pubgrade-Sidecar Git submodule.

uniqueg and others added 30 commits November 5, 2026 05:25
Inserting shared mock data into a collection adds an `_id`, and later
tests couldn't serialize it. Two more tests lacked an app context.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replaces Travis and `main.yaml`. Tests run in the image. The smoke test
uses MongoDB 7, which needs a newer pymongo than FOCA 0.7 pins.
Excludes `.env*` from the image build context.

Closes #32

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each call has a timeout and follows no redirects. A failure stays with
its subscriber, and other than 2xx counts as one. The build stores one
result per subscriber, without URLs or tokens.

Closes #34

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With builds off, the default, the POST takes one prebuilt image and
notifies subscribers. Build requests and PUT get a 403. Registration can
be closed by configuration, and a subscription value `*` matches any tag
or branch, as registering again won't work then.

Closes #33

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Configuration from a Secret, and defaults in the image with no users and
no debug mode. Without builds, no updater, shared volume, or rights. Route
or Ingress with TLS, ClusterIP services with own selectors, no fixed user
IDs, MongoDB 7 and camelCase values. The image runs under any user ID.

Closes #35

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Admin users follow the configuration, the probe avoids the database, the
build path finds its own namespace, and the README covers moving from
the old chart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A shared thread limit let calls that hang keep later subscribers in the
queue until the overall wait ended, so these were never called. Each
subscriber now gets a thread, and the setting
`endpoints.subscriptions.max_per_repository` (default: 100) limits the
number of subscriptions per repository, and with it the threads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ages

# Conflicts:
#	pubgrade/errors/exceptions.py
#	pubgrade/modules/endpoints/subscriptions.py
#	tests/pubgrade/endpoints/test_subscriptions.py
One publish upgrades Deployments in two namespaces of a throwaway k3s
cluster, with Pubgrade from its chart and sidecars built from the branch
`master` of Pubgrade-Sidecar. Also covers an unreachable subscriber and a
tag that doesn't exist. Runs in CI as the job `Upgrade test`, part of the
gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sidecars now accept a notification with a 202 and roll out in the
background, so a missing tag only shows in their report, after retries.
The test reads that report, and the README says what `delivered` means.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Threads per notification stay within the limit of subscriptions, also for
lists longer than that. Completing a build needs the token of the
repository that the build belongs to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Image references follow Docker's rules, and requests without images or
image names get a 400 instead of a server error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	tests/pubgrade/endpoints/test_builds.py
MongoDB listens on the configured port, and the builds' Role has no rights
on Services, which nothing uses. The README names the storage class that
builds need, and says to use HTTPS for callbacks outside the cluster.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test looks for the actual tokens in public builds, not only for field
names, and by default no longer reuses the name of existing containers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Push both images by digest in the environment dev-images, scan
exactly those digests, then attest, sign with Sigstore and tag them,
as cloud-registry does. Report unit test coverage to Codecov. Drop
the date tag, which the other repos don't publish.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Always write the coverage report and hand it to the host user, also
when tests fail. Document the environment, secrets and variable that
publishing needs, and how to verify an image's signature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
uniqueg and others added 7 commits November 6, 2026 05:39
MkDocs Material, as in the org's other repos, with usage, deployment,
API and development pages from the README, which now follows
cloud-registry's layout. Pubgrade-Sidecar's documentation is a section
of the site, from a pinned submodule added by a build hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add a Docs job, with the Pubgrade-Sidecar submodule checked out, and
pin the submodule to the Sidecar's newest dev commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the deployment's configuration copy outside the checkout and
ignore it, and local docs builds, in Git and image builds. Fail on
snippets in the Sidecar's pages instead of rewriting them, now that
they are self-contained; drop the unused edit links. Restore the
versioning note, and pin the Sidecar's newest dev commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	.github/workflows/ci.yml
#	README.md
A Citation section that points to CITATION.cff, as there's no DOI
before the first release, and the Lint job in the CI description.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Sets up a strict MkDocs Material documentation site published through Read the Docs, incorporates pinned Pubgrade-Sidecar documentation, refreshes the README as a concise project entry point, and makes documentation validation a required CI check with updated repository and image exclusions.

Sequence diagram for the strict documentation build

sequenceDiagram
    participant Checkout as actions/checkout
    participant Submodule as Pubgrade-Sidecar submodule
    participant MkDocs
    participant Hook as docs/hooks.py
    participant Build as Read the Docs or CI

    Build->>Checkout: checkout repository with submodules
    Checkout->>Submodule: checkout pinned commit
    Build->>MkDocs: mkdocs build --strict
    MkDocs->>Hook: on_config(config)
    Hook->>Submodule: _docs_dir()
    Hook-->>MkDocs: append Sidecar nav section
    MkDocs->>Hook: on_files(files, config)
    Hook-->>MkDocs: add Sidecar docs under sidecar/
    MkDocs->>Hook: on_page_markdown(markdown, page, config, files)
    Hook-->>MkDocs: reject Sidecar snippets
    MkDocs-->>Build: fail on warnings or produce site
Loading

Flow diagram for documentation validation in CI

flowchart TD
    Start["Pull request or push"] --> Checkout["Checkout repository and submodules"]
    Checkout --> Install["Install .[docs] extra"]
    Install --> Build["Run mkdocs build --strict"]
    Build --> Docs["Docs job"]
    Docs --> Gate["CI passed gate"]
    Gate --> Result["Required checks pass"]
Loading

File-Level Changes

Change Details Files
Establish a MkDocs Material site with strict local and Read the Docs builds, covering the project’s usage, deployment, API, and development workflows.
  • Moved and expanded README material into structured documentation pages.
  • Added Read the Docs configuration with Python dependencies, submodule checkout, and fail-on-warning validation.
  • Added reusable README snippets for the documentation home page.
  • Configured theme, navigation, link validation, and documentation dependencies.
.readthedocs.yaml
README.md
docs/index.md
docs/usage.md
docs/deployment.md
docs/api.md
docs/development.md
mkdocs.yml
setup.py
Integrate Pubgrade-Sidecar documentation and code references as a reproducible, pinned documentation section.
  • Added the Sidecar Git submodule and appended its navigation under a dedicated site section.
  • Added a MkDocs hook to import Sidecar pages, validate the submodule, and reject incompatible snippets.
  • Configured mkdocstrings to reference the Sidecar package and added monthly Dependabot submodule updates.
.gitmodules
external/pubgrade-sidecar
docs/hooks.py
mkdocs.yml
.github/dependabot.yml
Make documentation builds part of the required CI and image/repository hygiene.
  • Added a strict Docs CI job with submodules enabled and included it in publishing and gate dependencies.
  • Excluded documentation, submodules, build artifacts, virtual environments, and deployment configuration from images or Git.
  • Moved schema assets into the documentation tree and removed unused imagery.
.github/workflows/ci.yml
.dockerignore
.gitignore
docs/images/app-schema-animation.gif
docs/images/app-schema.svg
images/app-schema-animation.gif
images/app-schema.svg
images/logo-banner.svg

Possibly linked issues


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

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6f2e34b) to head (2044903).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #56   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          669       669           
=========================================
  Hits           669       669           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 6, 2026 05:20
@uniqueg
uniqueg requested a review from akash2237778 as a code owner November 6, 2026 05:20

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/usage.md" line_range="60" />
<code_context>
+Pubgrade sends `access_token` to `callback_url` with each notification, so use
+`https` for anything outside the cluster. A subscription's `value` must equal
+the `tag` or `branch` of a published image; the value `*` matches any of them,
+e.g. every new tag. A repository takes at most 100 subscriptions
+(`endpoints.subscriptions.max_per_repository`); further ones get a 403.
+
</code_context>
<issue_to_address>
**Subscription limit is misreported**

When the configured `endpoints.subscriptions.max_per_repository` differs from 100, `register_subscription()` compares the count against the configured `max_per_repository`, so readers who change that setting get an incorrect limit from the stated 100-subscription cap.

Describe 100 as the default limit and note that `endpoints.subscriptions.max_per_repository` can change it.
</issue_to_address>

Linked issues

#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand

# Requirement Status Notes
1 Build the docs strictly in CI ✅ Met The Docs job runs mkdocs build --strict and is included in the CI gate.
2 Publish the docs on Read the Docs 👀 Check by hand (external system) Verify that the Read the Docs project is configured to publish a successful build and that the published site is available at the linked URL.
3 Provide user, operator, developer and API documentation ✅ Met The site has Usage, Deployment, Development and API pages.
4 Keep the README short and point to the docs ✅ Met The README links to the documentation and keeps its content to a synopsis, quick start, citation, contributing and license.

#49 docs: align the README with the other repos · 1 of 2 met

# Requirement Status Notes
1 Use the requested README structure ✅ Met The README includes the logo, synopsis, quick start, a documentation link, contributing, citation and license.
2 Include CI, Codecov, docs, license and Python shields 🟡 Partly met The README includes CI, Codecov, docs and license shields, but no Python shield.

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: docs/usage.md:60


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/usage.md Resolved

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Linked issues

#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand

# Requirement Status Notes
1 Build the documentation strictly in CI. ✅ Met The Docs job runs mkdocs build --strict and is included in the CI gate.
2 Publish the documentation on Read the Docs. 👀 Check by hand (external system) Check that the Read the Docs project publishes the intended branch and versions using this configuration.
3 Keep the README short and point to the documentation. ✅ Met The README is streamlined and links to the full documentation.
4 Provide user, operator, developer, and API documentation. ✅ Met These are covered in docs/usage.md, docs/deployment.md, docs/development.md, and docs/api.md.

#49 docs: align the README with the other repos · 0 of 1 met

# Requirement Status Notes
1 Align the README's structure and shields with cloud-registry's. 🟡 Partly met The README has the logo, overview, quick start, documentation, contributing, citation, and license sections, plus CI, Codecov, docs, and license shields; it lacks the requested Python shield.

Comment thread README.md Resolved

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Linked issues

#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand

# Requirement Status Notes
1 MkDocs Material documentation with usage, deployment, developer, and API pages ✅ Met The site config uses MkDocs Material, and the docs include the requested guides and API reference.
2 A strict documentation build in CI ✅ Met The Docs job checks out the Sidecar submodule and runs mkdocs build --strict; the job is included in the CI gate.
3 Documentation published on Read the Docs 👀 Check by hand (external system) Check that the documentation is published and accessible on the project's Read the Docs site.
4 A short README that points to the documentation ✅ Met The README is substantially shortened and links to the documentation.

#49 docs: align the README with the other repos · 1 of 3 met

# Requirement Status Notes
1 A logo and CI, Codecov, docs, license, and Python shields ✅ Met
2 A one-line description 🟡 Partly met The README has a synopsis, but it is a multi-sentence paragraph rather than a one-line description.
3 Short sections for what it is, quick start, documentation, contributing, citation, and license 🟡 Partly met The quick start, contributing, citation, and license sections are present, but the description is unheaded and the documentation link is prose rather than a section.

Comment thread README.md Resolved
Comment thread README.md Resolved
@uniqueg
uniqueg merged commit 1e9dc7c into dev Nov 6, 2026
41 of 43 checks passed
@uniqueg
uniqueg deleted the docs/read-the-docs branch November 6, 2026 05:54
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.

docs: align the README with the other repos docs: set up documentation on Read the Docs

1 participant