forked from rucio/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace building of python client documentation with pydoc to mkdocst…
…rings
- Loading branch information
Showing
8 changed files
with
81 additions
and
283 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Generate the code reference pages and navigation.""" | ||
|
||
from pathlib import Path | ||
import os | ||
import mkdocs_gen_files | ||
|
||
src = Path("rucio/lib/rucio/client/") | ||
root = src.parent | ||
doc_path = "/auto_generated/client_api" | ||
files = os.listdir(doc_path) | ||
for file in files: | ||
os.remove(f"{doc_path}/{file}") | ||
|
||
|
||
py_files = [f for f in list(src.rglob("*.py")) if "__init__.py" not in f.name] | ||
|
||
for path in py_files: | ||
module_name = path.name.split('.py')[0] | ||
full_doc_path = Path(f"{doc_path}/{module_name}.md") | ||
|
||
with mkdocs_gen_files.open(full_doc_path, "a") as fd: | ||
module_path = path.relative_to(src).with_suffix("") | ||
fd.write(f"::: rucio.client.{module_path}") | ||
fd.write("\n\n") |
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,51 @@ | ||
site_name: "Rucio Python Client Documentation" | ||
repo_url: https://github.com/rucio/rucio/ | ||
site_url: https://rucio.cern.ch/documentation/ | ||
copyright: "Copyright © 2024 CERN" | ||
docs_dir: /auto_generated/client_api | ||
use_directory_urls: true | ||
not_in_nav: | ||
/auto_generated | ||
|
||
theme: | ||
name: material | ||
logo: ../../img/rucio_horizontaled_black_cropped.svg | ||
extra_css: ../../../src/customTheme.css | ||
extra: | ||
homepage: https://rucio.cern.ch/documentation/ | ||
features: | ||
- content.code.copy | ||
- toc.follow | ||
palette: | ||
- scheme: default | ||
primary: white | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
- scheme: slate | ||
primary: white | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to light mode | ||
|
||
markdown_extensions: | ||
- toc: | ||
permalink: true | ||
plugins: | ||
- gen-files: | ||
scripts: | ||
- generate_client_api_pages.py | ||
- search | ||
- autorefs | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
options: | ||
members_order: "source" | ||
heading_level: 2 | ||
show_source: false | ||
allow_inspection: false | ||
merge_init_into_class: true | ||
docstring_style: "sphinx" | ||
show_bases: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Oops, something went wrong.