-
Notifications
You must be signed in to change notification settings - Fork 400
docs: Improve API doc groups #1309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Closes: #1293
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great!
Maybe we should also add a Middlewares
group, currently, there is only CrawlerInstrumentor
. However, I think there may be more in the future.
@@ -12,7 +12,7 @@ | |||
RequestHandler = Callable[[TCrawlingContext], Awaitable[None]] | |||
|
|||
|
|||
@docs_group('Classes') | |||
@docs_group('Others') | |||
class Router(Generic[TCrawlingContext]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the Others
group for Router
.
But I'm not sure which group would be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I like it
src/crawlee/_utils/docs.py
Outdated
'Functions', | ||
'HTTP clients', | ||
'HTTP parsers', | ||
'Others', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use a singular (Other) here and also move it to the bottom of the class list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to "Other". However, the sequence defined in GroupName
doesn't affect the order in the rendered page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but I don't know where to change this to actually change the order 😁 Could you please give it a try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Group sorting is implemented in the docusaurus-plugin-typedoc-api. @barjin will do the changes, and once that's done, we can bump the package version here.
Nice, this is way more readable. I was looking at Resource Management? Request customization? |
Hmm, maybe let's do it in the future when we have more "middlewares".
Yeah, I'd also like to put it somewhere, but I have no idea where :D. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is big improvement over the current state.
Description
Render of the whole page:
I am open to any suggestions for better grouping it. Maybe we can even hide something from "Others"?
Issues
Testing
Checklist