Skip to content
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

html5parser documentation pass #374

Merged
merged 3 commits into from
Dec 3, 2017
Merged

html5parser documentation pass #374

merged 3 commits into from
Dec 3, 2017

Conversation

willkg
Copy link
Contributor

@willkg willkg commented Nov 29, 2017

This fixes some issues in building documentation in general and adjusts the autodoc settings to generate docs for the supported public API.

This improves the documentation of the html5parser module.

Are there other things in the html5parser module that should be part of the public API? Are there better examples to include?

@willkg
Copy link
Contributor Author

willkg commented Nov 29, 2017

This documents the html5parser module for #307.

@codecov-io
Copy link

codecov-io commented Nov 29, 2017

Codecov Report

Merging #374 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
- Coverage   90.76%   90.75%   -0.02%     
==========================================
  Files          50       50              
  Lines        6950     6942       -8     
  Branches     1328     1328              
==========================================
- Hits         6308     6300       -8     
  Misses        483      483              
  Partials      159      159
Impacted Files Coverage Δ
html5lib/html5parser.py 98.31% <ø> (ø) ⬆️
html5lib/treewalkers/__init__.py 88.46% <100%> (ø) ⬆️
html5lib/tests/test_sanitizer.py 93.93% <0%> (-0.66%) ⬇️
html5lib/treebuilders/__init__.py 81.81% <0%> (ø) ⬆️
html5lib/treebuilders/etree_lxml.py 79.91% <0%> (ø) ⬆️
html5lib/treebuilders/base.py 85.64% <0%> (ø) ⬆️
html5lib/treeadapters/__init__.py 100% <0%> (ø) ⬆️
html5lib/treeadapters/sax.py 73.33% <0%> (ø) ⬆️
html5lib/serializer.py 85.36% <0%> (ø) ⬆️
html5lib/treeadapters/genshi.py 87.5% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 461bda3...805f272. Read the comment docs.

@willkg
Copy link
Contributor Author

willkg commented Nov 29, 2017

@gsnedders, @jgraham Can either of you review this?

@willkg willkg added this to the 1.0 milestone Nov 29, 2017
Copy link
Contributor

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things.

@@ -219,32 +267,52 @@ def normalizedTokens(self):
def parse(self, stream, *args, **kwargs):
"""Parse a HTML document into a well-formed tree

stream - a filelike object or string containing the HTML to be parsed
:arg stream: a filelike object or string containing the HTML to be parsed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"filelike" -> "file-like" (plus three others below)

regardless of any BOM or later declaration (such as in a meta
element).

:arg scripting: treat noscript elements as if javascript was turned on
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"javascript" -> "JavaScript" (plus below)

gsnedders
gsnedders previously approved these changes Nov 30, 2017
@gsnedders
Copy link
Member

Can you squash the commit addressing review comments?

The public API should all be documented. Anything that isn't documented with a
docstring or starts with a _ isn't part of the public API. Given that, we
shouldn't be autodoc'ing undocumented members.

We do want to document __init__ since that's how the classes get built. So
we explicitly add that to autodoc.

I think this is a good base to build on. If it isn't, we can adjust things
and maybe explicitly specify what should and shouldn't be documented.
@willkg
Copy link
Contributor Author

willkg commented Dec 1, 2017

^^^ That squashes the last two commits.

@willkg
Copy link
Contributor Author

willkg commented Dec 3, 2017

@gsnedders Can you update the review for this, please?

@gsnedders gsnedders merged commit 69152dc into html5lib:master Dec 3, 2017
@willkg
Copy link
Contributor Author

willkg commented Dec 4, 2017

Thank you!

@willkg willkg deleted the 307-html5parser branch December 4, 2017 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants