Skip to content

Commit

Permalink
Deployed 6a94ada to 0.2 with MkDocs 1.4.1 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 26, 2022
1 parent 6a94ada commit f5d5539
Show file tree
Hide file tree
Showing 83 changed files with 34,501 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
858 changes: 858 additions & 0 deletions 0.2/404.html

Large diffs are not rendered by default.

1,212 changes: 1,212 additions & 0 deletions 0.2/api/element_deeplabcut/export/nwb/index.html

Large diffs are not rendered by default.

5,325 changes: 5,325 additions & 0 deletions 0.2/api/element_deeplabcut/model/index.html

Large diffs are not rendered by default.

2,455 changes: 2,455 additions & 0 deletions 0.2/api/element_deeplabcut/readers/dlc_reader/index.html

Large diffs are not rendered by default.

2,501 changes: 2,501 additions & 0 deletions 0.2/api/element_deeplabcut/train/index.html

Large diffs are not rendered by default.

1,011 changes: 1,011 additions & 0 deletions 0.2/api/element_deeplabcut/version/index.html

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions 0.2/api/make_pages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""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
import subprocess

package = os.getenv("PACKAGE")

element = package.split("_", 1)[1]
if not Path(f"workflow_{element}").is_dir():
try:
subprocess.run(
f"git clone https://github.com/datajoint/workflow-{element.replace('_','-')}.git /main/delete".split(
" "
),
check=True,
timeout=5,
)
os.system(f"mv /main/delete/workflow_{element} /main/")
os.system("rm -fR /main/delete")
except subprocess.CalledProcessError:
pass # no repo found

nav = mkdocs_gen_files.Nav()
for path in sorted(Path(package).glob("**/*.py")) + sorted(
Path(f"workflow_{element}").glob("**/*.py")
):
if path.stem == "__init__":
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())
Loading

0 comments on commit f5d5539

Please sign in to comment.