Skip to content

Commit

Permalink
docs: Move to gp-libs (our internal helpers for sphinx, #265)
Browse files Browse the repository at this point in the history
- Render changelog in [`linkify_issues`] 
- Fix Table of contents rendering with sphinx autodoc with [`sphinx_toctree_autodoc_fix`]
- Deprecate `sphinx-autoapi`, per above fixing the table of contents issue

  This also removes the need to workaround autoapi bugs.
- Test doctests in our docs via [`pytest_doctest_docutils`] (built on [`doctest_docutils`])

[`linkify_issues`]: https://gp-libs.git-pull.com/linkify_issues/
[`sphinx_toctree_autodoc_fix`]: https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/
[`pytest_doctest_docutils`]: https://gp-libs.git-pull.com/doctest/pytest.html
[`doctest_docutils`]: https://gp-libs.git-pull.com/doctest
  • Loading branch information
tony committed Sep 11, 2022
2 parents 6ac525c + 15a59ea commit 8daeaa2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 25 deletions.
14 changes: 12 additions & 2 deletions CHANGES
Expand Up @@ -24,12 +24,22 @@ $ pipx install --suffix=@next unihan-etl --pip-args '\--pre' --force
- Add [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) (#263)
- Add [flake8-comprehensions](https://github.com/adamchainz/flake8-comprehensions) (#264)

### Documentation

- Render changelog in [`linkify_issues`] (~~#261~~, #265)
- Fix Table of contents rendering with sphinx autodoc with [`sphinx_toctree_autodoc_fix`] (#265)
- Test doctests in our docs via [`pytest_doctest_docutils`] (built on [`doctest_docutils`]) (#265)

[`linkify_issues`]: https://gp-libs.git-pull.com/linkify_issues/
[`sphinx_toctree_autodoc_fix`]: https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/
[`pytest_doctest_docutils`]: https://gp-libs.git-pull.com/doctest/pytest.html
[`doctest_docutils`]: https://gp-libs.git-pull.com/doctest

## unihan-etl 0.17.2 (2022-08-21)

### Documentation

- Add vendorized, updated fork of
[sphinxcontrib-issuetracker](https://github.com/ignatenkobrain/sphinxcontrib-issuetracker), via #261.
- Add vendorized, updated fork of `sphinxcontrib-issuetracker`, via #261.
- Remove sphinx-issues package

## unihan-etl 0.17.1 (2022-08-21)
Expand Down
18 changes: 11 additions & 7 deletions docs/conf.py
Expand Up @@ -33,15 +33,20 @@
"sphinxext.opengraph",
"sphinxext.rediraffe",
"myst_parser",
"sphinx_autoissues",
"sphinx_toctree_autodoc_fix",
"linkify_issues",
]
myst_enable_extensions = [
"colon_fence",
"substitution",
"replacements",
"strikethrough",
]

templates_path = ["_templates"]

source_suffix = {".rst": "restructuredtext", ".md": "markdown"}

myst_enable_extensions = ["colon_fence", "substitution", "replacements"]

master_doc = "index"

project = about["__title__"]
Expand Down Expand Up @@ -88,6 +93,9 @@
]
}

# linkify_issues
issue_url_tpl = "https://github.com/cihai/unihan-etl/issues/{issue_id}"

# sphinxext.opengraph
ogp_site_url = about["__docs__"]
ogp_image = "_static/img/icons/icon-192x192.png"
Expand All @@ -101,10 +109,6 @@
copybutton_prompt_is_regexp = True
copybutton_remove_prompts = True

# sphinx-autoissues
issuetracker = "github"
issuetracker_project = "cihai/unihan-etl"

# sphinxext-rediraffe
rediraffe_redirects = "redirects.txt"
rediraffe_branch = "master~1"
Expand Down
1 change: 0 additions & 1 deletion docs/index.md
Expand Up @@ -9,7 +9,6 @@
:hidden:
quickstart
about
cli
api
Expand Down
30 changes: 17 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -65,13 +65,13 @@ zhon = "*"
sphinx = "*"
sphinx-argparse = "*"
furo = "*"
gp-libs = "*"
sphinx-autobuild = "*"
sphinx-autodoc-typehints = "*"
sphinx-inline-tabs = { version = "*", python = "^3.7" }
sphinxext-opengraph = "*"
sphinx-copybutton = "*"
sphinxext-rediraffe = "*"
sphinx-autoissues = "*"
myst_parser = "*"
docutils = "~0.18.0"

Expand Down Expand Up @@ -110,9 +110,9 @@ docs = [
"sphinxext-opengraph",
"sphinx-inline-tabs",
"sphinxext-rediraffe",
"sphinx-autoissues",
"myst_parser",
"furo",
"gp-libs",
]
test = ["pytest", "pytest-rerunfailures", "pytest-watcher"]
coverage = ["codecov", "coverage", "pytest-cov"]
Expand Down

0 comments on commit 8daeaa2

Please sign in to comment.