Repository navigation
Move the docs into this repo and publish them with GitHub Pages - #301
Merged
Merged
Conversation
The docs were built from bensynapse/jsonrpcserver.docs and pushed to the previous owner's website, which we can't update. They now live in docs/ and .github/workflows/docs.yml deploys them to GitHub Pages on every push to main. The framework examples move here from the wiki, as files under docs/examples. CI starts each server and sends it a request and a notification. The websockets example uses websockets.asyncio, since the old one fails on Python 3.14. CI also runs every Python block in the README and docs, and checks the output shown. New pages: Security, and a Roadmap with the 6.0 backlog. The README now links to the new site.
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.
Finding F2 (docs hosting) and F16 (docs errors) in the review, plus issue #287.
The docs were built from
bensynapse/jsonrpcserver.docsand pushed into the previous owner's website repo with a token we don't have, so we couldn't update them. This moves them intodocs/here, the same way jsonrpcclient did, and.github/workflows/docs.ymldeploys them withactions/deploy-pageson each push to main. The site will be https://bensynapse.github.io/jsonrpcserver/. Pages is already set to deploy from Actions.jsonrpcserver.docsis left as it is.Examples. The wiki examples are now files in
docs/examples/, included into the Examples page.check_examples.pystarts each one and sends it real requests. The HTTP ones must answer a request withpongand a notification with 204 and no body. The list is http.server,serve(), Flask, Werkzeug, Django, FastAPI, aiohttp, Sanic, Tornado, websockets, ZeroMQ (sync and asyncio) and Socket.IO. Changes from the wiki:websockets.asyncio.serverandasyncio.run(Update websockets example #287). The old example fails on Python 3.14 with "There is no current event loop".zmq.asyncioinstead of aiozmq, which is no longer maintained.async_dispatch.Code in the docs runs in CI.
tests/doc_examples.py(copied from jsonrpcclient) runs every Python block in the README anddocs/*.md, and checks doctest output.tests/test_docs.pyruns it in the test matrix on 3.8 to 3.14, and the newdocsCI job runs it again with the optional libraries installed. That job also runsmkdocs build --strictand the example servers. It's added to "CI OK".Content fixes from the review:
async.mdimported nothing forResult, and its notification snippet called the syncdispatch.methods.mdsaid "Value must be 1-5" forrange(1, 5).faq.mdsaid validation is about 40% of dispatch time. I measured 74% for a trivial method on 3.13.debug,max_batch_size, mixing sync and async methods, and type checking.New pages.
serve(), and NaN on input.The README now links to the new site and to bensynapse badges. Also fixed: the docstring link in
exceptions.py, which went to the old owner's discussions.Checked locally with
mkdocs build --strict, ruff, mypy and pyright. The doc examples pass on 3.8, 3.13 and 3.14. Every example server passes too. I ran those in a network namespace, since port 5000 is busy on my machine.