diff --git a/.travis.yml b/.travis.yml index 028ed0b8..e17f3cd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ matrix: env: TOXENV=test-pypy3,codecov - python: "2.7" env: TOXENV=packaging-py27 + - python: "3.8" + env: TOXENV=docs install: diff --git a/docs/api.rst b/docs/api.rst index 47854540..e5473f84 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -61,7 +61,6 @@ URLs have many parts, and URL objects have many attributes to represent them. .. autoattribute:: hyperlink.URL.userinfo .. autoattribute:: hyperlink.URL.user .. autoattribute:: hyperlink.URL.rooted -.. autoattribute:: hyperlink.URL.family Low-level functions ------------------- @@ -70,6 +69,6 @@ A couple of notable helpers used by the :class:`~hyperlink.URL` type. .. autoclass:: hyperlink.URLParseError .. autofunction:: hyperlink.register_scheme -.. autofunction:: hyperlink.parse_host +.. autofunction:: hyperlink.parse .. TODO: run doctests in docs? diff --git a/src/hyperlink/__init__.py b/src/hyperlink/__init__.py index a027d52d..f680b01a 100644 --- a/src/hyperlink/__init__.py +++ b/src/hyperlink/__init__.py @@ -1,16 +1,17 @@ +from ._url import ( + parse, + register_scheme, + URL, + EncodedURL, + DecodedURL, + URLParseError, +) -from ._url import (URL, - parse, - EncodedURL, - DecodedURL, - URLParseError, - register_scheme) - -__all__ = [ - "URL", +__all__ = ( "parse", + "register_scheme", + "URL", "EncodedURL", "DecodedURL", "URLParseError", - "register_scheme", -] +) diff --git a/tox.ini b/tox.ini index d8098dd7..4be3fb70 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = test-py{26,27,34,35,36,37,38,py,py3} coverage_report packaging + docs skip_missing_interpreters = {tty:True:False} @@ -220,11 +221,53 @@ deps = commands = coverage combine coverage xml -o "{env:COVERAGE_XML}" - codecov --file="{env:COVERAGE_XML}" --env \ - GITHUB_REF GITHUB_COMMIT GITHUB_USER GITHUB_WORKFLOW \ - TRAVIS_BRANCH TRAVIS_BUILD_WEB_URL TRAVIS_COMMIT TRAVIS_COMMIT_MESSAGE \ - APPVEYOR_REPO_BRANCH APPVEYOR_REPO_COMMIT \ - APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED + codecov --file="{env:COVERAGE_XML}" --env \ + GITHUB_REF GITHUB_COMMIT GITHUB_USER GITHUB_WORKFLOW \ + TRAVIS_BRANCH TRAVIS_BUILD_WEB_URL \ + TRAVIS_COMMIT TRAVIS_COMMIT_MESSAGE \ + APPVEYOR_REPO_BRANCH APPVEYOR_REPO_COMMIT \ + APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL \ + APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED + + +## +# Documentation +## + +[testenv:docs] + +description = build documentation + +basepython = python3.8 + +deps = + Sphinx==2.2.1 + sphinx-rtd-theme==0.4.3 + +commands = + sphinx-build \ + -b html -d "{envtmpdir}/doctrees" \ + "{toxinidir}/docs" \ + "{toxworkdir}/docs/html" + + +[testenv:docs-auto] + +description = build documentation and rebuild automatically + +basepython = python3.8 + +deps = + Sphinx==2.2.1 + sphinx-rtd-theme==0.4.3 + sphinx-autobuild==0.7.1 + +commands = + sphinx-autobuild \ + -b html -d "{envtmpdir}/doctrees" \ + --host=localhost \ + "{toxinidir}/docs" \ + "{toxworkdir}/docs/html" ##