Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
49d22a34
Verified
Commit
49d22a34
authored
3 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Include auto-generated code docs
parent
42132590
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!316
Replace Sphinx with MkDocs
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-docs.sh
+1
-1
1 addition, 1 deletion
build-docs.sh
docs/scripts/gen_ref_pages.py
+8
-11
8 additions, 11 deletions
docs/scripts/gen_ref_pages.py
mkdocs.yml
+1
-2
1 addition, 2 deletions
mkdocs.yml
with
10 additions
and
14 deletions
build-docs.sh
+
1
−
1
View file @
49d22a34
...
...
@@ -5,6 +5,6 @@ set -o nounset
export
OSS_PARAMS_FILENAME
=
gso/oss-params-example.json
export
TESTING
=
true
pip
install
mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-
section-index
pip
install
mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-
redirects
mkdocs build
This diff is collapsed.
Click to expand it.
docs/scripts/gen_ref_pages.py
+
8
−
11
View file @
49d22a34
...
...
@@ -7,32 +7,29 @@ from pathlib import Path
import
mkdocs_gen_files
nav
=
mkdocs_gen_files
.
Nav
()
root
=
Path
(
__file__
).
parent
.
parent
root
=
Path
(
__file__
).
parent
.
parent
.
parent
src
=
root
/
"
gso
"
ignored_modules
=
[
"
db
"
,
"
graphql_api
"
,
"
main
"
,
"
migrations
"
]
for
path
in
sorted
(
src
.
rglob
(
"
*.py
"
)):
module_path
=
path
.
relative_to
(
src
).
with_suffix
(
""
)
doc_path
=
path
.
relative_to
(
src
).
with_suffix
(
"
.md
"
)
module_path
=
path
.
relative_to
(
root
).
with_suffix
(
""
)
doc_path
=
path
.
relative_to
(
root
).
with_suffix
(
"
.md
"
)
full_doc_path
=
Path
(
"
reference
"
,
doc_path
)
parts
=
tuple
(
module_path
.
parts
)
if
parts
[
-
1
]
==
"
__init__
"
:
if
any
(
module
in
parts
for
module
in
ignored_modules
):
# E.g. ignore generated migration files from SQLAlchemy.
continue
elif
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
nav
[
parts
]
=
doc_path
.
as_posix
()
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
.
relative_to
(
root
))
with
mkdocs_gen_files
.
open
(
"
reference/SUMMARY.md
"
,
"
w
"
)
as
nav_file
:
nav_file
.
writelines
(
nav
.
build_literate_nav
())
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
1
−
2
View file @
49d22a34
...
...
@@ -51,7 +51,6 @@ plugins:
-
docs/scripts/gen_ref_pages.py
-
literate-nav
:
nav_file
:
SUMMARY.md
-
section-index
-
mkdocstrings
# Page tree
...
...
@@ -86,7 +85,7 @@ nav:
-
Netbox
:
admin_guide/oss_bss/netbox.md
-
LibreNMS
:
admin_guide/oss_bss/librenms.md
-
Kentik
:
admin_guide/oss_bss/kentik.md
-
Code Documentation
:
reference/
-
Code Documentation
:
reference/
gso/
# Extensions
markdown_extensions
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment