py2docfx 0.1.11.dev1985872__py3-none-any.whl → 0.1.11.dev1987375__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 +12 -7
- py2docfx/convert_prepare/environment.py +1 -1
- py2docfx/convert_prepare/generate_document.py +4 -4
- py2docfx/convert_prepare/get_source.py +2 -2
- py2docfx/convert_prepare/pack.py +4 -4
- py2docfx/convert_prepare/sphinx_caller.py +14 -6
- py2docfx/convert_prepare/tests/test_environment.py +0 -2
- py2docfx/convert_prepare/tests/test_get_source.py +1 -0
- py2docfx/convert_prepare/tests/test_pack.py +3 -1
- py2docfx/convert_prepare/tests/test_params.py +0 -1
- py2docfx/convert_prepare/tests/test_sphinx_caller.py +5 -4
- py2docfx/convert_prepare/tests/test_subpackage.py +1 -0
- py2docfx/docfx_yaml/build_finished.py +1 -1
- py2docfx/docfx_yaml/logger.py +12 -11
- py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py +0 -7
- py2docfx/docfx_yaml/tests/test_writer_uri.py +0 -4
- py2docfx/docfx_yaml/writer.py +1 -13
- {py2docfx-0.1.11.dev1985872.dist-info → py2docfx-0.1.11.dev1987375.dist-info}/METADATA +1 -1
- {py2docfx-0.1.11.dev1985872.dist-info → py2docfx-0.1.11.dev1987375.dist-info}/RECORD +21 -21
- {py2docfx-0.1.11.dev1985872.dist-info → py2docfx-0.1.11.dev1987375.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.11.dev1985872.dist-info → py2docfx-0.1.11.dev1987375.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -38,7 +38,7 @@ async def donwload_package_generate_documents(
|
|
38
38
|
for idx, package in enumerate(package_info_list):
|
39
39
|
os.environ['PROCESSING_PACKAGE_NAME'] = package.name
|
40
40
|
package_number = start_num + idx
|
41
|
-
py2docfx_logger = py2docfxLogger.
|
41
|
+
py2docfx_logger = py2docfxLogger.get_logger(__name__)
|
42
42
|
msg = f"Processing package {package.name}, env_prepare_tasks: {len(env_prepare_tasks)}"
|
43
43
|
py2docfx_logger.info(msg)
|
44
44
|
|
@@ -51,7 +51,7 @@ async def donwload_package_generate_documents(
|
|
51
51
|
|
52
52
|
generate_document(package, output_root,
|
53
53
|
py2docfxEnvironment.get_base_venv_sphinx_build_path(),
|
54
|
-
py2docfxEnvironment.get_venv_package_path(idx),
|
54
|
+
py2docfxEnvironment.get_venv_package_path(idx),
|
55
55
|
py2docfxEnvironment.get_base_venv_exe())
|
56
56
|
|
57
57
|
merge_toc(YAML_OUTPUT_ROOT, package.path.yaml_output_folder)
|
@@ -80,7 +80,7 @@ async def donwload_package_generate_documents(
|
|
80
80
|
msg = f"Removing venv {idx-py2docfxEnvironment.VENV_BUFFER}"
|
81
81
|
py2docfx_logger.info(msg)
|
82
82
|
await env_remove_tasks[idx-py2docfxEnvironment.VENV_BUFFER]
|
83
|
-
|
83
|
+
|
84
84
|
if output_doc_folder:
|
85
85
|
move_root_toc_to_target(YAML_OUTPUT_ROOT, output_doc_folder)
|
86
86
|
|
@@ -88,6 +88,12 @@ async def donwload_package_generate_documents(
|
|
88
88
|
if env_remove_tasks[idx] != None and not env_remove_tasks[idx].done():
|
89
89
|
await env_remove_tasks[idx]
|
90
90
|
|
91
|
+
def fishish_up():
|
92
|
+
warning_count, error_count = py2docfxLogger.get_warning_error_count()
|
93
|
+
py2docfxLogger.output_log_by_log_level()
|
94
|
+
print(f"Warning count: {warning_count}, Error count: {error_count}")
|
95
|
+
logging.shutdown()
|
96
|
+
|
91
97
|
def main(argv) -> int:
|
92
98
|
# TODO: may need to purge pip cache
|
93
99
|
(package_info_list,
|
@@ -116,12 +122,11 @@ def main(argv) -> int:
|
|
116
122
|
except Exception as e:
|
117
123
|
msg = f"An error occurred: {e}"
|
118
124
|
py2docfx_logger.error(msg)
|
125
|
+
fishish_up()
|
126
|
+
# asyncio.get_event_loop().stop()
|
119
127
|
raise
|
120
128
|
|
121
|
-
|
122
|
-
py2docfxLogger.output_log_by_log_level()
|
123
|
-
print(f"Warning count: {warning_count}, Error count: {error_count}")
|
124
|
-
logging.shutdown()
|
129
|
+
fishish_up()
|
125
130
|
return 0
|
126
131
|
|
127
132
|
if __name__ == "__main__":
|
@@ -11,7 +11,7 @@ from py2docfx.convert_prepare.subpackage import merge_subpackage_files
|
|
11
11
|
CONF_TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "conf_templates")
|
12
12
|
|
13
13
|
def generate_document(pkg: PackageInfo, output_root: str | os.PathLike, sphinx_build_path: str, extra_package_path: str, executable=sys.executable):
|
14
|
-
py2docfx_logger = get_package_logger(__name__)
|
14
|
+
py2docfx_logger = get_package_logger(__name__, pkg.name)
|
15
15
|
# Copy manual written RST from target doc repo
|
16
16
|
package_paths = pkg.path
|
17
17
|
if output_root:
|
@@ -33,7 +33,7 @@ def generate_document(pkg: PackageInfo, output_root: str | os.PathLike, sphinx_b
|
|
33
33
|
msg = f"<CI INFO>: Generating RST files for {pkg.name}."
|
34
34
|
py2docfx_logger.info(msg)
|
35
35
|
|
36
|
-
subpackages_rst_record = run_apidoc(package_paths.doc_folder, package_paths.source_folder,
|
36
|
+
subpackages_rst_record = run_apidoc(pkg.name, package_paths.doc_folder, package_paths.source_folder,
|
37
37
|
exclude_paths, pkg)
|
38
38
|
|
39
39
|
msg = f"<CI INFO>: Listing RST files:"
|
@@ -45,7 +45,7 @@ def generate_document(pkg: PackageInfo, output_root: str | os.PathLike, sphinx_b
|
|
45
45
|
py2docfx_logger.info(msg)
|
46
46
|
|
47
47
|
generate_conf(pkg, package_paths.doc_folder, CONF_TEMPLATE_DIR)
|
48
|
-
run_converter(package_paths.doc_folder, package_paths.yaml_output_folder, sphinx_build_path, extra_package_path, executable=executable)
|
48
|
+
run_converter(pkg.name, package_paths.doc_folder, package_paths.yaml_output_folder, sphinx_build_path, extra_package_path, executable=executable)
|
49
49
|
|
50
50
|
subpackages_path_record = {}
|
51
51
|
if pkg.build_in_subpackage:
|
@@ -53,6 +53,6 @@ def generate_document(pkg: PackageInfo, output_root: str | os.PathLike, sphinx_b
|
|
53
53
|
for (subpackage_name, subpackage_path) in subpackages_rst_record.items():
|
54
54
|
subpackage_yaml_path = os.path.join(subpackages_yaml_path, subpackage_name)
|
55
55
|
subpackages_path_record[subpackage_name] = subpackage_yaml_path
|
56
|
-
run_converter(subpackage_path, subpackage_yaml_path, sphinx_build_path, extra_package_path, executable=executable)
|
56
|
+
run_converter(pkg.name, subpackage_path, subpackage_yaml_path, sphinx_build_path, extra_package_path, executable=executable)
|
57
57
|
|
58
58
|
merge_subpackage_files(subpackages_path_record, package_paths.yaml_output_folder, pkg.name)
|
@@ -102,7 +102,7 @@ def get_source(executable: str, pkg: PackageInfo, cnt: int, vststoken=None, gith
|
|
102
102
|
)
|
103
103
|
# unpack the downloaded wheel file.
|
104
104
|
downloaded_dist_file = path.join(dist_dir, os.listdir(dist_dir)[0])
|
105
|
-
pack.unpack_dist(downloaded_dist_file)
|
105
|
+
pack.unpack_dist(pkg.name, downloaded_dist_file)
|
106
106
|
os.remove(downloaded_dist_file)
|
107
107
|
source_folder = path.join(
|
108
108
|
path.dirname(downloaded_dist_file),
|
@@ -112,7 +112,7 @@ def get_source(executable: str, pkg: PackageInfo, cnt: int, vststoken=None, gith
|
|
112
112
|
pip_utils.download(pkg.location, dist_dir, prefer_source_distribution=False)
|
113
113
|
# unpack the downloaded dist file.
|
114
114
|
downloaded_dist_file = path.join(dist_dir, os.listdir(dist_dir)[0])
|
115
|
-
pack.unpack_dist(downloaded_dist_file)
|
115
|
+
pack.unpack_dist(pkg.name, downloaded_dist_file)
|
116
116
|
os.remove(downloaded_dist_file)
|
117
117
|
if downloaded_dist_file.endswith(".tar.gz"):
|
118
118
|
downloaded_dist_file = downloaded_dist_file.rsplit(".", maxsplit=1)[
|
py2docfx/convert_prepare/pack.py
CHANGED
@@ -6,9 +6,9 @@ import sys
|
|
6
6
|
|
7
7
|
from py2docfx.docfx_yaml.logger import get_package_logger, log_subprocess_ouput
|
8
8
|
|
9
|
-
def unpack_dist(dist_file):
|
9
|
+
def unpack_dist(package_name, dist_file):
|
10
10
|
if dist_file.endswith(".whl"):
|
11
|
-
unpack_wheel(dist_file)
|
11
|
+
unpack_wheel(package_name, dist_file)
|
12
12
|
else:
|
13
13
|
unpack_compressed(dist_file)
|
14
14
|
|
@@ -20,11 +20,11 @@ def unpack_compressed(file_path):
|
|
20
20
|
shutil.unpack_archive(file_path, path.dirname(file_path))
|
21
21
|
|
22
22
|
|
23
|
-
def unpack_wheel(file_path):
|
23
|
+
def unpack_wheel(package_name, file_path):
|
24
24
|
"""
|
25
25
|
Transform a wheel file to a folder containing source code
|
26
26
|
"""
|
27
|
-
py2docfx_logger = get_package_logger(__name__)
|
27
|
+
py2docfx_logger = get_package_logger(__name__, package_name)
|
28
28
|
command = [sys.executable,
|
29
29
|
'-m',
|
30
30
|
'wheel',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import os
|
2
|
-
import sys
|
3
2
|
import subprocess
|
3
|
+
import sys
|
4
4
|
|
5
5
|
from py2docfx import PACKAGE_ROOT
|
6
6
|
from py2docfx.docfx_yaml.logger import get_package_logger,log_subprocess_ouput
|
@@ -11,14 +11,14 @@ from py2docfx.convert_prepare.subpackage import (get_subpackages,
|
|
11
11
|
|
12
12
|
DEBUG_SPHINX_FLAG = 'PY2DOCFX_DEBUG_SPHINX'
|
13
13
|
|
14
|
-
def run_apidoc(rst_path, source_code_path, exclude_paths, package_info: PackageInfo):
|
14
|
+
def run_apidoc(package_name, rst_path, source_code_path, exclude_paths, package_info: PackageInfo):
|
15
15
|
"""
|
16
16
|
Run sphinx-apidoc to generate RST inside rst_path folder
|
17
17
|
|
18
18
|
Replacing
|
19
19
|
https://apidrop.visualstudio.com/Content%20CI/_git/ReferenceAutomation?path=/Python/build.ps1&line=110&lineEnd=126&lineStartColumn=1&lineEndColumn=14&lineStyle=plain&_a=contents
|
20
20
|
"""
|
21
|
-
py2docfx_logger = get_package_logger(__name__)
|
21
|
+
py2docfx_logger = get_package_logger(__name__, package_name)
|
22
22
|
subfolderList = [name for name in
|
23
23
|
os.listdir(source_code_path)
|
24
24
|
if os.path.isdir(os.path.join(source_code_path, name))
|
@@ -49,7 +49,13 @@ def run_apidoc(rst_path, source_code_path, exclude_paths, package_info: PackageI
|
|
49
49
|
return subpackages_rst_record
|
50
50
|
|
51
51
|
|
52
|
-
def run_converter(
|
52
|
+
def run_converter(package_name: str,
|
53
|
+
rst_path,
|
54
|
+
out_path,
|
55
|
+
sphinx_build_path: str,
|
56
|
+
extra_package_path: str,
|
57
|
+
conf_path = None,
|
58
|
+
executable = sys.executable):
|
53
59
|
"""
|
54
60
|
Take rst files as input and run sphinx converter
|
55
61
|
|
@@ -58,7 +64,7 @@ def run_converter(rst_path, out_path, sphinx_build_path: str, extra_package_path
|
|
58
64
|
Replacing
|
59
65
|
https://apidrop.visualstudio.com/Content%20CI/_git/ReferenceAutomation?path=/Python/build.ps1&line=150&lineEnd=161&lineStartColumn=13&lineEndColumn=52&lineStyle=plain&_a=contents
|
60
66
|
"""
|
61
|
-
py2docfx_logger = get_package_logger(__name__)
|
67
|
+
py2docfx_logger = get_package_logger(__name__, package_name)
|
62
68
|
outdir = os.path.join(out_path, "_build")
|
63
69
|
|
64
70
|
# Sphinx/docutils have memory leak including linecaches, module-import-caches,
|
@@ -86,6 +92,8 @@ def run_converter(rst_path, out_path, sphinx_build_path: str, extra_package_path
|
|
86
92
|
env_tmp["PYTHONPATH"] = f"{extra_package_path};{package_root_parent};"
|
87
93
|
else:
|
88
94
|
env_tmp["PYTHONPATH"] = f"{extra_package_path}:{package_root_parent}:"
|
89
|
-
|
95
|
+
|
96
|
+
output = subprocess.run(sphinx_param, check=False, cwd=PACKAGE_ROOT, env=env_tmp, capture_output=True ,text=True)
|
90
97
|
log_subprocess_ouput(output, py2docfx_logger)
|
98
|
+
|
91
99
|
return outdir
|
@@ -5,6 +5,7 @@ import subprocess
|
|
5
5
|
import shutil
|
6
6
|
import glob
|
7
7
|
from os import path
|
8
|
+
|
8
9
|
from py2docfx.convert_prepare.pack import unpack_compressed, unpack_wheel
|
9
10
|
|
10
11
|
SRC_DIR = path.abspath("convert_prepare/tests/data/pack/")
|
@@ -107,7 +108,8 @@ def test_pack_unpack_wheel(tmp_path):
|
|
107
108
|
wheel_path = path.join(tmp_path / "wheel", wheel_name)
|
108
109
|
|
109
110
|
# unpack and assert the file list
|
110
|
-
|
111
|
+
package_name = wheel_name.split("-")[0]
|
112
|
+
unpack_wheel(package_name, wheel_path)
|
111
113
|
_assert_file_list_same(
|
112
114
|
path.abspath("convert_prepare/tests/data/pack"),
|
113
115
|
tmp_path / "wheel" / "foo-0.1",
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import pytest
|
2
1
|
import os
|
3
2
|
import shutil
|
4
3
|
import sphinx
|
@@ -27,7 +26,8 @@ def init_paths(tmp_path):
|
|
27
26
|
|
28
27
|
def test_run_apidoc(tmp_path):
|
29
28
|
rst_path, source_code_path = init_paths(tmp_path)
|
30
|
-
|
29
|
+
package_name = "testcode"
|
30
|
+
run_apidoc(package_name, rst_path, source_code_path, package_info.get_exluded_command(), package_info)
|
31
31
|
|
32
32
|
# List all files under rst_path
|
33
33
|
rst_list = os.listdir(rst_path)
|
@@ -37,7 +37,8 @@ def test_run_apidoc(tmp_path):
|
|
37
37
|
|
38
38
|
def test_run_converter(tmp_path):
|
39
39
|
rst_path, source_code_path = init_paths(tmp_path)
|
40
|
-
|
40
|
+
package_name = "testcode"
|
41
|
+
run_apidoc(package_name, rst_path, source_code_path, package_info.get_exluded_command(), package_info)
|
41
42
|
|
42
43
|
# prepare conf.py, index.rst and docfx_yaml
|
43
44
|
conf_path = os.path.abspath("convert_prepare/tests/data/sphinx_caller/conf.py")
|
@@ -49,7 +50,7 @@ def test_run_converter(tmp_path):
|
|
49
50
|
index_rst.write("")
|
50
51
|
|
51
52
|
out_path = os.path.join(tmp_path, "out")
|
52
|
-
out_path = run_converter(rst_path, out_path, sphinx_build_path = sphinx.cmd.build.__file__, extra_package_path = source_code_path, conf_path=rst_path)
|
53
|
+
out_path = run_converter(package_name, rst_path, out_path, sphinx_build_path = sphinx.cmd.build.__file__, extra_package_path = source_code_path, conf_path=rst_path)
|
53
54
|
|
54
55
|
if os.path.exists(out_path):
|
55
56
|
yaml_list = os.listdir(os.path.join(out_path, "docfx_yaml"))
|
@@ -315,7 +315,7 @@ def build_finished(app, exception):
|
|
315
315
|
if len(toc_yaml) == 0:
|
316
316
|
msg = "No documentation for this module."
|
317
317
|
py2docfx_logger.error(msg)
|
318
|
-
raise RuntimeError()
|
318
|
+
raise RuntimeError(msg)
|
319
319
|
|
320
320
|
toc_file = os.path.join(normalized_outdir, 'toc.yml')
|
321
321
|
with open(toc_file, 'w') as writable:
|
py2docfx/docfx_yaml/logger.py
CHANGED
@@ -36,6 +36,8 @@ def check_log_file_exists(log_file_path):
|
|
36
36
|
|
37
37
|
def setup_log_handlers(logger, log_file_name):
|
38
38
|
check_log_file_exists(log_file_name)
|
39
|
+
if logger.hasHandlers():
|
40
|
+
logger.handlers.clear()
|
39
41
|
file_handler = logging.FileHandler(filename=log_file_name, mode='a')
|
40
42
|
file_handler.setFormatter(logging.Formatter('%(levelname)s - %(name)s - %(message)s'))
|
41
43
|
logger.addHandler(file_handler)
|
@@ -49,23 +51,20 @@ def get_logger(logger_name: str):
|
|
49
51
|
file_logger = logging.getLogger(logger_name)
|
50
52
|
file_logger.setLevel(logging.INFO)
|
51
53
|
check_log_dir_exists(log_folder_path)
|
52
|
-
if file_logger.hasHandlers():
|
53
|
-
return file_logger
|
54
54
|
|
55
55
|
file_logger = setup_log_handlers(file_logger, file_name)
|
56
56
|
|
57
57
|
return file_logger
|
58
58
|
|
59
|
-
def get_package_logger(logger_name:str):
|
59
|
+
def get_package_logger(logger_name:str, package_name:str = None):
|
60
60
|
log_folder_path = os.path.join("logs", "package_logs")
|
61
|
-
package_name
|
61
|
+
if package_name is None:
|
62
|
+
package_name = os.environ.get('PROCESSING_PACKAGE_NAME')
|
62
63
|
file_name = os.path.join(log_folder_path, f"{package_name}.txt")
|
63
64
|
|
64
65
|
file_logger = logging.getLogger(logger_name)
|
65
66
|
file_logger.setLevel(logging.INFO)
|
66
67
|
check_log_dir_exists(log_folder_path)
|
67
|
-
if file_logger.hasHandlers():
|
68
|
-
return file_logger
|
69
68
|
|
70
69
|
file_logger = setup_log_handlers(file_logger, file_name)
|
71
70
|
|
@@ -81,8 +80,9 @@ def log_subprocess_ouput(subprocess_out: subprocess.CompletedProcess, logger: lo
|
|
81
80
|
continue
|
82
81
|
logger.warning(msg)
|
83
82
|
if subprocess_out.returncode != 0:
|
84
|
-
|
85
|
-
|
83
|
+
msg = f"Subprocess failed with return code {subprocess_out.returncode}"
|
84
|
+
logger.error(msg)
|
85
|
+
raise RuntimeError(msg)
|
86
86
|
|
87
87
|
def log_git_clone_subprocess_ouput(subprocess_out: subprocess.CompletedProcess, logger: logging.Logger):
|
88
88
|
if subprocess_out.stdout:
|
@@ -94,8 +94,9 @@ def log_git_clone_subprocess_ouput(subprocess_out: subprocess.CompletedProcess,
|
|
94
94
|
continue
|
95
95
|
logger.info(msg)
|
96
96
|
if subprocess_out.returncode != 0:
|
97
|
-
|
98
|
-
|
97
|
+
msg = f"Subprocess failed with return code {subprocess_out.returncode}"
|
98
|
+
logger.error(msg)
|
99
|
+
raise RuntimeError(msg)
|
99
100
|
|
100
101
|
def counts_errors_warnings(log_file_path):
|
101
102
|
error_count = 0
|
@@ -172,7 +173,7 @@ async def run_async_subprocess(exe_path, cmd):
|
|
172
173
|
msg = stderr.decode('utf-8')
|
173
174
|
if msg != None and msg != "":
|
174
175
|
py2docfx_logger.error(msg)
|
175
|
-
raise RuntimeError()
|
176
|
+
raise RuntimeError(msg)
|
176
177
|
else:
|
177
178
|
msg = stdout.decode('utf-8')
|
178
179
|
if msg != None and msg != "":
|
@@ -20,7 +20,6 @@ def test_http_link_in_summary_should_not_nest_parenthesis(app):
|
|
20
20
|
class_summary_result = transform_node(app, doctree[1][1][0])
|
21
21
|
method1_summary_result = transform_node(app, doctree[1][1][2][1])
|
22
22
|
method2_summary_result = transform_node(app, doctree[1][1][4][1])
|
23
|
-
method3_summary_result = transform_node(app, doctree[1][1][6][1])
|
24
23
|
|
25
24
|
# Assert
|
26
25
|
# Shouldn't see something like [title]((link))
|
@@ -29,10 +28,7 @@ def test_http_link_in_summary_should_not_nest_parenthesis(app):
|
|
29
28
|
"We should not generate nested parenthesis causing docs validation warnings\n")
|
30
29
|
method2_summary_expected = ("\n\n This isn't a content issue link ([https://www.microsoft.com](https://www.microsoft.com))\n "
|
31
30
|
"Should expect a transformed Markdown link.\n")
|
32
|
-
method3_summary_expected = ("\n\n This is a bare URL that shouldn't be transformed into a link\n "
|
33
|
-
"because it's in the exclusion list: `https://management.azure.com`\n")
|
34
31
|
assert(class_summary_expected == class_summary_result)
|
35
32
|
assert(method1_summary_expected == method1_summary_result)
|
36
33
|
assert(method2_summary_expected == method2_summary_result)
|
37
|
-
assert(method3_summary_expected == method3_summary_result)
|
38
34
|
|
py2docfx/docfx_yaml/writer.py
CHANGED
@@ -184,15 +184,6 @@ class MarkdownTranslator(nodes.NodeVisitor):
|
|
184
184
|
sectionchars = '*=-~"+`'
|
185
185
|
xref_template = "<xref:{0}>"
|
186
186
|
|
187
|
-
# URLs that shouldn't be automatically rendered as hyperlinks if found bare. Included because they appear
|
188
|
-
# frequently, get flagged by the broken link validator and/or there's no value to the user in
|
189
|
-
# making them clickable links.
|
190
|
-
urls_that_shouldnt_be_rendered_as_links = {
|
191
|
-
"https://management.azure.com",
|
192
|
-
"https://management.chinacloudapi.cn",
|
193
|
-
"https://management.usgovcloudapi.net"
|
194
|
-
}
|
195
|
-
|
196
187
|
def __init__(self, document, builder):
|
197
188
|
self.invdata = []
|
198
189
|
nodes.NodeVisitor.__init__(self, document)
|
@@ -936,10 +927,7 @@ class MarkdownTranslator(nodes.NodeVisitor):
|
|
936
927
|
match_content_issue_pattern = True
|
937
928
|
ref_string = node.attributes["refuri"]
|
938
929
|
if not match_content_issue_pattern:
|
939
|
-
|
940
|
-
ref_string = f'`{inner_text}`'
|
941
|
-
else:
|
942
|
-
ref_string = '[{}]({})'.format(node.astext(), node.attributes['refuri'])
|
930
|
+
ref_string = '[{}]({})'.format(node.astext(), node.attributes['refuri'])
|
943
931
|
else:
|
944
932
|
# only use id in class and func refuri if its id exists
|
945
933
|
# otherwise, remove '.html#' in refuri
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.11.
|
3
|
+
Version: 0.1.11.dev1987375
|
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,15 +1,15 @@
|
|
1
1
|
py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
2
|
-
py2docfx/__main__.py,sha256=
|
2
|
+
py2docfx/__main__.py,sha256=J6GZNN2VV9WTRUceRlhLoyelxlYKQNgs-VKbp2AEWjM,5777
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/arg_parser.py,sha256=Wa1iK8a0Gb3QqaS4X7nUPGvh-7mWhuBS9IVbmnjC770,7606
|
5
5
|
py2docfx/convert_prepare/constants.py,sha256=RC5DqNkqWvx4hb91FrajZ1R9dBFLxcPyoEJ43jdm36E,102
|
6
|
-
py2docfx/convert_prepare/environment.py,sha256=
|
6
|
+
py2docfx/convert_prepare/environment.py,sha256=SpXy3oE9QuDOXK5J3lJd3kl-oXGATUDxe0K137zngXY,6988
|
7
7
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
8
|
-
py2docfx/convert_prepare/generate_document.py,sha256=
|
9
|
-
py2docfx/convert_prepare/get_source.py,sha256=
|
8
|
+
py2docfx/convert_prepare/generate_document.py,sha256=NCxppk5AtDxq9RZQVHxMNMd2ropiGloXyfENog5A7Ro,2919
|
9
|
+
py2docfx/convert_prepare/get_source.py,sha256=AWkvjdobuoMGob_wBiw_SI5jeewcYUaCoaSZdGt4Hgc,5241
|
10
10
|
py2docfx/convert_prepare/git.py,sha256=OIoaX_0LG5ueY8zmUwrbxl_YyMxwLzgTp6g0uSkC2Y0,6617
|
11
11
|
py2docfx/convert_prepare/install_package.py,sha256=hATmgazcSX7k2n4jQXh9sQMyNUc1k1YqHv5K5UMALq4,262
|
12
|
-
py2docfx/convert_prepare/pack.py,sha256=
|
12
|
+
py2docfx/convert_prepare/pack.py,sha256=0VN7mr-O0oGRb1auGN9FNPDXLY-73q-HLP9bLfmQVIw,1670
|
13
13
|
py2docfx/convert_prepare/package_info.py,sha256=BBpiuLpnkbxio_k4H6afPQPPKQEMQYO62kvJQK3BDMg,7698
|
14
14
|
py2docfx/convert_prepare/package_info_extra_settings.py,sha256=u5B5e8hc0m9PA_-0kJzq1LtKn-xzZlucwXHTFy49mDg,1475
|
15
15
|
py2docfx/convert_prepare/params.py,sha256=PXMB8pLtb4XbfI322avA47q0AO-TyBE6kZf7FU8I6v4,1771
|
@@ -17,7 +17,7 @@ py2docfx/convert_prepare/paths.py,sha256=964RX81Qf__rzXgEATfqBNFCKTYVjLt9J7WCz2T
|
|
17
17
|
py2docfx/convert_prepare/pip_utils.py,sha256=GPWGUBcxW8JKreGwxZIAe9AWAI78aL1aFan8DvaAf1o,2228
|
18
18
|
py2docfx/convert_prepare/repo_info.py,sha256=6ASJlhBwf6vZTSENgrWCVlJjlJVhuBxzdQyWEdWAC4c,117
|
19
19
|
py2docfx/convert_prepare/source.py,sha256=6-A7oof3-WAQcQZZVpT9pKiFLH4CCIZeYqq0MN0O3gw,1710
|
20
|
-
py2docfx/convert_prepare/sphinx_caller.py,sha256=
|
20
|
+
py2docfx/convert_prepare/sphinx_caller.py,sha256=ugSffECOVSainUvOkwy399hiRtKsP1iGv2qdxlv46dc,4278
|
21
21
|
py2docfx/convert_prepare/subpackage.py,sha256=mXAi_07pXvnPkSLZfykDh_7VeFxfLy74pYlzhMO8N_Q,5183
|
22
22
|
py2docfx/convert_prepare/utils.py,sha256=TwfDjIqIx_nAoSeQ-LX30h_-d96WhPQcAu7P8N_tSjM,1618
|
23
23
|
py2docfx/convert_prepare/conf_templates/conf.py_t,sha256=8zxvY1WiG-z2aiSNDY0719C08QxZLXXEMwKfYSGN0ZE,3811
|
@@ -26,16 +26,16 @@ py2docfx/convert_prepare/post_process/merge_toc.py,sha256=DPUvL6eS0Q4gcp_fdGgWQJ
|
|
26
26
|
py2docfx/convert_prepare/subpackage_merge/merge_root_package.py,sha256=uK96qL2asuSfo_3SZaoP8XZaUvjf5mNkr17JNbZR4Lg,1026
|
27
27
|
py2docfx/convert_prepare/subpackage_merge/merge_toc.py,sha256=nkVqe8R0m8D6cyTYV7aIpMDXorvn4-LXfU_vIK_hJBg,1706
|
28
28
|
py2docfx/convert_prepare/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
py2docfx/convert_prepare/tests/test_environment.py,sha256=
|
29
|
+
py2docfx/convert_prepare/tests/test_environment.py,sha256=08oO7K7cDIOP3TNCVXh0bqYiok_sFpmBFOMbPYULLBk,2103
|
30
30
|
py2docfx/convert_prepare/tests/test_generate_document.py,sha256=Llt3szDunwmFKhHxc8fKuov_ci5rQokMcOgu5QNqt0U,2572
|
31
|
-
py2docfx/convert_prepare/tests/test_get_source.py,sha256=
|
32
|
-
py2docfx/convert_prepare/tests/test_pack.py,sha256=
|
31
|
+
py2docfx/convert_prepare/tests/test_get_source.py,sha256=49dgQrstyfokG4ZCM7tP6d33v2s7eGFpvb2EcR2GJzc,7711
|
32
|
+
py2docfx/convert_prepare/tests/test_pack.py,sha256=xP-Khnj1MfPdIYaUDwXdvXNlI-uHQT3ihZ5d9zCZ914,4195
|
33
33
|
py2docfx/convert_prepare/tests/test_package_info.py,sha256=3B-IzmUjETVO-5s3g3Lmh2E6JgopwnRauv8mB-SDZEM,3361
|
34
|
-
py2docfx/convert_prepare/tests/test_params.py,sha256=
|
34
|
+
py2docfx/convert_prepare/tests/test_params.py,sha256=itwmVdBMtU1qIXAGaIoaDfvTOYyAL2B_WLsaBV9KUZY,2232
|
35
35
|
py2docfx/convert_prepare/tests/test_post_process_merge_toc.py,sha256=YKOcn4_lf4syGsAvJ9BqpdUUc3SLfK4TiOX1lpXJT_Y,885
|
36
36
|
py2docfx/convert_prepare/tests/test_source.py,sha256=LNFZtvjz6QhVLOxatjWokYCCcoSm0bhTikMF9KoTPIE,2025
|
37
|
-
py2docfx/convert_prepare/tests/test_sphinx_caller.py,sha256=
|
38
|
-
py2docfx/convert_prepare/tests/test_subpackage.py,sha256=
|
37
|
+
py2docfx/convert_prepare/tests/test_sphinx_caller.py,sha256=Coeww4SrjYdtKYEktZvD2lQRnQZYSoQf6TmkFUxE0Uc,2701
|
38
|
+
py2docfx/convert_prepare/tests/test_subpackage.py,sha256=famt8LqwS8hCujtzvRLE5Ih8pa7t45y0d1EBk3UdYns,4984
|
39
39
|
py2docfx/convert_prepare/tests/data/generate_document/azure-dummy-sourcecode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
py2docfx/convert_prepare/tests/data/generate_document/azure-dummy-sourcecode/azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
py2docfx/convert_prepare/tests/data/generate_document/azure-dummy-sourcecode/azure/dummy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -57,7 +57,7 @@ py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure
|
|
57
57
|
py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
py2docfx/convert_prepare/tests/data/subpackage/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
59
|
py2docfx/docfx_yaml/__init__.py,sha256=KCEizAXv-SXtrYhvFfLHdBWDhz51AA9uagaeTL-Itpo,100
|
60
|
-
py2docfx/docfx_yaml/build_finished.py,sha256=
|
60
|
+
py2docfx/docfx_yaml/build_finished.py,sha256=M0YOIgr6lQY1lqwiAIDykhnsfOtTJ1ytKxmCr0JQp_E,13826
|
61
61
|
py2docfx/docfx_yaml/build_init.py,sha256=lAw-fnBVQbySfZ7Sut_NpFQUjnqLOmnGQrTBBH2RXcg,1860
|
62
62
|
py2docfx/docfx_yaml/common.py,sha256=UN1MUmjUoN1QSFDR1Cm_bfRuHr6FQiOe5VQV6s8xzjc,6841
|
63
63
|
py2docfx/docfx_yaml/convert_class.py,sha256=YaPjxqNy0p6AXi3H3T0l1MZeYRZ3dWkqusO4E0KT9QU,2161
|
@@ -65,7 +65,7 @@ py2docfx/docfx_yaml/convert_enum.py,sha256=HX6qdjDbdbBblx-TH41JXBLIJY3wzL3if-qnL
|
|
65
65
|
py2docfx/docfx_yaml/convert_module.py,sha256=GptO1MRwaQ2Qbu724F0kCDDQQTZe7mWOtrOp3Rzgl-I,2259
|
66
66
|
py2docfx/docfx_yaml/convert_package.py,sha256=Ep7PmvoLInDvY6OU5dveR6iVwyzGRkW3q6lX7yGJ0JE,2109
|
67
67
|
py2docfx/docfx_yaml/directives.py,sha256=zVVuNM_6AU9G6sbqL1UAyHHgPe7bkBWbthXI-PO5ez0,879
|
68
|
-
py2docfx/docfx_yaml/logger.py,sha256=
|
68
|
+
py2docfx/docfx_yaml/logger.py,sha256=2zcaZUXhI2jEaSYR-CZ5fVSenK-2Zm4qJLFoJH8BoZ4,6590
|
69
69
|
py2docfx/docfx_yaml/miss_reference.py,sha256=Btoj9wAvA4u_wU7JHH0Cei3910N8a7MS34OUqJvXAd4,2443
|
70
70
|
py2docfx/docfx_yaml/nodes.py,sha256=tBDi35jLJArlobl07DKOkmH2qz7dudXLp_kTUfR_r2w,412
|
71
71
|
py2docfx/docfx_yaml/parameter_utils.py,sha256=zGSIQrUfbXf9PUK-W_1K83Uo5Zk797Zlze6aMurbHIA,8706
|
@@ -75,7 +75,7 @@ py2docfx/docfx_yaml/settings.py,sha256=JQZNwFebczl-zn8Yk2taAGANRi-Hw8hywtDWxqXXF
|
|
75
75
|
py2docfx/docfx_yaml/translator.py,sha256=LSzNl4C-07bLbUZ5myfyWwh25cTNIIBih77Cp4tBWvo,25999
|
76
76
|
py2docfx/docfx_yaml/utils.py,sha256=m5jC_qP2NKqzUx_z0zgZ-HAmxQdNTpJYKkL_F9vGeII,1555
|
77
77
|
py2docfx/docfx_yaml/write_utils.py,sha256=q5qoYWw6GVDV8a3E8IxcSLWnN9sAer42VFRgadHBkgk,305
|
78
|
-
py2docfx/docfx_yaml/writer.py,sha256=
|
78
|
+
py2docfx/docfx_yaml/writer.py,sha256=rB_mwwCJfDNATKGHKnHBzWqxaOGfIHOTtJ_f_qsGB90,35313
|
79
79
|
py2docfx/docfx_yaml/yaml_builder.py,sha256=S3xty_ILxEUsw1J9VCwUkSLLYAUfQDm3fYbciv70gXc,2573
|
80
80
|
py2docfx/docfx_yaml/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
81
81
|
py2docfx/docfx_yaml/tests/conftest.py,sha256=CykkZxaDZ-3a1EIQdGBieSmHL9FdyTE2xTJZe9QgKcg,1214
|
@@ -91,7 +91,7 @@ py2docfx/docfx_yaml/tests/test_translator_numpy_returns.py,sha256=nmC70WUqCRcB1t
|
|
91
91
|
py2docfx/docfx_yaml/tests/test_translator_rst_returns.py,sha256=BL3nOMMTPzNPJk-P9oMANiXnJ7ocuiecbFHH4DU1n40,2942
|
92
92
|
py2docfx/docfx_yaml/tests/test_translator_signatures.py,sha256=DM51EOb4UXLkrO1-4cQQQvvX210goAsnxKJH-4A2U2Q,1537
|
93
93
|
py2docfx/docfx_yaml/tests/test_writer_table.py,sha256=UnGYXQ-QVxin_e-HGZAHdg1LSFV0qc480ZNsqPN9OYc,1444
|
94
|
-
py2docfx/docfx_yaml/tests/test_writer_uri.py,sha256=
|
94
|
+
py2docfx/docfx_yaml/tests/test_writer_uri.py,sha256=L9eFHZndD6H7nkznJ9Bw0v8xh9IegDlhhGFHBz9EHmM,1745
|
95
95
|
py2docfx/docfx_yaml/tests/test_writer_versions.py,sha256=0-0VTMhbZ4ml9ryu1gYnu0mM2yIEKsBuFYb2F6grzTE,2995
|
96
96
|
py2docfx/docfx_yaml/tests/roots/test-build-finished/code_with_signature_and_docstring.py,sha256=qvcKWL68C2aDTP8JT022nMV4EdZ50vhxVshMrHVO2sY,449
|
97
97
|
py2docfx/docfx_yaml/tests/roots/test-build-finished/conf.py,sha256=L8vIFmO546PCQks50Gif_uTBwC3cppohXrQaogfyRF8,410
|
@@ -123,7 +123,7 @@ py2docfx/docfx_yaml/tests/roots/test-translator-signatures/conf.py,sha256=avcbnI
|
|
123
123
|
py2docfx/docfx_yaml/tests/roots/test-translator-signatures/refered_objects.py,sha256=DJaX52mnHw9W3GSqKh75CYK87g4CczXNNjFO496Ai2U,79
|
124
124
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/code_with_table_desc.py,sha256=J4eFvXsymgFvjnwVUY0APtUGwuxvt-AFJjTaEaQ7zMQ,574
|
125
125
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
|
126
|
-
py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py,sha256=
|
126
|
+
py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py,sha256=bzWTZpY2yf_By2bOSl1GFaY3BsZpkAvwQuGztlcHKkQ,537
|
127
127
|
py2docfx/docfx_yaml/tests/roots/test-writer-uri/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
|
128
128
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/code_with_version_directives.py,sha256=UuizbrJPaG_PcaH18BvbI9KQevOaLd4SslpnzMSqcrE,1030
|
129
129
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/conf.py,sha256=SCEKrm9VigArfdgf-GAieJD-40d0ctT6urmGIjFOZLM,404
|
@@ -4193,7 +4193,7 @@ py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtas
|
|
4193
4193
|
py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_localsystem.py,sha256=08ojAS48W6RLsUbRD45j0SJhg_Y2NFHZT6qjT4Vrig0,75
|
4194
4194
|
py2docfx/venv/venv1/Scripts/pywin32_postinstall.py,sha256=u95n7QQUxpCjrZistYE-3gN451zXzopuJna8cXRQ4Jw,28115
|
4195
4195
|
py2docfx/venv/venv1/Scripts/pywin32_testall.py,sha256=-6yvZmd2lPQc4e8i6PgLsr_totF6mScvoq0Jqr0V2fM,3844
|
4196
|
-
py2docfx-0.1.11.
|
4197
|
-
py2docfx-0.1.11.
|
4198
|
-
py2docfx-0.1.11.
|
4199
|
-
py2docfx-0.1.11.
|
4196
|
+
py2docfx-0.1.11.dev1987375.dist-info/METADATA,sha256=APuVO3-KrZFlCm4q9jgcwFBLC1jHz9uVYkswsLhYuZ0,601
|
4197
|
+
py2docfx-0.1.11.dev1987375.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4198
|
+
py2docfx-0.1.11.dev1987375.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
4199
|
+
py2docfx-0.1.11.dev1987375.dist-info/RECORD,,
|
File without changes
|
File without changes
|