py2docfx 0.1.11.dev1859874__py3-none-any.whl → 0.1.11.dev1860114__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 +1 -35
- {py2docfx-0.1.11.dev1859874.dist-info → py2docfx-0.1.11.dev1860114.dist-info}/METADATA +1 -1
- {py2docfx-0.1.11.dev1859874.dist-info → py2docfx-0.1.11.dev1860114.dist-info}/RECORD +5 -5
- {py2docfx-0.1.11.dev1859874.dist-info → py2docfx-0.1.11.dev1860114.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.11.dev1859874.dist-info → py2docfx-0.1.11.dev1860114.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -18,7 +18,6 @@ from py2docfx.convert_prepare.params import load_file_params, load_command_param
|
|
18
18
|
from py2docfx.convert_prepare.package_info import PackageInfo
|
19
19
|
|
20
20
|
CLEAN_UP_FOLDERS = ["dist_temp", "source_repo", "target_repo", "venv"]
|
21
|
-
CACHED_VIRTUALENV_LENGTH = 5
|
22
21
|
|
23
22
|
print("Adding yaml extension to path")
|
24
23
|
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)),'docfx_yaml'))
|
@@ -227,20 +226,6 @@ def donwload_package_generate_documents(
|
|
227
226
|
github_token: str, ado_token: str):
|
228
227
|
|
229
228
|
venv_manager = VirtualEnvironmentManager(package_info_list, required_package_list, github_token, ado_token)
|
230
|
-
def initial_venv_cache():
|
231
|
-
package_count = len(package_info_list)
|
232
|
-
cache_cout = CACHED_VIRTUALENV_LENGTH
|
233
|
-
if package_count < CACHED_VIRTUALENV_LENGTH:
|
234
|
-
cache_cout = package_count
|
235
|
-
|
236
|
-
threads = []
|
237
|
-
for i in range(cache_cout):
|
238
|
-
thread = threading.Thread(target = venv_manager.create_template_venv, args=[str(i)])
|
239
|
-
threads.append(thread)
|
240
|
-
thread.start()
|
241
|
-
|
242
|
-
for thread in threads:
|
243
|
-
thread.join()
|
244
229
|
|
245
230
|
def donwload_one_package_generate_document(
|
246
231
|
package: PackageInfo,
|
@@ -274,25 +259,10 @@ def donwload_package_generate_documents(
|
|
274
259
|
if output_doc_folder:
|
275
260
|
package.path.move_document_to_target(os.path.join(output_doc_folder, package.name))
|
276
261
|
|
277
|
-
# Cache virtual environments
|
278
|
-
start_time = time.time()
|
279
|
-
initial_venv_cache()
|
280
|
-
end_time = time.time()
|
281
|
-
print(f"<initial_venv_cache>{end_time - start_time}<initial_venv_cache/>")
|
282
|
-
|
283
262
|
for package_index, package in enumerate(package_info_list):
|
284
263
|
worker_venv_id = str(package_index)
|
264
|
+
venv_manager.create_template_venv(worker_venv_id)
|
285
265
|
env_executable = os.path.join(PACKAGE_ROOT, "venv", worker_venv_id, "Scripts", "python.exe")
|
286
|
-
# check if the venv is created
|
287
|
-
if not os.path.exists(env_executable):
|
288
|
-
raise RuntimeError(f"Virtual environment for {package.name} is not avaliable")
|
289
|
-
|
290
|
-
# start caching new venv
|
291
|
-
cache_condition = package_index + CACHED_VIRTUALENV_LENGTH < len(package_info_list)
|
292
|
-
if cache_condition:
|
293
|
-
cache_venv_id = str(package_index + CACHED_VIRTUALENV_LENGTH)
|
294
|
-
thread = threading.Thread(target = venv_manager.create_template_venv, args=[cache_venv_id])
|
295
|
-
thread.start()
|
296
266
|
|
297
267
|
start_time = time.time()
|
298
268
|
donwload_one_package_generate_document(package, package_index, env_executable)
|
@@ -302,10 +272,6 @@ def donwload_package_generate_documents(
|
|
302
272
|
# used venv clean up
|
303
273
|
folder_clean_up(os.path.join(PACKAGE_ROOT, "venv", worker_venv_id))
|
304
274
|
|
305
|
-
# wait for the new venv to be cached
|
306
|
-
if cache_condition:
|
307
|
-
thread.join()
|
308
|
-
|
309
275
|
if output_doc_folder:
|
310
276
|
start_time = time.time()
|
311
277
|
move_root_toc_to_target(YAML_OUTPUT_ROOT, output_doc_folder)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.11.
|
3
|
+
Version: 0.1.11.dev1860114
|
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
|
@@ -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=P4RwwgS0YVEMK3xIBCTZrw8OIxRIpJrrQxqYLH3sj9s,12230
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/environment.py,sha256=r_Jp3hL_wGsM0ZkliFjJOC_jiFbEh90Wmw2ZXhn_MwI,2955
|
5
5
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
@@ -1883,7 +1883,7 @@ py2docfx/venv/0/Scripts/rst2s5.py,sha256=qup0-LMkBGLuh6Bj-1n8ucEVc5T8ANpqL0Pscmp
|
|
1883
1883
|
py2docfx/venv/0/Scripts/rst2xetex.py,sha256=FNBX2UuBN3vqJQss_DdqjMBSU5BQmOFGLOZV8DSNAuk,905
|
1884
1884
|
py2docfx/venv/0/Scripts/rst2xml.py,sha256=7uyNsZb5QOV243R-EQqdsyUKX7t5_9sQd6LYtw1ZyPA,634
|
1885
1885
|
py2docfx/venv/0/Scripts/rstpep2html.py,sha256=p-PYRUWuvD1LWAzofxrQu_Go3SMfIS8q0pmy6HT2Y5E,702
|
1886
|
-
py2docfx-0.1.11.
|
1887
|
-
py2docfx-0.1.11.
|
1888
|
-
py2docfx-0.1.11.
|
1889
|
-
py2docfx-0.1.11.
|
1886
|
+
py2docfx-0.1.11.dev1860114.dist-info/METADATA,sha256=LRP6G8OtE9VxqVKKEjUTInDQ8klTIVIlqNicrpERhqY,601
|
1887
|
+
py2docfx-0.1.11.dev1860114.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
1888
|
+
py2docfx-0.1.11.dev1860114.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
1889
|
+
py2docfx-0.1.11.dev1860114.dist-info/RECORD,,
|
File without changes
|
File without changes
|