File tree Expand file tree Collapse file tree 2 files changed +0
-17
lines changed
tools/tensorflow_docs/api_generator Expand file tree Collapse file tree 2 files changed +0
-17
lines changed Original file line number Diff line number Diff line change 15
15
"""Generate tensorflow.org style API Reference docs for a Python module."""
16
16
17
17
import collections
18
- import importlib
19
18
import inspect
20
19
import os
21
20
import pathlib
@@ -576,24 +575,11 @@ def write_docs(
576
575
toc_gen = GenerateToc (module_children )
577
576
toc_dict = toc_gen .generate ()
578
577
579
- # Replace the overview path *only* for 'TensorFlow' to
580
- # `/api_docs/python/tf_overview`. This will be redirected to
581
- # `/api_docs/python/tf`.
582
- toc_values = toc_dict ['toc' ][0 ]
583
- if toc_values ['title' ] == 'tf' :
584
- section = toc_values ['section' ][0 ]
585
- section ['path' ] = str (site_path / 'tf_overview' )
586
-
587
578
leftnav_toc = output_dir / root_module_name / '_toc.yaml'
588
579
with open (leftnav_toc , 'w' ) as toc_file :
589
580
yaml .dump (toc_dict , toc_file , default_flow_style = False )
590
581
591
582
if redirects and gen_redirects :
592
- if yaml_toc and toc_values ['title' ] == 'tf' :
593
- redirects .append ({
594
- 'from' : str (site_path / 'tf_overview' ),
595
- 'to' : str (site_path / 'tf' ),
596
- })
597
583
redirects_dict = {
598
584
'redirects' : sorted (redirects , key = lambda redirect : redirect ['from' ])
599
585
}
Original file line number Diff line number Diff line change @@ -114,9 +114,6 @@ def test_write(self):
114
114
'redirects' : [{
115
115
'from' : '/api_docs/python/tf/test_function' ,
116
116
'to' : '/api_docs/python/tf/TestModule/test_function'
117
- }, {
118
- 'from' : '/api_docs/python/tf_overview' ,
119
- 'to' : '/api_docs/python/tf'
120
117
}]
121
118
})
122
119
You can’t perform that action at this time.
0 commit comments