scjson 0.1.0__tar.gz → 0.1.2__tar.gz
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.
Potentially problematic release.
This version of scjson might be problematic. Click here for more details.
- {scjson-0.1.0 → scjson-0.1.2}/PKG-INFO +1 -1
- {scjson-0.1.0 → scjson-0.1.2}/pyproject.toml +4 -1
- scjson-0.1.2/scjson/__init__.py +1 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/cli.py +18 -5
- {scjson-0.1.0 → scjson-0.1.2}/scjson.egg-info/PKG-INFO +1 -1
- {scjson-0.1.0 → scjson-0.1.2}/scjson.egg-info/SOURCES.txt +1 -0
- scjson-0.1.2/scjson.egg-info/entry_points.txt +2 -0
- scjson-0.1.0/scjson/__init__.py +0 -7
- {scjson-0.1.0 → scjson-0.1.2}/scjson/SCXMLDocumentHandler.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/__main__.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/dataclasses/__init__.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/dataclasses/generated.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/dataclasses_strict/__init__.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/dataclasses_strict/generated.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/pydantic/__init__.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/pydantic/generated.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/pydantic_strict/__init__.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson/pydantic_strict/generated.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson.egg-info/dependency_links.txt +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson.egg-info/requires.txt +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/scjson.egg-info/top_level.txt +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/setup.cfg +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/setup.py +0 -0
- {scjson-0.1.0 → scjson-0.1.2}/tests/test_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "scjson"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "A JSON-based serialization of SCXML (State Chart XML) for modern tooling, interoperability, and education."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.8"
|
|
@@ -8,6 +8,9 @@ license = {text = "BSD-1-Clause"}
|
|
|
8
8
|
authors = [{name = "Ira Abbott", email = "ira@mycloud.blue"}]
|
|
9
9
|
dependencies = ["pydantic", "lxml", "jsonschema", "click"] # optional
|
|
10
10
|
|
|
11
|
+
[project.scripts]
|
|
12
|
+
scjson = "scjson.__main__:main" # Optional: installs as `scjson` shell command
|
|
13
|
+
|
|
11
14
|
[build-system]
|
|
12
15
|
requires = ["setuptools>=61.0"]
|
|
13
16
|
build-backend = "setuptools.build_meta"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""scjson conversion tools."""
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import click
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
from .SCXMLDocumentHandler import SCXMLDocumentHandler
|
|
4
|
-
from . import
|
|
5
|
-
|
|
4
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
5
|
+
|
|
6
|
+
def _get_metadata(pkg="scjson"):
|
|
7
|
+
try:
|
|
8
|
+
return {
|
|
9
|
+
"version": version(pkg),
|
|
10
|
+
"progname": pkg,
|
|
11
|
+
"description": "SCJSON: SCXML ↔ JSON converter"
|
|
12
|
+
}
|
|
13
|
+
except PackageNotFoundError:
|
|
14
|
+
return {
|
|
15
|
+
"version": "unknown (not installed)",
|
|
16
|
+
"progname": pkg,
|
|
17
|
+
"description": "SCJSON (not installed)"
|
|
18
|
+
}
|
|
19
|
+
md = _get_metadata()
|
|
6
20
|
|
|
7
21
|
def _splash() -> None:
|
|
8
22
|
"""Display program header."""
|
|
9
|
-
click.echo(f"{
|
|
10
|
-
|
|
23
|
+
click.echo(f"{md['progname']} {md['version']} - {md['description']}")
|
|
11
24
|
|
|
12
|
-
@click.group(help=
|
|
25
|
+
@click.group(help=md["description"], invoke_without_command=True)
|
|
13
26
|
@click.pass_context
|
|
14
27
|
def main(ctx):
|
|
15
28
|
"""Command line interface for scjson conversions."""
|
scjson-0.1.0/scjson/__init__.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|