py2docfx 0.1.1.dev1633054__py3-none-any.whl → 0.1.1.dev1634453__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,8 +226,8 @@ def build_finished(app, exception):
226
226
  # Order matters here, we need modules before lower level classes,
227
227
  # so that we can make sure to inject the TOC properly
228
228
  # put app.env.docfx_yaml_packages after app.env.docfx_yaml_modules to keep same TOC items order
229
- for data_set in (app.env.docfx_yaml_modules,
230
- app.env.docfx_yaml_packages,
229
+ for data_set in (app.env.docfx_yaml_packages,
230
+ app.env.docfx_yaml_modules,
231
231
  app.env.docfx_yaml_classes,
232
232
  app.env.docfx_yaml_functions): # noqa
233
233
 
@@ -262,12 +262,28 @@ def build_finished(app, exception):
262
262
 
263
263
  build_nested_toc(toc_yaml, uid)
264
264
 
265
+ index_children = []
266
+ index_references = []
267
+
268
+ def form_index_references_and_children(yaml_data, index_children, index_references):
269
+ if yaml_data[0].get('type', None) in ['package', 'module']:
270
+ index_children.append(yaml_data[0].get('fullName', ''))
271
+ index_references.append({
272
+ 'uid': yaml_data[0].get('fullName', ''),
273
+ 'name': yaml_data[0].get('fullName', ''),
274
+ 'fullname': yaml_data[0].get('fullName', ''),
275
+ 'isExternal': False
276
+ })
277
+
265
278
  for data_set in (app.env.docfx_yaml_packages,
266
279
  app.env.docfx_yaml_modules,
267
280
  app.env.docfx_yaml_classes,
268
281
  app.env.docfx_yaml_functions): # noqa
269
282
 
270
283
  for uid, yaml_data in iter(sorted(data_set.items())):
284
+
285
+ form_index_references_and_children(yaml_data, index_children, index_references)
286
+
271
287
  # Output file
272
288
  if uid.lower() in file_name_set:
273
289
  filename = uid + "(%s)" % app.env.docfx_info_uid_types[uid]
@@ -316,16 +332,6 @@ def build_finished(app, exception):
316
332
  )
317
333
 
318
334
  index_file = os.path.join(normalized_outdir, 'index.yml')
319
- index_children = []
320
- index_references = []
321
- for item in toc_yaml:
322
- index_children.append(item.get('name', ''))
323
- index_references.append({
324
- 'uid': item.get('name', ''),
325
- 'name': item.get('name', ''),
326
- 'fullname': item.get('name', ''),
327
- 'isExternal': False
328
- })
329
335
 
330
336
  index_obj = [{
331
337
  'uid': 'project-' + app.config.project,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2docfx
3
- Version: 0.1.1.dev1633054
3
+ Version: 0.1.1.dev1634453
4
4
  Summary: A package built based on Sphinx which download source code package and generate yaml files supported by docfx.
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -52,7 +52,7 @@ py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure
52
52
  py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  py2docfx/docfx_yaml/__init__.py,sha256=KCEizAXv-SXtrYhvFfLHdBWDhz51AA9uagaeTL-Itpo,100
55
- py2docfx/docfx_yaml/build_finished.py,sha256=kiVhZeAwomT03wHryDpE7NBvX2GEDbvmR49uPhNnBJQ,13909
55
+ py2docfx/docfx_yaml/build_finished.py,sha256=kJemkgnh9NIzn4E8jcAIaP7vb7wcHzdLl7yWUjoZbi8,14218
56
56
  py2docfx/docfx_yaml/build_init.py,sha256=lAw-fnBVQbySfZ7Sut_NpFQUjnqLOmnGQrTBBH2RXcg,1860
57
57
  py2docfx/docfx_yaml/common.py,sha256=UN1MUmjUoN1QSFDR1Cm_bfRuHr6FQiOe5VQV6s8xzjc,6841
58
58
  py2docfx/docfx_yaml/convert_class.py,sha256=boKDaxnXbnLxja62UFXi3eChGDB_WBW6ouUUJgOhdpE,2098
@@ -118,7 +118,7 @@ py2docfx/docfx_yaml/tests/roots/test-writer-table/conf.py,sha256=avcbnIOV2mlGQwh
118
118
  py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py,sha256=bzWTZpY2yf_By2bOSl1GFaY3BsZpkAvwQuGztlcHKkQ,537
119
119
  py2docfx/docfx_yaml/tests/roots/test-writer-uri/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
120
120
  py2docfx/docfx_yaml/tests/utils/test_utils.py,sha256=d0OYSUQ6NyoZx5mlLdNGGNhiNmmQhjVT4hQ6jY3VE_M,3383
121
- py2docfx-0.1.1.dev1633054.dist-info/METADATA,sha256=5Km1IOXue9xzG-3RHqHLmtjz-mSxO-KENvpQ25nttbc,601
122
- py2docfx-0.1.1.dev1633054.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
123
- py2docfx-0.1.1.dev1633054.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
124
- py2docfx-0.1.1.dev1633054.dist-info/RECORD,,
121
+ py2docfx-0.1.1.dev1634453.dist-info/METADATA,sha256=XfpKGVTZ-8Ssk8irwITI0HQrO81zcqrTBB-oL5L1UgM,601
122
+ py2docfx-0.1.1.dev1634453.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
123
+ py2docfx-0.1.1.dev1634453.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
124
+ py2docfx-0.1.1.dev1634453.dist-info/RECORD,,