py2docfx 0.1.9.dev1817546__py3-none-any.whl → 0.1.9.dev1818320__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.
- py2docfx/__main__.py +23 -11
- {py2docfx-0.1.9.dev1817546.dist-info → py2docfx-0.1.9.dev1818320.dist-info}/METADATA +2 -2
- {py2docfx-0.1.9.dev1817546.dist-info → py2docfx-0.1.9.dev1818320.dist-info}/RECORD +5 -5
- {py2docfx-0.1.9.dev1817546.dist-info → py2docfx-0.1.9.dev1818320.dist-info}/WHEEL +1 -1
- {py2docfx-0.1.9.dev1817546.dist-info → py2docfx-0.1.9.dev1818320.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -217,10 +217,13 @@ def parse_command_line_args(argv) -> (
|
|
217
217
|
|
218
218
|
def install_required_packages(
|
219
219
|
required_package_list: list[PackageInfo], github_token: str, ado_token: str):
|
220
|
+
start_time = time.time()
|
220
221
|
for idx, package in enumerate(required_package_list):
|
221
222
|
if package.install_type == package.InstallType.SOURCE_CODE:
|
222
223
|
get_source(package, idx, vststoken=ado_token, githubtoken=github_token)
|
223
224
|
install_package(package)
|
225
|
+
end_time = time.time()
|
226
|
+
print(f"<install_required_packages>{start_time-end_time}<install_required_packages/>")
|
224
227
|
|
225
228
|
def donwload_package_generate_documents(
|
226
229
|
package_info_list: list[PackageInfo],
|
@@ -229,18 +232,29 @@ def donwload_package_generate_documents(
|
|
229
232
|
github_token: str, ado_token: str, start_num: int):
|
230
233
|
|
231
234
|
for idx, package in enumerate(package_info_list):
|
232
|
-
start_time = time.time()
|
233
235
|
package_number = start_num + idx
|
236
|
+
start_time = time.time()
|
234
237
|
get_source(package, package_number, vststoken=ado_token, githubtoken=github_token)
|
238
|
+
end_time = time.time()
|
239
|
+
print(f"<get_source>{package.name},{start_time-end_time}<get_source/>")
|
240
|
+
|
241
|
+
start_time = time.time()
|
235
242
|
install_package(package)
|
243
|
+
end_time = time.time()
|
244
|
+
print(f"<install_package>{package.name},{start_time-end_time}<install_package/>")
|
245
|
+
|
246
|
+
start_time = time.time()
|
236
247
|
generate_document(package, output_root)
|
248
|
+
end_time = time.time()
|
249
|
+
print(f"<generate_document>{package.name},{start_time-end_time}<generate_document/>")
|
250
|
+
|
251
|
+
start_time = time.time()
|
237
252
|
merge_toc(YAML_OUTPUT_ROOT, package.path.yaml_output_folder)
|
253
|
+
end_time = time.time()
|
254
|
+
print(f"<merge_toc>{package.name},{start_time-end_time}<merge_toc/>")
|
255
|
+
|
238
256
|
if output_doc_folder:
|
239
257
|
package.path.move_document_to_target(os.path.join(output_doc_folder, package.name))
|
240
|
-
end_time = time.time()
|
241
|
-
print(f"Time to download package {package.name} and generate documents: {end_time - start_time} seconds")
|
242
|
-
with open(os.path.join(PACKAGE_ROOT, "time.txt"), "a") as f:
|
243
|
-
f.write(f"Time to download package {package.name} and generate documents: {end_time - start_time} seconds\n")
|
244
258
|
if output_doc_folder:
|
245
259
|
move_root_toc_to_target(YAML_OUTPUT_ROOT, output_doc_folder)
|
246
260
|
|
@@ -270,20 +284,18 @@ def main(argv) -> int:
|
|
270
284
|
raise ValueError("""Please run in a virtual env to prevent breaking your dev
|
271
285
|
environment when not running on pipeliens""")
|
272
286
|
output_doc_folder = prepare_out_dir(output_root)
|
287
|
+
|
273
288
|
start_time = time.time()
|
274
289
|
install_required_packages(required_package_list, github_token, ado_token)
|
275
290
|
end_time = time.time()
|
276
|
-
print(f"
|
277
|
-
|
278
|
-
f.write(f"Time to install required packages: {end_time - start_time} seconds\n")
|
291
|
+
print(f"<install_required_packages>{start_time-end_time}<install_required_packages/>")
|
292
|
+
|
279
293
|
start_time = time.time()
|
280
294
|
donwload_package_generate_documents(
|
281
295
|
package_info_list, output_root, output_doc_folder,
|
282
296
|
github_token, ado_token, len(list(required_package_list)))
|
283
297
|
end_time = time.time()
|
284
|
-
print(f"
|
285
|
-
with open(os.path.join(PACKAGE_ROOT, "time.txt"), "a") as f:
|
286
|
-
f.write(f"Time to download packages and generate documents: {end_time - start_time} seconds\n")
|
298
|
+
print(f"<donwload_package_generate_documents>{start_time-end_time}<donwload_package_generate_documents/>")
|
287
299
|
return 0
|
288
300
|
|
289
301
|
if __name__ == "__main__":
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.9.
|
3
|
+
Version: 0.1.9.dev1818320
|
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
|
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
12
12
|
Requires-Python: >=3.9
|
13
|
-
Requires-Dist: sphinx
|
13
|
+
Requires-Dist: sphinx==6.1.3
|
14
14
|
Requires-Dist: pyyaml
|
15
15
|
Requires-Dist: wheel
|
16
16
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
2
|
-
py2docfx/__main__.py,sha256=
|
2
|
+
py2docfx/__main__.py,sha256=YdTYVT4zBUxFI8AoK4L0k_RV8snAYGdUAxdVrH6wo04,11881
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/environment.py,sha256=AwS4c4OSwVdxlExBLVo310HrVhFMhWQ2Wh9RJPJKH1c,894
|
5
5
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
@@ -123,7 +123,7 @@ py2docfx/docfx_yaml/tests/roots/test-writer-uri/conf.py,sha256=avcbnIOV2mlGQwhMQ
|
|
123
123
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/code_with_version_directives.py,sha256=UuizbrJPaG_PcaH18BvbI9KQevOaLd4SslpnzMSqcrE,1030
|
124
124
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/conf.py,sha256=SCEKrm9VigArfdgf-GAieJD-40d0ctT6urmGIjFOZLM,404
|
125
125
|
py2docfx/docfx_yaml/tests/utils/test_utils.py,sha256=d0OYSUQ6NyoZx5mlLdNGGNhiNmmQhjVT4hQ6jY3VE_M,3383
|
126
|
-
py2docfx-0.1.9.
|
127
|
-
py2docfx-0.1.9.
|
128
|
-
py2docfx-0.1.9.
|
129
|
-
py2docfx-0.1.9.
|
126
|
+
py2docfx-0.1.9.dev1818320.dist-info/METADATA,sha256=gLehVEZCsLViVvw8ALhfoU4iWYY4ZuKRePORIIqZ9Q8,600
|
127
|
+
py2docfx-0.1.9.dev1818320.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
128
|
+
py2docfx-0.1.9.dev1818320.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
129
|
+
py2docfx-0.1.9.dev1818320.dist-info/RECORD,,
|
File without changes
|