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 1515"""Generate tensorflow.org style API Reference docs for a Python module."""
1616
1717import collections
18- import importlib
1918import inspect
2019import os
2120import pathlib
@@ -576,24 +575,11 @@ def write_docs(
576575 toc_gen = GenerateToc (module_children )
577576 toc_dict = toc_gen .generate ()
578577
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-
587578 leftnav_toc = output_dir / root_module_name / '_toc.yaml'
588579 with open (leftnav_toc , 'w' ) as toc_file :
589580 yaml .dump (toc_dict , toc_file , default_flow_style = False )
590581
591582 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- })
597583 redirects_dict = {
598584 'redirects' : sorted (redirects , key = lambda redirect : redirect ['from' ])
599585 }
Original file line number Diff line number Diff line change @@ -114,9 +114,6 @@ def test_write(self):
114114 'redirects' : [{
115115 'from' : '/api_docs/python/tf/test_function' ,
116116 'to' : '/api_docs/python/tf/TestModule/test_function'
117- }, {
118- 'from' : '/api_docs/python/tf_overview' ,
119- 'to' : '/api_docs/python/tf'
120117 }]
121118 })
122119
You can’t perform that action at this time.
0 commit comments