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
Docstrings and autodocs for API reference #17
Conversation
@@ -111,7 +111,7 @@ | |||
|
|||
# The theme to use for HTML and HTML Help pages. See the documentation for | |||
# a list of builtin themes. | |||
html_theme = 'default' | |||
html_theme = 'sphinx_rtd_theme' |
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've took the opportunity to also setup RTD theme on local build of docs. :)
Current coverage is
|
self.namespaces[prefix] = uri | ||
|
||
def remove_namespaces(self): | ||
""" | ||
Remove all namespaces, allowing to traverse the document using | ||
namespace-less xpaths. See example below. |
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.
"See example below" doesn't make much sense in a docstring. What about See :ref:Removing namespaces <...>
?
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.
good catch, thanks @kmike :)
:class:`Selector` allows you to select parts of an XML or HTML text using CSS | ||
or XPath expressions and extract data from it. | ||
|
||
``text`` is utf-8 encoded text (unicode object in Python 3 or str in Python 3) |
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.
This statement is contradictory: utf8-encoded text is bytes by definition, it is an opposite of Py2 unicode / Py 3 str.
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.
Right! So, I'll just put the same thing I used for the usage docs:
``text`` is an unicode object in Python 2 or an str object in Python 3
sounds good?
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.
yep! a minor grammar fix: a str object
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.
and a unicode
👍 |
Docstrings and autodocs for API reference
@dangra should we try to add the custom xpath funcs before 1.0? |
No, it's OK to release with what we have
|
Alright, can I go ahead update HISTORY and release 1.0? |
@dangra HISTORY updated, green sign for |
Go ahead ! |
There are some use of unnecessary |
alright, I'll fix that first! =) |
done, 1.0 released! :) phew! |
woohoo! 🎆 |
Hey, fellows!
Here is a change to use docstrings + autodocs for the API reference, making it easier to keep it in sync with the code.
This fixes #16
Does this look good?