py2docfx 0.1.0.dev1464971__py3-none-any.whl → 0.1.0.dev1465062__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/convert_prepare/package_info.py +3 -0
- py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/__init__.py +0 -0
- py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/sourcecode/__init__.py +0 -0
- py2docfx/convert_prepare/tests/test_generate_document.py +11 -10
- py2docfx/convert_prepare/tests/test_package_info.py +1 -0
- py2docfx/convert_prepare/tests/test_sphinx_caller.py +2 -3
- {py2docfx-0.1.0.dev1464971.dist-info → py2docfx-0.1.0.dev1465062.dist-info}/METADATA +1 -1
- {py2docfx-0.1.0.dev1464971.dist-info → py2docfx-0.1.0.dev1465062.dist-info}/RECORD +12 -10
- /py2docfx/convert_prepare/tests/data/generate_document/{dummy_source_code → dummy-sourcecode/dummy/sourcecode}/boo/boo.py +0 -0
- /py2docfx/convert_prepare/tests/data/generate_document/{dummy_source_code → dummy-sourcecode/dummy/sourcecode}/foo/foo.py +0 -0
- {py2docfx-0.1.0.dev1464971.dist-info → py2docfx-0.1.0.dev1465062.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.0.dev1464971.dist-info → py2docfx-0.1.0.dev1465062.dist-info}/top_level.txt +0 -0
@@ -154,4 +154,7 @@ class PackageInfo:
|
|
154
154
|
for path in self.exclude_path
|
155
155
|
]
|
156
156
|
)
|
157
|
+
# exclude root package __init__.py, prevent generating azure.yml
|
158
|
+
root_package_name = [seg for seg in self.name.split('-') if seg][0]
|
159
|
+
exclude_path.append(os.path.join(code_location, f'{root_package_name}/__init__.py'))
|
157
160
|
return exclude_path
|
File without changes
|
py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/sourcecode/__init__.py
ADDED
File without changes
|
@@ -13,27 +13,26 @@ def test_generate_document(tmp_path):
|
|
13
13
|
Test the generate_document function.
|
14
14
|
"""
|
15
15
|
# init test case
|
16
|
-
source_code_path = "convert_prepare\\tests\\data\\generate_document
|
16
|
+
source_code_path = "convert_prepare\\tests\\data\\generate_document"
|
17
17
|
output_root = os.path.join(tmp_path, "output")
|
18
18
|
shutil.copytree(source_code_path, os.path.join(tmp_path, "source\\0"))
|
19
19
|
package = PackageInfo()
|
20
|
-
package.name = "
|
20
|
+
package.name = "dummy-sourcecode"
|
21
21
|
package.exclude_path = ["test*", "example*", "sample*", "doc*"]
|
22
22
|
package.install_type = PackageInfo.InstallType.PYPI
|
23
23
|
package.version = None
|
24
24
|
package.build_in_subpackage = False
|
25
25
|
package.extra_index_url = None
|
26
26
|
package.prefer_source_distribution = False
|
27
|
-
source_folder = os.path.join(tmp_path, "source\\0")
|
27
|
+
source_folder = os.path.join(tmp_path, "source\\0\\dummy-sourcecode")
|
28
28
|
yaml_output_folder = os.path.join(tmp_path, "yaml_output")
|
29
29
|
package.path = Source(
|
30
30
|
source_folder=source_folder, yaml_output_folder=yaml_output_folder, package_name=package.name
|
31
31
|
)
|
32
32
|
|
33
33
|
# add dummy code to python sys path to simulate installation
|
34
|
-
|
35
|
-
|
36
|
-
sys.path.insert(0, os.path.abspath(dummy_path))
|
34
|
+
os.environ["PYTHONPATH"] = os.path.abspath(source_folder)
|
35
|
+
sys.path.insert(0, os.path.abspath(source_folder))
|
37
36
|
|
38
37
|
# add docfx_yaml to python sys path for sphinx build to import
|
39
38
|
sys.path.insert(1, os.path.abspath("docfx_yaml"))
|
@@ -44,10 +43,12 @@ def test_generate_document(tmp_path):
|
|
44
43
|
#assert the result
|
45
44
|
yaml_path = os.path.join(yaml_output_folder, "_build\\docfx_yaml")
|
46
45
|
assert os.path.exists(yaml_path)
|
47
|
-
assert os.path.exists(os.path.join(yaml_path, "
|
48
|
-
assert os.path.exists(os.path.join(yaml_path, "
|
49
|
-
assert os.path.exists(os.path.join(yaml_path, "
|
50
|
-
assert os.path.exists(os.path.join(yaml_path, "
|
46
|
+
assert os.path.exists(os.path.join(yaml_path, "dummy.sourcecode.foo.foo.yml"))
|
47
|
+
assert os.path.exists(os.path.join(yaml_path, "dummy.sourcecode.boo.boo.yml"))
|
48
|
+
assert os.path.exists(os.path.join(yaml_path, "dummy.sourcecode.foo.foo.Foo.yml"))
|
49
|
+
assert os.path.exists(os.path.join(yaml_path, "dummy.sourcecode.boo.boo.Boo.yml"))
|
50
|
+
assert os.path.exists(os.path.join(yaml_path, "dummy.sourcecode.yml"))
|
51
|
+
assert not os.path.exists(os.path.join(yaml_path, "dummy.yml"))
|
51
52
|
assert os.path.exists(os.path.join(yaml_path, "toc.yml"))
|
52
53
|
assert os.path.exists(os.path.join(yaml_path, "index.yml"))
|
53
54
|
|
@@ -18,7 +18,7 @@ def init_paths(tmp_path):
|
|
18
18
|
package_info.exclude_path = ["testcode\\exclude\\*"]
|
19
19
|
package_info.path = Source(source_folder=destination, yaml_output_folder=rst_path, package_name="testcode")
|
20
20
|
package_info.build_in_subpackage = False
|
21
|
-
|
21
|
+
package_info.name = 'testcode'
|
22
22
|
return rst_path, destination
|
23
23
|
|
24
24
|
|
@@ -28,7 +28,6 @@ def test_run_apidoc(tmp_path):
|
|
28
28
|
|
29
29
|
# List all files under rst_path
|
30
30
|
rst_list = os.listdir(rst_path)
|
31
|
-
assert "testcode.rst" in rst_list
|
32
31
|
assert "testcode.fakemodule.rst" in rst_list
|
33
32
|
assert "testcode.exclude.rst" not in rst_list
|
34
33
|
|
@@ -51,7 +50,7 @@ def test_run_converter(tmp_path):
|
|
51
50
|
|
52
51
|
if os.path.exists(out_path):
|
53
52
|
yaml_list = os.listdir(os.path.join(out_path, "docfx_yaml"))
|
54
|
-
assert "testcode.yml" in yaml_list
|
53
|
+
assert "testcode.yml" not in yaml_list
|
55
54
|
assert "testcode.fakemodule.test_code.yml" in yaml_list
|
56
55
|
assert "testcode.fakemodule.test_code.testClass.yml" in yaml_list
|
57
56
|
assert "toc.yml" in yaml_list
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.0.
|
3
|
+
Version: 0.1.0.dev1465062
|
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
|
@@ -8,7 +8,7 @@ py2docfx/convert_prepare/get_source.py,sha256=1XOdFABdzhmSld8-w72gaOQv8_xaUX7_Vn
|
|
8
8
|
py2docfx/convert_prepare/git.py,sha256=fY9urQQp5aMnlGnFrSvTTR0FPnIc-28b50W1NzIPpaw,5640
|
9
9
|
py2docfx/convert_prepare/install_package.py,sha256=hATmgazcSX7k2n4jQXh9sQMyNUc1k1YqHv5K5UMALq4,262
|
10
10
|
py2docfx/convert_prepare/pack.py,sha256=vZS67_GzEhUmZWHU1dxm8gnWyRBs-kB6-KjX1d_FdOU,1260
|
11
|
-
py2docfx/convert_prepare/package_info.py,sha256=
|
11
|
+
py2docfx/convert_prepare/package_info.py,sha256=ZSYDTKVqDYV6DLx6N6sD05qNbreIbjyo5IOLEhsGUrw,6549
|
12
12
|
py2docfx/convert_prepare/params.py,sha256=PXMB8pLtb4XbfI322avA47q0AO-TyBE6kZf7FU8I6v4,1771
|
13
13
|
py2docfx/convert_prepare/paths.py,sha256=964RX81Qf__rzXgEATfqBNFCKTYVjLt9J7WCz2TnNdc,485
|
14
14
|
py2docfx/convert_prepare/pip_utils.py,sha256=W8PJQQSZXUW7W_mdBxaK6KRuxMEskO1-Hw6hjRazqTY,1127
|
@@ -23,17 +23,19 @@ py2docfx/convert_prepare/post_process/merge_toc.py,sha256=jF4u9Zb618SCSQG7u8IxCd
|
|
23
23
|
py2docfx/convert_prepare/subpackage_merge/merge_root_package.py,sha256=uK96qL2asuSfo_3SZaoP8XZaUvjf5mNkr17JNbZR4Lg,1026
|
24
24
|
py2docfx/convert_prepare/subpackage_merge/merge_toc.py,sha256=nkVqe8R0m8D6cyTYV7aIpMDXorvn4-LXfU_vIK_hJBg,1706
|
25
25
|
py2docfx/convert_prepare/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
-
py2docfx/convert_prepare/tests/test_generate_document.py,sha256=
|
26
|
+
py2docfx/convert_prepare/tests/test_generate_document.py,sha256=xyGo19FNQeyh6Xpt64a-fAY0VyMswNZgR7RAHdg1IMQ,2363
|
27
27
|
py2docfx/convert_prepare/tests/test_get_source.py,sha256=c22JfobgbEbWWiNzBNYpZm2yDfo5LwBioUuRwft9WZE,5858
|
28
28
|
py2docfx/convert_prepare/tests/test_pack.py,sha256=46JWMNzknIptDVs7D3CuxcmqBr_OKMmaw1br9H7wqco,4134
|
29
|
-
py2docfx/convert_prepare/tests/test_package_info.py,sha256=
|
29
|
+
py2docfx/convert_prepare/tests/test_package_info.py,sha256=OCXoIbIDD8Bu0wMiQctMzFSkyFjfaxtCFf0wS1EHqs8,2210
|
30
30
|
py2docfx/convert_prepare/tests/test_params.py,sha256=Kc6JnoCbC3VvZwzPac1_46USsoZy-2YG-GrwhqFa8sI,2017
|
31
31
|
py2docfx/convert_prepare/tests/test_post_process_merge_toc.py,sha256=YKOcn4_lf4syGsAvJ9BqpdUUc3SLfK4TiOX1lpXJT_Y,885
|
32
32
|
py2docfx/convert_prepare/tests/test_source.py,sha256=xkbYu-F6xNBlXWW0nu0YDYwc5zNj8h67Qd-3QpJ_B0M,1281
|
33
|
-
py2docfx/convert_prepare/tests/test_sphinx_caller.py,sha256=
|
33
|
+
py2docfx/convert_prepare/tests/test_sphinx_caller.py,sha256=RvTPo3DBecr-Z9JwU7qulnfnm2d-ipv7eqebWIbaE2Y,2532
|
34
34
|
py2docfx/convert_prepare/tests/test_subpackage.py,sha256=n0lCcdrTE1gkmmfGE85tSBMlpOEBszZafaHXffxo3Oc,4982
|
35
|
-
py2docfx/convert_prepare/tests/data/generate_document/
|
36
|
-
py2docfx/convert_prepare/tests/data/generate_document/
|
35
|
+
py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
+
py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/sourcecode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
+
py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/sourcecode/boo/boo.py,sha256=zXze_R2qRsJsAB8Z1LY5ZGRHWDo-j3N6Tnw1yBy9gVs,97
|
38
|
+
py2docfx/convert_prepare/tests/data/generate_document/dummy-sourcecode/dummy/sourcecode/foo/foo.py,sha256=i2oC5eoHl-HNW1mhLotsOwgdnVzkR0jRj4rnNjMbbCU,97
|
37
39
|
py2docfx/convert_prepare/tests/data/get_source/mock-1/setup.py,sha256=6Zcy-AkzBIuiyU67AdApqj7nF6rNNTd8733ie0M4R-A,121
|
38
40
|
py2docfx/convert_prepare/tests/data/pack/foo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
41
|
py2docfx/convert_prepare/tests/data/pack/foo/foo.py,sha256=nFSS0Abt9DB2jpxbrpv6UNmDiz8pgeChJoPWsFDrRQU,14
|
@@ -99,7 +101,7 @@ py2docfx/docfx_yaml/tests/roots/test-translator-signatures/refered_objects.py,sh
|
|
99
101
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/code_with_table_desc.py,sha256=J4eFvXsymgFvjnwVUY0APtUGwuxvt-AFJjTaEaQ7zMQ,574
|
100
102
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
|
101
103
|
py2docfx/docfx_yaml/tests/utils/test_utils.py,sha256=N61dPDo5vuRSWlq3FIbdmalOwxGMzbKDILpRBeN58RE,3374
|
102
|
-
py2docfx-0.1.0.
|
103
|
-
py2docfx-0.1.0.
|
104
|
-
py2docfx-0.1.0.
|
105
|
-
py2docfx-0.1.0.
|
104
|
+
py2docfx-0.1.0.dev1465062.dist-info/METADATA,sha256=8KGyc82CBXUzJW6ksUtE2BaotKp0i0m1Vl4RohYGz4s,601
|
105
|
+
py2docfx-0.1.0.dev1465062.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
106
|
+
py2docfx-0.1.0.dev1465062.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
107
|
+
py2docfx-0.1.0.dev1465062.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|