py2docfx 0.1.20.dev2246430__py3-none-any.whl → 0.1.20.dev2246607__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/docfx_yaml/logger.py +42 -28
- {py2docfx-0.1.20.dev2246430.dist-info → py2docfx-0.1.20.dev2246607.dist-info}/METADATA +1 -1
- {py2docfx-0.1.20.dev2246430.dist-info → py2docfx-0.1.20.dev2246607.dist-info}/RECORD +5 -5
- {py2docfx-0.1.20.dev2246430.dist-info → py2docfx-0.1.20.dev2246607.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.20.dev2246430.dist-info → py2docfx-0.1.20.dev2246607.dist-info}/top_level.txt +0 -0
py2docfx/docfx_yaml/logger.py
CHANGED
@@ -77,18 +77,18 @@ def counts_errors_warnings(log_file_path):
|
|
77
77
|
warning_count += 1
|
78
78
|
return warning_count, error_count
|
79
79
|
|
80
|
-
def get_warning_error_count():
|
81
|
-
main_log_file_path = os.path.join("logs", "log.txt")
|
82
|
-
warning_count, error_count = counts_errors_warnings(main_log_file_path)
|
83
|
-
|
84
|
-
log_folder_path = os.path.join("logs", "package_logs")
|
85
|
-
# Check if the directory exists before trying to list its contents
|
86
|
-
if os.path.exists(log_folder_path) and os.path.isdir(log_folder_path):
|
87
|
-
for log_file in os.listdir(log_folder_path):
|
88
|
-
log_file_path = os.path.join(log_folder_path, log_file)
|
89
|
-
warnings, errors = counts_errors_warnings(log_file_path)
|
90
|
-
warning_count += warnings
|
91
|
-
error_count += errors
|
80
|
+
def get_warning_error_count():
|
81
|
+
main_log_file_path = os.path.join("logs", "log.txt")
|
82
|
+
warning_count, error_count = counts_errors_warnings(main_log_file_path)
|
83
|
+
|
84
|
+
log_folder_path = os.path.join("logs", "package_logs")
|
85
|
+
# Check if the directory exists before trying to list its contents
|
86
|
+
if os.path.exists(log_folder_path) and os.path.isdir(log_folder_path):
|
87
|
+
for log_file in os.listdir(log_folder_path):
|
88
|
+
log_file_path = os.path.join(log_folder_path, log_file)
|
89
|
+
warnings, errors = counts_errors_warnings(log_file_path)
|
90
|
+
warning_count += warnings
|
91
|
+
error_count += errors
|
92
92
|
|
93
93
|
return warning_count, error_count
|
94
94
|
|
@@ -120,16 +120,16 @@ def print_out_log_by_log_level(log_list, log_level):
|
|
120
120
|
if log['level'] >= log_level and log['message'] not in ['', '\n', '\r\n']:
|
121
121
|
print(log['message'])
|
122
122
|
|
123
|
-
def output_log_by_log_level():
|
124
|
-
log_level = get_log_level()
|
125
|
-
main_log_file_path = os.path.join("logs", "log.txt")
|
126
|
-
print_out_log_by_log_level(parse_log(main_log_file_path), log_level)
|
127
|
-
|
128
|
-
package_logs_folder = os.path.join("logs", "package_logs")
|
129
|
-
# Check if the directory exists before trying to list its contents
|
130
|
-
if os.path.exists(package_logs_folder) and os.path.isdir(package_logs_folder):
|
131
|
-
for log_file in os.listdir(package_logs_folder):
|
132
|
-
log_file_path = os.path.join(package_logs_folder, log_file)
|
123
|
+
def output_log_by_log_level():
|
124
|
+
log_level = get_log_level()
|
125
|
+
main_log_file_path = os.path.join("logs", "log.txt")
|
126
|
+
print_out_log_by_log_level(parse_log(main_log_file_path), log_level)
|
127
|
+
|
128
|
+
package_logs_folder = os.path.join("logs", "package_logs")
|
129
|
+
# Check if the directory exists before trying to list its contents
|
130
|
+
if os.path.exists(package_logs_folder) and os.path.isdir(package_logs_folder):
|
131
|
+
for log_file in os.listdir(package_logs_folder):
|
132
|
+
log_file_path = os.path.join(package_logs_folder, log_file)
|
133
133
|
print_out_log_by_log_level(parse_log(log_file_path), log_level)
|
134
134
|
|
135
135
|
async def run_async_subprocess(exe_path, cmd, logger, cwd=None):
|
@@ -148,9 +148,16 @@ async def run_async_subprocess(exe_path, cmd, logger, cwd=None):
|
|
148
148
|
)
|
149
149
|
stdout, stderr = await process.communicate()
|
150
150
|
if process.returncode != 0:
|
151
|
-
|
152
|
-
|
153
|
-
|
151
|
+
# Log both stdout and stderr on failure - pip often outputs detailed
|
152
|
+
# dependency resolution errors to stdout even when it fails
|
153
|
+
stdout_msg = stdout.decode('utf-8')
|
154
|
+
stderr_msg = stderr.decode('utf-8')
|
155
|
+
|
156
|
+
if stdout_msg and stdout_msg.strip():
|
157
|
+
logger.error(f"STDOUT: {stdout_msg}")
|
158
|
+
if stderr_msg and stderr_msg.strip():
|
159
|
+
logger.error(f"STDERR: {stderr_msg}")
|
160
|
+
|
154
161
|
raise subprocess.CalledProcessError(process.returncode, cmd, stdout, stderr)
|
155
162
|
else:
|
156
163
|
msg = stdout.decode('utf-8')
|
@@ -174,9 +181,16 @@ async def run_async_subprocess_without_executable(cmd, logger, cwd=None):
|
|
174
181
|
|
175
182
|
stdout, stderr = await process.communicate()
|
176
183
|
if process.returncode != 0:
|
177
|
-
|
178
|
-
|
179
|
-
|
184
|
+
# Log both stdout and stderr on failure - pip often outputs detailed
|
185
|
+
# dependency resolution errors to stdout even when it fails
|
186
|
+
stdout_msg = stdout.decode('utf-8')
|
187
|
+
stderr_msg = stderr.decode('utf-8')
|
188
|
+
|
189
|
+
if stdout_msg and stdout_msg.strip():
|
190
|
+
logger.error(f"STDOUT: {stdout_msg}")
|
191
|
+
if stderr_msg and stderr_msg.strip():
|
192
|
+
logger.error(f"STDERR: {stderr_msg}")
|
193
|
+
|
180
194
|
raise subprocess.CalledProcessError(process.returncode, cmd, stdout, stderr)
|
181
195
|
else:
|
182
196
|
msg = stdout.decode('utf-8')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.20.
|
3
|
+
Version: 0.1.20.dev2246607
|
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
|
@@ -66,7 +66,7 @@ py2docfx/docfx_yaml/convert_enum.py,sha256=HX6qdjDbdbBblx-TH41JXBLIJY3wzL3if-qnL
|
|
66
66
|
py2docfx/docfx_yaml/convert_module.py,sha256=GptO1MRwaQ2Qbu724F0kCDDQQTZe7mWOtrOp3Rzgl-I,2259
|
67
67
|
py2docfx/docfx_yaml/convert_package.py,sha256=Ep7PmvoLInDvY6OU5dveR6iVwyzGRkW3q6lX7yGJ0JE,2109
|
68
68
|
py2docfx/docfx_yaml/directives.py,sha256=zVVuNM_6AU9G6sbqL1UAyHHgPe7bkBWbthXI-PO5ez0,879
|
69
|
-
py2docfx/docfx_yaml/logger.py,sha256=
|
69
|
+
py2docfx/docfx_yaml/logger.py,sha256=brzFbSgQq3o3n2sy-2pk849AVpaUn1rhJfIs44IYa0Y,7537
|
70
70
|
py2docfx/docfx_yaml/miss_reference.py,sha256=NHoQtas0kvFsJXaR4fsk7kHjwV4aJobrr_Q30HaUc_I,2450
|
71
71
|
py2docfx/docfx_yaml/nodes.py,sha256=tBDi35jLJArlobl07DKOkmH2qz7dudXLp_kTUfR_r2w,412
|
72
72
|
py2docfx/docfx_yaml/parameter_utils.py,sha256=04wQCtbS-G2hWM5UGkL22s10LZLUbqbh3RM9rWGOToI,10897
|
@@ -3916,7 +3916,7 @@ py2docfx/venv/venv1/Lib/site-packages/wheel/_commands/convert.py,sha256=0wSJMU0m
|
|
3916
3916
|
py2docfx/venv/venv1/Lib/site-packages/wheel/_commands/pack.py,sha256=o3iwjfRHl7N9ul-M2kHbewLJZnqBLAWf0tzUCwoiTMw,3078
|
3917
3917
|
py2docfx/venv/venv1/Lib/site-packages/wheel/_commands/tags.py,sha256=Rv2ySVb8-qX3osKp3uJgxcIMXkjt43XUD0-zvC6KvnY,4775
|
3918
3918
|
py2docfx/venv/venv1/Lib/site-packages/wheel/_commands/unpack.py,sha256=Y_J7ynxPSoFFTT7H0fMgbBlVErwyDGcObgme5MBuz58,1021
|
3919
|
-
py2docfx-0.1.20.
|
3920
|
-
py2docfx-0.1.20.
|
3921
|
-
py2docfx-0.1.20.
|
3922
|
-
py2docfx-0.1.20.
|
3919
|
+
py2docfx-0.1.20.dev2246607.dist-info/METADATA,sha256=DMTGFlXb1gHppD4v-dxJA8UzZo-DG2wlNz8YDqraQZI,548
|
3920
|
+
py2docfx-0.1.20.dev2246607.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
3921
|
+
py2docfx-0.1.20.dev2246607.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
3922
|
+
py2docfx-0.1.20.dev2246607.dist-info/RECORD,,
|
File without changes
|
File without changes
|