Skip to content

Commit 8e2b30a

Browse files
author
cezary.maszczyk
committed
docs: Update docs for v2.1.18.0
1 parent 74ba7de commit 8e2b30a

File tree

239 files changed

+53
-37341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+53
-37341
lines changed

docs/build.py

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
import argparse
22
import os
3+
import shutil
34
import subprocess
45
import sys
56

7+
curr_dir_path: str = os.path.dirname(os.path.realpath(__file__))
68

7-
def build_docs(version_number: str):
8-
"""Build docs for specific version number
99

10-
Args:
11-
version_number (str): version number without "v" prefix
12-
"""
10+
def build_docs_using_sphinx(version_number: str):
1311
print(f"Building docs for version v{version_number}")
1412
if version_number[0] == 'v':
1513
raise ValueError(
1614
'Please provide version number without "v" prefix')
17-
curr_dir_path: str = os.path.dirname(os.path.realpath(__file__))
15+
1816
python_path: str = sys.executable
17+
output_path: str = f'{curr_dir_path}/serve/v{version_number}'
1918
output = subprocess.check_output(
20-
f"{python_path} -m sphinx.cmd.build -M html source {curr_dir_path}/serve/v{version_number}"
19+
f"{python_path} -m sphinx.cmd.build -M html source {output_path}"
2120
)
2221
print(output.decode())
22+
23+
tmp_path: str = f'{output_path}@'
24+
shutil.move(output_path, tmp_path)
25+
shutil.move(os.path.join(tmp_path, 'html'), output_path)
26+
shutil.rmtree(tmp_path)
27+
28+
29+
def update_index_html(version_number: str):
2330
with open(os.path.join(curr_dir_path, 'serve', 'index.html'), 'r', encoding='utf-8') as index_html:
2431
content: str = index_html.read()
2532
content = content.replace('(latest)', '')
@@ -36,7 +43,6 @@ def build_docs(version_number: str):
3643
)
3744
with open(os.path.join(curr_dir_path, 'serve', 'index.html'), 'w', encoding='utf-8') as index_html:
3845
index_html.write(content)
39-
exit(1)
4046

4147

4248
def main():
@@ -45,7 +51,9 @@ def main():
4551
)
4652
parser.add_argument('version_number')
4753
args = parser.parse_args()
48-
build_docs(args.version_number)
54+
55+
build_docs_using_sphinx(args.version_number)
56+
update_index_html(args.version_number)
4957

5058

5159
if __name__ == "__main__":

docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ nbsphinx==0.9.3
55
sphinx-copybutton==0.5.2
66
ipykernel==5.5.0
77
pandoc~=2.3
8+
ipython_genutils~=0.2.0
89
../
910

-4.71 KB
Binary file not shown.

docs/serve/2.1.18.0/doctrees/nbsphinx/rst/whats_new/v2.1.18.0.ipynb

-121
This file was deleted.
-31.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/serve/2.1.18.0/html/rst/tutorials.html

-133
This file was deleted.

0 commit comments

Comments
 (0)