socx-cli 0.1.0__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.
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: socx-cli
3
+ Version: 0.1.0
4
+ Summary: Tool executer and plugin manager for SoC team.
5
+ Project-URL: Homepage, https://github.com/MomsPancakes/socx
6
+ Project-URL: Issues, https://github.com/MomsPancakes/socx/issues
7
+ Author-email: Sagi Kimhi <sagi.kim5@gmail.com>
8
+ Maintainer-email: Sagi Kimhi <sagi.kim5@gmail.com>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Requires-Python: >=3.12
12
+ Requires-Dist: click>=8.1.8
13
+ Requires-Dist: dynaconf>=3.2.7
14
+ Requires-Dist: jinja2>=3.1.5
15
+ Requires-Dist: platformdirs>=4.3.6
16
+ Requires-Dist: pyarrow>=19.0.0
17
+ Requires-Dist: python-dotenv[cli]>=1.0.1
18
+ Requires-Dist: textual-serve>=1.1.1
19
+ Requires-Dist: textual-web>=0.4.2
20
+ Requires-Dist: trogon>=0.6.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: debugpy>=1.8.12; extra == 'dev'
23
+ Requires-Dist: flake8-bugbear; extra == 'dev'
24
+ Requires-Dist: flake8-simplify; extra == 'dev'
25
+ Requires-Dist: mypy; extra == 'dev'
26
+ Requires-Dist: pycodestyle; extra == 'dev'
27
+ Requires-Dist: pydocstyle; extra == 'dev'
28
+ Requires-Dist: pytest; extra == 'dev'
29
+ Requires-Dist: pytest-cov; extra == 'dev'
30
+ Requires-Dist: pyupgrade; extra == 'dev'
31
+ Requires-Dist: ruff; extra == 'dev'
32
+ Requires-Dist: textual-dev>=1.7.0; extra == 'dev'
33
+ Requires-Dist: textual-terminal>=0.3.0; extra == 'dev'
34
+ Requires-Dist: textual[dev]>=2.0.4; extra == 'dev'
@@ -0,0 +1,41 @@
1
+ src/plugins/config.py,sha256=OhbXqt4yTo3radDlBzJhDQEzSCqaYqbuuadph3NP8_c,2576
2
+ src/plugins/example.py,sha256=4A210zGpSSGhaIbwIzjWSagadVMhTm0fvFk48k8Xyno,1143
3
+ src/plugins/rgr.py,sha256=0fCodpkW-nxbAuDxG5gR05B4K2lmp19t3N4PgYn1cTc,674
4
+ src/plugins/convert/lst.py,sha256=n-vgrvQddAqF_L_-SM19BEubZvWRFrvEovB99UDfna4,300
5
+ src/socx/__init__.py,sha256=s2k6D3bjTzf41Pz1ONGj-VN6thcUua0_v5HgedLVRCM,3763
6
+ src/socx/__main__.py,sha256=w77DmIPhP2iaBxcV3aWf3cwbtZXigVzdeDg4RHFBarc,73
7
+ src/socx/cli.py,sha256=vD2rutqYGnwkDxQHdABrOUknyEtIK155FT1Hl3mvndQ,5314
8
+ src/socx/console.py,sha256=P6EACW2qJJos5tRKVS5Jy-mJwmPLCX8cZpXfLJcvSLc,254
9
+ src/socx/converter.py,sha256=A-JczaEbE3fzB_INFyBGuwoGOWDQMEp6pGGlgmv4wT8,2036
10
+ src/socx/formatter.py,sha256=5OFwld7UsDJ_NvlD9vdxPhTKY33eZIBKPYZpzSeqHM8,1577
11
+ src/socx/log.py,sha256=vqOs0soH51cBYTYfEFlwwRduXn4ijZMyPIInfE7u5AM,4921
12
+ src/socx/memory.py,sha256=rKJLFMtWOuhWdA2dfUH5QpvdNKM5zr4g_dsxc40BOUU,1639
13
+ src/socx/parser.py,sha256=V9rctOdpq1f8a5ktLf2-_x8Sq3y_4PsOyvT7CVb7HCs,4898
14
+ src/socx/reader.py,sha256=xboLIOLQTosPPgg9oxxA75ha069asZkz2rP1Hd0kWf8,1075
15
+ src/socx/tokenizer.py,sha256=DiRzeMF2ehvaCfU_oXbR0bjiNSj9y9pKQh4_HkHIQt4,1492
16
+ src/socx/validators.py,sha256=Tc9NDlKRIKdpfgYB9Y3UaR-PZjpEWYzwfeNCwiqgLu0,1802
17
+ src/socx/visitor.py,sha256=obrAhJV_rI3w2vNAiSxz8AnyfFgosJuNDM7U6YkyghY,1660
18
+ src/socx/writer.py,sha256=xmCbyqB4sKdhv9s-8UZ-2MTf-6A7yxJ3abzuypUjVGU,1422
19
+ src/socx/config/__init__.py,sha256=r5HQMnZIfjUf5f0PC3kzicf9mGyvuf4DH01JT15_Gh8,2423
20
+ src/socx/config/_config.py,sha256=iDMpb4ca7dTn_ugGUhd3xXR0862EWmBY51P-i1418T0,9726
21
+ src/socx/core/__init__.py,sha256=2Flp5OoWBT5BDL23FaNFtXu0tzXbDphC7NsitDu-Vvk,92
22
+ src/socx/core/_uid.py,sha256=apxMs-3HcuA07rPY4SyWFfEjaujeg-rzzaHxfOpiJt0,943
23
+ src/socx/core/mixins.py,sha256=Pldix_ijWvIOKoeOEQWiTFhdWubWZAMh85W03fojoi4,947
24
+ src/socx/regression/__init__.py,sha256=2af-PAIqR-ibs7LzFQvRqfAGoiT_cy6uMt1ytBoXMgE,318
25
+ src/socx/regression/regression.py,sha256=T_7CZMJIJjumM8610qaadPeUinoQ_DmUVzxEiVrktQM,3163
26
+ src/socx/regression/test.py,sha256=CoZq5lrrXMLvWVAj5ck8fMajnL7pqPg_gjjXwKRzNQ4,6995
27
+ src/socx/static/toml/convert.local.toml,sha256=1LowWlBURDJ-BcM-ap3o8b8gkctrsxyhFnjd5xnoKLg,160
28
+ src/socx/static/toml/converter.toml,sha256=iBO0gw_N6ssj2EA1fhIwmqqvEDwbM5bgkpdzXyvzV0o,2763
29
+ src/socx/static/toml/filetypes.toml,sha256=_xZHqq24kX_JvX-L2mTStRYHe7HSkPLdMJKZCXJBOrk,2499
30
+ src/socx/static/toml/plugins.toml,sha256=QuGSqLd3zjpMQizip6GfZpbT8TFM8ybwx77ndxr9mSc,200
31
+ src/socx/static/toml/regression.toml,sha256=a9YucQk2tHsGnSn1J59li95tfuDkdidPta1b_3BNxlQ,1382
32
+ src/socx/static/toml/settings.toml,sha256=1LfubMZEvGCAXYv7oMV8rmyGaOIWAVHi8buzhaY7VxE,110
33
+ src/socx/static/toml/test.toml,sha256=4tzHmQ4dGUSI3_MvyPl05vil4HX8VJOPazQ8kQ6mULM,101
34
+ src/socx-tui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ src/socx-tui/app.py,sha256=zbxOwz4a7qD8WD8X2ibcwMqLidOWBnHCHldeuNVh5-E,126
36
+ src/socx-tui/regression/table.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ socx_cli-0.1.0.dist-info/METADATA,sha256=eZOwaZkagczJsy1prZPnjjjUdmkYxzYPhYx0jf6dt38,1296
38
+ socx_cli-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ socx_cli-0.1.0.dist-info/entry_points.txt,sha256=oMFVahznCiaoemSYBVI-tQc4yGIEetExGbaQS6l-kDA,43
40
+ socx_cli-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
+ socx_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ socx = socx.__main__:cli
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
src/plugins/config.py ADDED
@@ -0,0 +1,92 @@
1
+ from pathlib import Path
2
+ from contextlib import suppress
3
+
4
+ import rich
5
+ import click
6
+ from rich.prompt import Prompt
7
+
8
+ from socx import cli as soc_cli
9
+ from socx import logger
10
+ from socx import console
11
+ from socx import settings
12
+ from socx import settings_tree
13
+
14
+
15
+ @soc_cli.group("config")
16
+ @click.pass_context
17
+ def cli(ctx: click.Context):
18
+ """Get, set, list, or modify settings configuration values."""
19
+
20
+
21
+ @cli.command()
22
+ def inspect():
23
+ """Inspect the current settings instance and print the results."""
24
+ console.clear()
25
+ rich.inspect(settings, console=console, all=True)
26
+
27
+
28
+ @cli.command("list")
29
+ def list_():
30
+ """Print a list of all current configuration values."""
31
+ console.print(settings.as_dict())
32
+
33
+
34
+ @cli.command("tree")
35
+ def tree_():
36
+ """Print a tree of all loaded configurations."""
37
+ tree = settings_tree(settings)
38
+ console.print(tree)
39
+
40
+
41
+ @cli.command()
42
+ @click.argument("name", required=True, type=str)
43
+ def get(name: str):
44
+ """Print a tree/table/value representation of the settings field."""
45
+ tree = None
46
+ with suppress(KeyError, AttributeError):
47
+ field = settings[name]
48
+ tree = settings_tree(field, name)
49
+ console.print(tree)
50
+ if not tree:
51
+ console.print(f"No such field: {name}")
52
+ console.print(click.get_current_context().get_help())
53
+
54
+
55
+ @cli.command("set")
56
+ @click.argument("name", required=True, type=str)
57
+ @click.argument("value", required=True, type=str)
58
+ def set_(name: str, value: str):
59
+ """Print a tree/table/value representation of the settings field."""
60
+ logger.debug(f"settings update: '{name}={value}'")
61
+ settings.update({name: value}, validate_on_update=True)
62
+
63
+
64
+ @cli.command()
65
+ def edit():
66
+ """Edit settings from console using nano/vim/nvim/gvim (interactive)."""
67
+ help_text = """[magenta on gray23]
68
+
69
+ You may hit [u]<Ctrl-C>[/u] at any time to abort.
70
+
71
+ When inside an editor, [u]close it without saving to abort[/u].[/magenta
72
+ on gray23]
73
+ """
74
+ console.clear()
75
+ console.line(2)
76
+ console.rule("Edit")
77
+ console.line(1)
78
+ console.print(help_text, justify="center")
79
+ console.line(1)
80
+ file = Prompt.ask(
81
+ console=console,
82
+ prompt="Which configuration would you like to edit?",
83
+ choices=[Path(file).name for file in settings.settings_file],
84
+ )
85
+ editor = Prompt.ask(
86
+ console=console,
87
+ prompt="Which editor would you like to use?",
88
+ choices=["nano", "vim", "nvim", "gvim"],
89
+ default="vim",
90
+ )
91
+ file = Path(settings.path_for(file))
92
+ click.edit(filename=str(file), editor=editor, require_save=True)
@@ -0,0 +1,12 @@
1
+ from socx import LstConverter
2
+ from socx import cli as soc_cli
3
+
4
+ @soc_cli.group("convert")
5
+ def cli():
6
+ """Perform a conversion based on current configurations."""
7
+
8
+ @cli.command()
9
+ def lst():
10
+ """Convert symbol tables from an LST file to SystemVerilog covergroups."""
11
+ LstConverter().convert()
12
+
src/plugins/example.py ADDED
@@ -0,0 +1,43 @@
1
+ from rich.syntax import Syntax
2
+ from rich.prompt import Confirm
3
+
4
+ from socx import console, settings, cli as soc_cli
5
+
6
+ @soc_cli.command("example")
7
+ def cli():
8
+ """Command-line-interface plugin example."""
9
+ style = "[magenta on gray23][bold][underline]"
10
+
11
+ text = """
12
+ :wave: Hello from plugin example! :wave:
13
+
14
+ The code for this example can be found under plugins/example.py
15
+
16
+ To highlight how simple it is to write a plugin, as complex as it may seem,
17
+ the code for this example can even print itself as its own example!
18
+
19
+ 👇👇👇 See code below 👇👇👇
20
+ """
21
+
22
+ code = Syntax.from_path(
23
+ tab_size=4,
24
+ theme="nord",
25
+ word_wrap=False,
26
+ line_numbers=True,
27
+ indent_guides=True,
28
+ path=settings.plugins.example
29
+ )
30
+
31
+ console.clear()
32
+ console.line(3)
33
+ console.print(f"{style}{text}", justify="center")
34
+ console.line(3)
35
+
36
+ if Confirm.ask(
37
+ console=console, prompt="Display the code for this example?"
38
+ ):
39
+ console.rule(f"{style}Plugin Code:")
40
+ console.line(3)
41
+ console.print(code)
42
+ else:
43
+ console.print("Goodbye :)")
src/plugins/rgr.py ADDED
@@ -0,0 +1,28 @@
1
+ import click
2
+
3
+ from pathlib import Path
4
+
5
+ from socx import console, settings, Test, cli as soc_cli
6
+
7
+
8
+ @soc_cli.group("rgr")
9
+ def cli():
10
+ """Perform various regression related actions."""
11
+
12
+
13
+ @cli.command()
14
+ def rrfh():
15
+ """Command alias of rerun-failure-history."""
16
+ failure_history = settings.regression.files.failure_history
17
+ history_fp = Path(failure_history.parent) / failure_history.name
18
+ with click.open_file(history_fp, mode="r", encoding="utf-8") as file:
19
+ for line in file:
20
+ console.print(Test(line))
21
+
22
+
23
+ @cli.command("rerun-failure-history")
24
+ def rerun_failure_history():
25
+ """Rerun failed tests from all past regressions."""
26
+ rrfh()
27
+
28
+
src/socx/__init__.py ADDED
@@ -0,0 +1,132 @@
1
+ __all__ = (
2
+ # Modules
3
+ "log",
4
+ "test",
5
+ "memory",
6
+ "config",
7
+ "parser",
8
+ "reader",
9
+ "writer",
10
+ "visitor",
11
+ "tokenizer",
12
+ "formatter",
13
+ "converter",
14
+ # Log
15
+ "logger",
16
+ # Cli
17
+ "cli",
18
+ # Regression
19
+ "Test",
20
+ "TestStatus",
21
+ "TestCommand",
22
+ "Regression",
23
+ "RegressionStatus",
24
+ # Config
25
+ "settings",
26
+ "settings_tree",
27
+ "APP_NAME",
28
+ "APP_AUTHOR",
29
+ "APP_VERSION",
30
+ "USER_LOG_DIR",
31
+ "USER_DATA_DIR",
32
+ "USER_CACHE_DIR",
33
+ "USER_STATE_DIR",
34
+ "USER_CONFIG_DIR",
35
+ "USER_RUNTIME_DIR",
36
+ # Console
37
+ "console",
38
+ # Memory
39
+ "SymbolTable",
40
+ "RichSymTable",
41
+ "MemorySegment",
42
+ "DynamicSymbol",
43
+ # Parser
44
+ "parse",
45
+ "write",
46
+ "Parser",
47
+ "LstParser",
48
+ # Reader
49
+ "Reader",
50
+ "FileReader",
51
+ # Writer
52
+ "Writer",
53
+ "FileWriter",
54
+ # Visitor
55
+ "Node",
56
+ "Proxy",
57
+ "Visitor",
58
+ "Adapter",
59
+ "Structure",
60
+ "TopDownTraversal",
61
+ "BottomUpTraversal",
62
+ "ByLevelTraversal",
63
+ # Tokenizer
64
+ "Tokenizer",
65
+ "LstTokenizer",
66
+ # Formatter
67
+ "Formatter",
68
+ "SystemVerilogFormatter",
69
+ # Converter
70
+ "Converter",
71
+ "LstConverter",
72
+ "PathValidator",
73
+ )
74
+
75
+ from . import log as log
76
+ from . import memory as memory
77
+ from . import config as config
78
+ from . import parser as parser
79
+ from . import reader as reader
80
+ from . import writer as writer
81
+ from . import visitor as visitor
82
+ from . import tokenizer as tokenizer
83
+ from . import formatter as formatter
84
+ from . import converter as converter
85
+ from .cli import cli as cli
86
+ from .log import logger as logger
87
+ from .core import TypedPtrMixin as TypedPtrMixin
88
+ from .core import UIDMixin as UIDMixin
89
+ from .config import settings as settings
90
+ from .config import settings_tree as settings_tree
91
+ from .config import APP_NAME as APP_NAME
92
+ from .config import APP_AUTHOR as APP_AUTHOR
93
+ from .config import APP_VERSION as APP_VERSION
94
+ from .config import USER_LOG_DIR as USER_LOG_DIR
95
+ from .config import USER_DATA_DIR as USER_DATA_DIR
96
+ from .config import USER_CACHE_DIR as USER_CACHE_DIR
97
+ from .config import USER_STATE_DIR as USER_STATE_DIR
98
+ from .config import USER_CONFIG_DIR as USER_CONFIG_DIR
99
+ from .config import USER_RUNTIME_DIR as USER_RUNTIME_DIR
100
+ from .console import console as console
101
+ from .memory import SymbolTable as SymbolTable
102
+ from .memory import RichSymTable as RichSymTable
103
+ from .memory import MemorySegment as MemorySegment
104
+ from .memory import DynamicSymbol as DynamicSymbol
105
+ from .parser import parse as parse
106
+ from .parser import write as write
107
+ from .parser import Parser as Parser
108
+ from .parser import LstParser as LstParser
109
+ from .reader import Reader as Reader
110
+ from .reader import FileReader as FileReader
111
+ from .writer import Writer as Writer
112
+ from .writer import FileWriter as FileWriter
113
+ from .visitor import Node as Node
114
+ from .visitor import Proxy as Proxy
115
+ from .visitor import Visitor as Visitor
116
+ from .visitor import Adapter as Adapter
117
+ from .visitor import Structure as Structure
118
+ from .visitor import TopDownTraversal as TopDownTraversal
119
+ from .visitor import BottomUpTraversal as BottomUpTraversal
120
+ from .visitor import ByLevelTraversal as ByLevelTraversal
121
+ from .tokenizer import Tokenizer as Tokenizer
122
+ from .tokenizer import LstTokenizer as LstTokenizer
123
+ from .formatter import Formatter as Formatter
124
+ from .formatter import SystemVerilogFormatter as SystemVerilogFormatter
125
+ from .converter import Converter as Converter
126
+ from .converter import LstConverter as LstConverter
127
+ from .validators import PathValidator as PathValidator
128
+ from .regression import Test as Test
129
+ from .regression import TestStatus as TestStatus
130
+ from .regression import TestCommand as TestCommand
131
+ from .regression import Regression as Regression
132
+ from .regression import RegressionStatus as RegressionStatus
src/socx/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ from socx import cli as cli
2
+
3
+
4
+ if __name__ == "__main__":
5
+ cli(obj={})