-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INF/DOC] Documentation bugfix by pinning mkdocstrings to 0.18.1 (#1147)
* HOTFIX documentation bugfix by pinning mkdocstrings to 0.18.1 * Add mkdocstrings-python-legacy into env * Apply to mkdocs/environment * Add first pass on automated test for docs build. * Commented out `mkdocs/environment.yaml` until further discussion. Co-authored-by: Zero <[email protected]>
- Loading branch information
Showing
5 changed files
with
57 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
name: pyjanitor-doc | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python | ||
# required | ||
- pandas | ||
- pandas-flavor | ||
- multipledispatch | ||
- scipy | ||
# optional | ||
- biopython | ||
- natsort | ||
- pyspark>=3.2.0 | ||
- rdkit | ||
- tqdm | ||
- unyt | ||
- xarray | ||
- numba | ||
# doc | ||
- mkdocs | ||
- mkdocs-material | ||
- mkdocstrings-python | ||
# 14 August 2022: Temporarily commenting out. | ||
# See: https://github.com/pyjanitor-devs/pyjanitor/pull/1147#issuecomment-1214508157 | ||
# for more context on why. | ||
# name: pyjanitor-doc | ||
# channels: | ||
# - conda-forge | ||
# dependencies: | ||
# - python | ||
# # required | ||
# - pandas | ||
# - pandas-flavor | ||
# - multipledispatch | ||
# - scipy | ||
# # optional | ||
# - biopython | ||
# - natsort | ||
# - pyspark>=3.2.0 | ||
# - rdkit | ||
# - tqdm | ||
# - unyt | ||
# - xarray | ||
# - numba | ||
# # doc | ||
# - mkdocs | ||
# - mkdocs-material | ||
# # To fix #1146 | ||
# # - mkdocstrings-python | ||
# - mkdocstrings=0.18.1 | ||
# - mkdocstrings-python-legacy=0.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Tests for documentation build.""" | ||
|
||
import os | ||
|
||
|
||
def test_docs_general_functions_present(): | ||
"""Test that all docs pages build correctly. | ||
TODO: There has to be a better way to automatically check that | ||
all of the functions are present in the docs. | ||
This is an awesome thing that we could use help with in the future. | ||
""" | ||
# Build docs using mkdocs | ||
os.system("mkdocs build --clean") | ||
|
||
# We want to check that the following keywords are all present. | ||
# I put in a subsample of general functions. | ||
# This can be made much more robust. | ||
rendered_correctly = False | ||
with open("./site/api/functions/index.html", "r+") as f: | ||
for line in f.readlines(): | ||
if "add_columns" in line or "update_where" in line: | ||
rendered_correctly = True | ||
assert rendered_correctly |