-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed 4011361 to 0.2 with MkDocs 1.6.0 and mike 2.1.1
- Loading branch information
1 parent
4011361
commit df1ec13
Showing
74 changed files
with
19,712 additions
and
145 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
3,173 changes: 3,173 additions & 0 deletions
3,173
0.2/api/element_facemap/facemap_inference/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
3,582 changes: 3,582 additions & 0 deletions
3,582
0.2/api/element_facemap/facial_behavior_estimation/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
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,27 @@ | ||
"""Generate the api pages and navigation. | ||
NOTE: Works best when following the Google style guide | ||
https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html | ||
https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings | ||
""" | ||
|
||
import mkdocs_gen_files | ||
from pathlib import Path | ||
import os | ||
|
||
package = os.getenv("PACKAGE") | ||
|
||
element = package.split("_", 1)[1] | ||
|
||
nav = mkdocs_gen_files.Nav() | ||
for path in sorted(Path(package).glob("**/*.py")): | ||
if path.stem == "__init__" or path.stem == "version": | ||
continue | ||
with mkdocs_gen_files.open(f"api/{path.with_suffix('')}.md", "w") as f: | ||
module_path = ".".join( | ||
[p for p in path.with_suffix("").parts if p != "__init__"] | ||
) | ||
print(f"::: {module_path}", file=f) | ||
nav[path.parts] = f"{path.with_suffix('')}.md" | ||
|
||
with mkdocs_gen_files.open("api/navigation.md", "w") as nav_file: | ||
nav_file.writelines(nav.build_literate_nav()) |
Oops, something went wrong.