coom-cli 0.0.1a1__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.
coom/cli/__init__.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""The coom command, which checks models and reports their diagnostics."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import sys
|
|
5
|
+
from collections.abc import Sequence
|
|
6
|
+
from importlib.metadata import version
|
|
7
|
+
|
|
8
|
+
from coom.compiler import compile_files
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main(arguments: Sequence[str] | None = None) -> int:
|
|
12
|
+
"""Runs the coom command and returns its exit code."""
|
|
13
|
+
parser = argparse.ArgumentParser(prog="coom", description="Tools for COOM product configuration models.")
|
|
14
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {version('coom-cli')}")
|
|
15
|
+
commands = parser.add_subparsers(dest="command", required=True)
|
|
16
|
+
check = commands.add_parser("check", help="compile models and report their diagnostics")
|
|
17
|
+
check.add_argument("files", nargs="+", help="the model files, compiled together as one model")
|
|
18
|
+
options = parser.parse_args(arguments)
|
|
19
|
+
if options.command == "check":
|
|
20
|
+
result = compile_files(options.files)
|
|
21
|
+
for diagnostic in result.diagnostics:
|
|
22
|
+
print(diagnostic, file=sys.stderr)
|
|
23
|
+
return 0 if result.ok else 1
|
|
24
|
+
raise AssertionError(options.command)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if __name__ == "__main__":
|
|
28
|
+
sys.exit(main())
|
coom/cli/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: coom-cli
|
|
3
|
+
Version: 0.0.1a1
|
|
4
|
+
Summary: Command line interface of the COOM product configuration language
|
|
5
|
+
Keywords: coom,product configuration,cli
|
|
6
|
+
Author: denkbares GmbH
|
|
7
|
+
Author-email: denkbares GmbH <info@denkbares.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Dist: coom-core==0.0.1a1
|
|
16
|
+
Requires-Dist: coom-lang==0.0.1a1
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Project-URL: Homepage, https://www.coom-lang.org
|
|
19
|
+
Project-URL: Repository, https://github.com/denkbares/coom-lang
|
|
20
|
+
Project-URL: Changelog, https://github.com/denkbares/coom-lang/blob/main/CHANGELOG.md
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# coom-cli
|
|
24
|
+
|
|
25
|
+
The `coom` command for models of the [COOM](https://www.coom-lang.org) product configuration language.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
pip install coom-cli
|
|
29
|
+
coom check Bike.model
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`coom check` compiles the given files as one model and reports every diagnostic with its source position. It exits
|
|
33
|
+
with status 1 if there are errors. More commands follow. Sources live in the
|
|
34
|
+
[coom-lang repository](https://github.com/denkbares/coom-lang) under `packages/coom-cli`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
coom/cli/__init__.py,sha256=cvf7jYuvA6PbvlcoR-t_N3gLlLYTnQh_RcNrPKEHAQg,1152
|
|
2
|
+
coom/cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
coom_cli-0.0.1a1.dist-info/licenses/LICENSE,sha256=fi9sXaf2iZM3bDpahi_25QkheTcDoywM119sImHrKIc,1071
|
|
4
|
+
coom_cli-0.0.1a1.dist-info/WHEEL,sha256=3NO1oYsF7mANFUWVdyEQLM-zmecczWWEmmF5rEbXrWk,80
|
|
5
|
+
coom_cli-0.0.1a1.dist-info/entry_points.txt,sha256=J1vZvQcsy_J5ZDEXU3gmpHbvmYGnbRRevjPrXGSaNmQ,40
|
|
6
|
+
coom_cli-0.0.1a1.dist-info/METADATA,sha256=uE0kBt5Lu80sBXdjLT7YloG8F8KV3dQ09lQoiMY7mWk,1313
|
|
7
|
+
coom_cli-0.0.1a1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 denkbares GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|