Repository navigation
Add a documentation site on GitHub Pages and shorten the README - #20
Merged
Merged
Conversation
A Sphinx site with the Furo theme, written in Markdown: a home page, a getting-started guide, seven user-guide pages, and an API reference built from the docstrings. Public docstrings now document parameters, return values and exceptions. A new workflow deploys the site to GitHub Pages on every push to main. CI builds it on pull requests with warnings as errors, and a test runs every Python example in the README and the docs so they cannot go stale. The README keeps the pitch, installation and a quick start, and links to the site for everything else.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Adds a documentation site at https://seba2390.github.io/ExecutionTimer/, hosted free on GitHub Pages. The site goes live after this merges and the new Docs workflow has run.
The site uses Sphinx with the Furo theme, with pages written in Markdown. It uses the stopwatch from the logo, the logo's indigo colors, and light and dark modes.
Docstrings. The public functions and types now document their parameters, return values and exceptions, so the API reference has real content. Only docstrings changed; no behavior did.
Keeping it correct
tests/docs_examples_test.pyruns every Python example in the README and the docs, 38 blocks across 10 pages. Each page runs in a fresh interpreter with warnings as errors, so an example can't silently go stale. The asserts in the examples check structure only, never how long asleeptook, so Windows' coarse timer can't make them flaky.Build documentation, builds the site on every PR with warnings as errors, including broken cross-references. It's part of theCI passedcheck, so branch protection needs no changes.Deployment.
.github/workflows/docs.ymlbuilds and deploys to Pages on every push tomain. It follows the same conventions as the other workflows:upload-pages-artifactv5.0.0 anddeploy-pagesv5.0.1.publish.yml.pages: write/id-token: write.github-pagesenvironment already only allows deploys frommain.README. Cut from 298 lines to 85: logo, badges (now including a docs badge), pitch, install, quick start, a decorator example, and links into the site.
Other
pyproject.toml: adocsdependency group (sphinx, furo, myst-parser, sphinx-copybutton, sphinx-design), which Dependabot will keep updated. TheDocumentationURL now points to the site; PyPI picks that up at the next release. The sdist now includesdocs/so its tests can run the doc examples.CONTRIBUTING.md: how to build and preview the docs. Its links are absolute now so they work when shown on the site.CHANGELOG.md: an entry under Unreleased. No version bump, since nothing in the package changed.Checklist
uv run pytest --covpasses: 112 tests, 100% statement and branch coverage. It also passes on 3.14t.uv run ruff checkanduv run ruff format --checkpassuv run basedpyrightpasses (0 errors, 0 warnings)CHANGELOG.mdupdated under## [Unreleased]