html5parser documentation pass by willkg · Pull Request #374 · html5lib/html5lib-python · GitHub
Skip to content

html5parser documentation pass#374

Merged
gsnedders merged 3 commits into
html5lib:masterfrom
willkg:307-html5parser
Dec 3, 2017
Merged

html5parser documentation pass#374
gsnedders merged 3 commits into
html5lib:masterfrom
willkg:307-html5parser

Conversation

@willkg

@willkg willkg commented Nov 29, 2017

Copy link
Copy Markdown
Contributor

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

willkg commented Nov 29, 2017

Copy link
Copy Markdown
Contributor Author

@codecov-io

codecov-io commented Nov 29, 2017

Copy link
Copy Markdown

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

willkg commented Nov 29, 2017

Copy link
Copy Markdown
Contributor Author

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

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

@hugovk hugovk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just some minor things.

Comment thread html5lib/html5parser.py Outdated
"""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
Copy Markdown
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)

Comment thread html5lib/html5parser.py Outdated
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
Copy Markdown
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
Copy Markdown
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

willkg commented Dec 1, 2017

Copy link
Copy Markdown
Contributor Author

^^^ That squashes the last two commits.

@willkg

willkg commented Dec 3, 2017

Copy link
Copy Markdown
Contributor Author

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

@gsnedders gsnedders merged commit 69152dc into html5lib:master Dec 3, 2017
@willkg

willkg commented Dec 4, 2017

Copy link
Copy Markdown
Contributor Author

@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