math-spec-mapping 0.3.13__py3-none-any.whl → 0.3.14__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- math_spec_mapping/Convenience/__init__.py +1 -0
- math_spec_mapping/Convenience/github.py +34 -0
- math_spec_mapping/Reports/markdown.py +7 -0
- math_spec_mapping/__init__.py +1 -1
- {math_spec_mapping-0.3.13.dist-info → math_spec_mapping-0.3.14.dist-info}/METADATA +1 -1
- {math_spec_mapping-0.3.13.dist-info → math_spec_mapping-0.3.14.dist-info}/RECORD +9 -8
- {math_spec_mapping-0.3.13.dist-info → math_spec_mapping-0.3.14.dist-info}/WHEEL +1 -1
- {math_spec_mapping-0.3.13.dist-info → math_spec_mapping-0.3.14.dist-info}/LICENSE +0 -0
- {math_spec_mapping-0.3.13.dist-info → math_spec_mapping-0.3.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
import os
|
2
|
+
import requests
|
3
|
+
|
4
|
+
|
5
|
+
def write_scaffold_to_github_issues(
|
6
|
+
scaffolder_folder, repo_owner, repository_name, access_token
|
7
|
+
):
|
8
|
+
folders = [
|
9
|
+
x
|
10
|
+
for x in os.listdir(scaffolder_folder)
|
11
|
+
if os.path.isdir(scaffolder_folder + "/" + x)
|
12
|
+
]
|
13
|
+
headers = {
|
14
|
+
"Accept": "application/vnd.github+json",
|
15
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
16
|
+
"Authorization": "Bearer {}".format(access_token),
|
17
|
+
}
|
18
|
+
for folder in folders:
|
19
|
+
issue_name = "Write {} from MSML Scaffold".format(folder)
|
20
|
+
checklist = [
|
21
|
+
x[:-3]
|
22
|
+
for x in os.listdir(scaffolder_folder + "/" + folder)
|
23
|
+
if x.endswith(".md")
|
24
|
+
]
|
25
|
+
checklist = ["- [ ] " + x for x in checklist]
|
26
|
+
checklist = "\n".join(checklist)
|
27
|
+
|
28
|
+
requests.post(
|
29
|
+
"https://api.github.com/repos/{}/{}/issues".format(
|
30
|
+
repo_owner, repository_name
|
31
|
+
),
|
32
|
+
headers=headers,
|
33
|
+
json={"title": issue_name, "body": checklist},
|
34
|
+
)
|
@@ -374,6 +374,12 @@ def write_control_action_markdown_report(ms, path, control_action, add_metadata=
|
|
374
374
|
out += "\n"
|
375
375
|
out += "\n"
|
376
376
|
|
377
|
+
out += "## Parameters Used\n"
|
378
|
+
for i, x in enumerate(sorted(control_action.parameters_used, key=lambda x: x)):
|
379
|
+
out += "{}. [[{}]]".format(i + 1, x)
|
380
|
+
out += "\n"
|
381
|
+
out += "\n"
|
382
|
+
|
377
383
|
if control_action.control_action_options:
|
378
384
|
out += "## Control Action Options:\n"
|
379
385
|
for i, x in enumerate(control_action.control_action_options):
|
@@ -509,6 +515,7 @@ def write_parameter_markdown_report(ms, path, parameter, add_metadata=True):
|
|
509
515
|
)
|
510
516
|
|
511
517
|
out += "Description: {}\n\n".format(param.description)
|
518
|
+
out += "Type: [[{}]]\n\n".format(param.variable_type.name)
|
512
519
|
out += "Symbol: {}\n\n".format(param.symbol)
|
513
520
|
out += "Domain: {}\n\n".format(param.domain)
|
514
521
|
out += "Parameter Class: {}\n\n".format(param.parameter_class)
|
math_spec_mapping/__init__.py
CHANGED
@@ -30,6 +30,6 @@ from .Reports import (
|
|
30
30
|
write_parameter_table_markdown,
|
31
31
|
)
|
32
32
|
from .schema import schema
|
33
|
-
from .Convenience import remove_dummy_repo_components
|
33
|
+
from .Convenience import remove_dummy_repo_components, write_scaffold_to_github_issues
|
34
34
|
|
35
35
|
# from .Convenience import write_top_level_json_description
|
@@ -1,4 +1,4 @@
|
|
1
|
-
math_spec_mapping/__init__.py,sha256=
|
1
|
+
math_spec_mapping/__init__.py,sha256=LvuIbfILQf3UGyHympLJyncfnnpZpEyvN5UDOpi8bWw,1140
|
2
2
|
math_spec_mapping/schema.py,sha256=6mrRqzEnTTSXjb19xJ63MBp0KjKH0s7i6TfT4MkAY9k,233
|
3
3
|
math_spec_mapping/schema.schema.json,sha256=hJP2TcV5WPFPmx4u_A5U1xtnpkE1LeYaTeYOXadTot0,30916
|
4
4
|
math_spec_mapping/Classes/ActionTransmissionChannel.py,sha256=zWMo5QsgPh5WGIWXl-xOrZNMXYJXmK6Vejw1dQvi0og,246
|
@@ -17,8 +17,9 @@ math_spec_mapping/Classes/StateUpdateTransmissionChannel.py,sha256=3hBLvD1lE64Pk
|
|
17
17
|
math_spec_mapping/Classes/StatefulMetric.py,sha256=plMFMAFEk1y2t4DR5lA2SRC9UrYArsx_W33l3mZSdgE,804
|
18
18
|
math_spec_mapping/Classes/Type.py,sha256=2KFY8d3cv1PzJJ7SSMHJf1zcfQ3ZbqxotK2KgTaLZdM,289
|
19
19
|
math_spec_mapping/Classes/__init__.py,sha256=0zxgOqns_9JybD74HKMVh6aw8ij8WVbfQ4Q_1uWzof0,761
|
20
|
-
math_spec_mapping/Convenience/__init__.py,sha256=
|
20
|
+
math_spec_mapping/Convenience/__init__.py,sha256=P8WgrbpJkH08GeyOdhF-ITfT4Yd4ny8QJEvZK0fSljc,164
|
21
21
|
math_spec_mapping/Convenience/documentation.py,sha256=1ziWVJznbCUxeAAt03nAdEYtMlXNo5TeedHfgs0vSBU,1625
|
22
|
+
math_spec_mapping/Convenience/github.py,sha256=mMOhIH3Nvh_91fNTOPjz1oQq1iDq2m5hNLMhtcrr5FU,1025
|
22
23
|
math_spec_mapping/Convenience/starter.py,sha256=9dBKU3EHscut2wA6Nx1XUmehrFIdr4dCjP9V1BbTF6s,12567
|
23
24
|
math_spec_mapping/Load/__init__.py,sha256=_ga5nHi7U5rY5lCF36_XI9Qmybq4P8R4m5I5mmjLBk8,33
|
24
25
|
math_spec_mapping/Load/action_transmission_channel.py,sha256=9Wer7g2s5SSOcUYuZ0PqSKUVVnW3EvGQJZNXJTwW__0,2561
|
@@ -44,7 +45,7 @@ math_spec_mapping/Reports/boundary_actions.py,sha256=45BPp4QjWdD-3E9ZWwqgj_nI2-Y
|
|
44
45
|
math_spec_mapping/Reports/control_actions.py,sha256=NksekZKIPFSIkubttFstKFthc5AU9B9PWRLSl9j1wWs,1216
|
45
46
|
math_spec_mapping/Reports/general.py,sha256=WOOn6Wlb8M4fsdN49FlKLwOka6vJPQ9aCUy88TL2ki0,1610
|
46
47
|
math_spec_mapping/Reports/html.py,sha256=RpyQQON8pDnMmfcyxOsm8UAD5Ad8VKnnW-OyOarTmzA,9711
|
47
|
-
math_spec_mapping/Reports/markdown.py,sha256=
|
48
|
+
math_spec_mapping/Reports/markdown.py,sha256=ZELi-p51k_sehFDHzDalOJstIi6nD2845DTqHp46hKU,23129
|
48
49
|
math_spec_mapping/Reports/mechanisms.py,sha256=d2Rxt3JBYvqAOAYUynl0buYVoXEHrO8EGq7GK6hK8NA,1322
|
49
50
|
math_spec_mapping/Reports/node_map.py,sha256=FdSMDQG16NX6n9sZcH-T5xwsvgjrV9OqBHc9J_VlNK0,3129
|
50
51
|
math_spec_mapping/Reports/parameters.py,sha256=-ucL71lolqU0xvV7yb0sXl4pFMRl5tXNWdoBfUjLOaQ,1944
|
@@ -53,8 +54,8 @@ math_spec_mapping/Reports/spaces.py,sha256=-76hR5wQBv4lsG000ypBJ-OprjsNjI-rNRMYd
|
|
53
54
|
math_spec_mapping/Reports/state.py,sha256=QYeCvX5cHeZBrbvMeDsTqJcUDTuDFJSLvPbasjLspk8,3643
|
54
55
|
math_spec_mapping/Reports/tables.py,sha256=O0CNuqh3LMECq5uLjBOoxMUk5hUvkUK660FNnwWUxDY,1505
|
55
56
|
math_spec_mapping/Reports/wiring.py,sha256=u9SvKWy6T-WJUEgFI6-zgZanoOaTTs_2YwmEceDLsV8,1618
|
56
|
-
math_spec_mapping-0.3.
|
57
|
-
math_spec_mapping-0.3.
|
58
|
-
math_spec_mapping-0.3.
|
59
|
-
math_spec_mapping-0.3.
|
60
|
-
math_spec_mapping-0.3.
|
57
|
+
math_spec_mapping-0.3.14.dist-info/LICENSE,sha256=ObyEzSw8kgCaFbEfpu1zP4TrcAKLA0xhqHMZZfyh7N0,1069
|
58
|
+
math_spec_mapping-0.3.14.dist-info/METADATA,sha256=pgCgjXjeObVD7rjGT4MWcg04e8CCvB6ThIqB9TGAVr0,6501
|
59
|
+
math_spec_mapping-0.3.14.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
|
60
|
+
math_spec_mapping-0.3.14.dist-info/top_level.txt,sha256=AImhn9wgazkdV0a9vfiphtQR8uGe2nq-ZIOp-6yUk9o,18
|
61
|
+
math_spec_mapping-0.3.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|