-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
90 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
- run: pip install '.[docs]' | ||
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Publish docs | ||
run: mkdocs gh-deploy |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,25 @@ | ||
"""Generate the code reference pages.""" | ||
|
||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
for path in sorted(Path("src").rglob("*.py")): # | ||
module_path = path.relative_to("src").with_suffix("") # | ||
doc_path = path.relative_to("src").with_suffix(".md") # | ||
full_doc_path = Path("reference", doc_path) # | ||
|
||
parts = list(module_path.parts) | ||
|
||
if parts[-1] == "__init__": # | ||
parts = parts[:-1] | ||
doc_path = doc_path.with_name("index.md") | ||
full_doc_path = full_doc_path.with_name("index.md") | ||
elif parts[-1] == "__main__": | ||
continue | ||
|
||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: # | ||
identifier = ".".join(parts) # | ||
print("::: " + identifier, file=fd) # | ||
|
||
mkdocs_gen_files.set_edit_path(full_doc_path, path) # |
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,3 @@ | ||
# Welcome to Dvc Render | ||
|
||
- [API Reference](./reference/dvc_render/index.md) |
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,33 @@ | ||
site_name: Dvc Render | ||
|
||
theme: | ||
name: material | ||
logo: assets/logo.svg | ||
favicon: assets/logo.svg | ||
palette: | ||
primary: white | ||
accent: deep purple | ||
icon: | ||
repo: fontawesome/brands/github | ||
|
||
repo_url: https://github.com/iterative/dvc-render | ||
repo_name: iterative/dvc-render | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/iterative/ | ||
|
||
plugins: | ||
- search | ||
- gen-files: | ||
scripts: | ||
- docs/gen_ref_pages.py | ||
- section-index | ||
- mkdocstrings: | ||
handlers: | ||
python: | ||
rendering: | ||
show_submodules: no | ||
watch: | ||
- src/dvc_render |
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