-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Make documentation more accessible #2633
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
Comments
4 more ideas:
|
I will manage this issue through Hacktober. If you feel the need to discuss something about this in private for some reason, feel free to PM me. Otherwise happy hacking! Regarding this issue, I also thought that we have too many repeating notes we have to change everywhere (and potentially forget doing that in some placed if we have to). I think the fitting directive would be |
Another idea (inspired by #2678), that would also be very well suited for the
|
I openend a branch called |
Hello, I am using this package for my projects and I like the wrapper implementation. I want to contribute towards:
Let me know your thoughts on these ideas. |
Hi there. Thank you very much for your intention to contribute! I am not sure I understand your points though. The tutorials do live in the wiki page and the examples are in the examples folder. What do you want to change specifically to this? Towards the 3rd party resource section, I am also not sure where you imagine this should go. Nonetheless, there is a wiki page kinda doing that: Related projects. I am kind of hesitant with putting too much effort into extending this section though. 3rd party code tutorials tend to get outdated quickly, which is totally understandable since the author has moved on, but it hurts the project a bit. People following these tutorials run into problems because we broke some way the code relied on, and then they come to the support group and ask us why its broken. We dont have this issue with our tutorials since we update them all the time, so that is where I would put the focus. |
Another idea to catch errors in documentation faster and easier: Enable the nitpicky option. We can do this after we enable |
We could even add a workflow that builds the docs and checks for warnings & errors 🤔 Probably only worth the effort after #2178 … |
good idea. |
i just opened a pull request - #2738 - which will resolve this item |
eldbud running sphinx with nitpicky in #2738 made me aware that we use something like A straightforward solution would be to switch to Please for now understand this as note, not as something that I'm determined to do. For example, it would be worth to first check if using the extension allows to reference parameters from roolsbot - this is something that I would finde extremely useful, but sqlalchemyorg/sphinx-paramlinks#7 could indicate that this is not directly doable … |
Short update regarding |
About the |
Another item: The docs of Telegram classes are currently written such that the docstring of the arguments are more informative than the docstring of the respective attributes. E.g. for This logic makes sense for classes that are to be instantiated by the user (like I suggest to revisit the documentation of the Telegram classes and either unify the docstrings of args & attributes or at least check which information would be worth adding to the attributes as well. I'll be adding this to above todo list as well, but wanted to elaborate here. |
Almost all items of this issue have been addressed or converted into standalone issues. closing. |
Hello world.
We receive regularly queries in our help group from people unable to read the support documents we provide. We believe this is mainly because we don't do a good enough job presenting them. This is where you come in: If you are new to the project and think "hey, this can be improved", and its not on the list yet, tell us about this.
One maintainer has compromised the thoughts we as maintainers made about this topic, but we value foreign input very much. Some discussion about this happened at https://t.me/pythontelegrambotgroup/504413 + answers.
edit: The list was extended with the ideas from the comments below and converted into a checklist so that it's easier to keep track of what's already been done.
The mentioned ideas:
Cross referencing. a LOT: -> [Documentation] Add more cross-references #3110
.. seealso::
directive that we can use for this Docs cross references (#2633) #2855These should help a great deal when it comes to "where do I use this"? or "how is this used"?
Maybe: On RTD, for the really newbies a "how to read sphinx docs", e.g. explain that "Parameters: token (str) – Bot’s unique authentication." means that the keyword argument ist named "token" and expects input of type str
We have several notes and docstrings that are repeated very often across the docs, which makes it hard to maintain them. An idea is to use the
.. include::
directive to unify those. Unfortunately this currently doesn't work with thenapoleon
docstring style that we use - see Resolve directives before running napoleon sphinx-doc/sphinx#9939. If/when this can be tackled, this should include the following:pathlib.Path
can be passed. It should also mention that we don't supportopen(file, 'r')
but onlyopen(file, 'rb')
. We should either have a unified note that we add everywhere or move this snippets section to a standalone page, extend it a bit and point to it from the docs. -> [Feature] Improve handling of local mode & docs regarding file handling #3114Improve docs of
ConversationHandler
regarding theTIMEOUT
&WAITING
state, probably including a small code example. This is one of the things that in my experience users have the hardest time to grasp. -> let's do this in the context of [Discussion:] ConversationHandler #2770Add valuable information to attribute docstrings of telegram classes Make documentation more accessible #2633 (comment) -> [Documentation] Add valuable information to attribute docstrings of telegram classes #3109
Think about making use of
blacken-docs
Edit: Currently is not easy to integrate into workflow. not overly important anyway.List changelog in the resources in the readme Documentation Improvements #3103
Make documentation about the "bots default timezone" more explicit - i.e. explain better that naive (date)time objects will usually be interpreted as UTC Documentation Improvements #3103
Update docstrings of attributes which are a list, but may be empty. See Update _message.py - issue #2606 #2741 (comment) Empty lists #3057
Find a way to document Generic classes better, i.e. document which types they need to be fully annotated
On the start page of RTD, the wiki, the examples folder & the GH readme, explain better what the different resources cover. RTD covers technical reference, i.e. comprehensive but not too elaborate, wiki explains certain features in detail, examples do minimal code showcases with little explanation. I imagine a somewhat unified text like "You're at the examples page, which gives you minimal code showcases for PTB features. For detailed tutorials on certain PTB features, please head to the wiki. …" and similar for the other resources.
In the docstrings of
Update.effective_*
, explicitly explain what those attributes will be set to. See [FEATURE] A function to automatically decide if update.message.reply_text or update.callback_query.edit_message_text will be used. #2826 (comment)Link classes to python to docs. in the above mentioned thread, the user was not aware how to build a
datetime
object and tbh one can't expect newbies to know about all python std-libs. in sphinx it's rather easy to cross-ref to other sphinx docs, so let's do that. Docs link python classes to docs #2633 #2739get rid of all the
JSON-serialized
that we copied from the offiicial docs - PTB users never encounter JSON-serialized objects. I think we briefly discussed this at some point but never acted on it …Document that
TelegramObject
is subsriptableIdeas for catching errors in documentation faster and easier: Docs improvements: referencing #2798
intersphinx
since there are lots of 'warnings' now Docs improvements: referencing #2798Make parameters referencable with the
sphinx-paramlinks
extension Docs improvements: referencing #2798Documentation is a great place to get started contributing to Open Source projects without having to write/dive deep into the complex code making up this project. If you look for an "easy" way to give back to the OS community this October, this might be it!
If you like to start working on one of the ideas, comment on this issue as well and say what you want to work on. Once you are ready to show your changes, open a PR towards the doc-fixes branch.
The text was updated successfully, but these errors were encountered: