python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

Generate proper documentation #214

Open jakkdl opened 7 months ago

jakkdl commented 7 months ago

README.md has grown to 200 lines, and spans error codes, installation & run instructions, configuration and command-line flags. We also have CHANGELOG.md with 150 lines. There are a few links in the readme, but it would probably be quite useful to have anything referring to [objects within] urllib3, httpx, anyio, asyncio, trio, etc be hyperlinks w/o having to manually update. Pulling out the error messages for the documentation automatically would be nice, but somewhat complicated given the current setup for messages differing for different (combinations of) libraries. Should be quite doable though.

https://github.com/python-trio/flake8-async/issues/211#issuecomment-1971778351

I'm planning to write up some more detail about each of our error codes in a long doc, hopefully this weekend, which will include much more about why you'd want to enable each of the optional rules in addition to the existing material.

This also sounds like great doc material.

The one workflow I'm decently accustomed to is ReadTheDocs+Sphinx as used in python-trio/trio, and probably nice to be consistent with it since it's in the same organization. But it's also been a huge pain to work with at times.

Zac-HD commented 7 months ago

I think an RTD/Sphinx setup with default config could be good. One intro page with usage instructions (inc CLI); one page per error code explanatory notes (copy ruff's style) plus an index-of-errors page; one page for contributor docs etc.

(still hoping for some free time on a weekend... we'll see)

jakkdl commented 4 months ago

After #245 the only thing remaining is expanding the rules to subpages with examples/explanatory notes/etc.

jakkdl commented 4 months ago

Remaining tasks after #248 (as it currently is):