bsb-json 4.2.2__py3-none-any.whl → 6.0.0a5__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.
Potentially problematic release.
This version of bsb-json might be problematic. Click here for more details.
- bsb_json/__init__.py +12 -7
- bsb_json/parser.py +3 -1
- bsb_json/schema/__init__.py +2 -2
- bsb_json/templates/__init__.py +0 -0
- bsb_json/templates/skeleton.json +0 -0
- bsb_json/templates/starting_example.json +0 -0
- {bsb_json-4.2.2.dist-info → bsb_json-6.0.0a5.dist-info}/METADATA +14 -15
- bsb_json-6.0.0a5.dist-info/RECORD +11 -0
- {bsb_json-4.2.2.dist-info → bsb_json-6.0.0a5.dist-info}/WHEEL +1 -1
- {bsb_json-4.2.2.dist-info → bsb_json-6.0.0a5.dist-info/licenses}/LICENSE +0 -0
- bsb_json-4.2.2.dist-info/RECORD +0 -11
- {bsb_json-4.2.2.dist-info → bsb_json-6.0.0a5.dist-info}/entry_points.txt +0 -0
bsb_json/__init__.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
"""
|
|
2
|
-
JSON parser and utilities for the BSB.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"""
|
|
2
|
+
JSON parser and utilities for the BSB.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from .parser import JsonParser
|
|
6
|
+
from .schema import get_json_schema, get_schema
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"get_json_schema",
|
|
10
|
+
"get_schema",
|
|
11
|
+
"JsonParser",
|
|
12
|
+
]
|
bsb_json/parser.py
CHANGED
bsb_json/schema/__init__.py
CHANGED
|
@@ -27,7 +27,7 @@ def object_schema(obj, defs=None):
|
|
|
27
27
|
cls = obj.__class__
|
|
28
28
|
obj_hints = typing.get_type_hints(cls, localns={"Scaffold": Scaffold})
|
|
29
29
|
obj_attrs = get_config_attributes(cls)
|
|
30
|
-
for attr,
|
|
30
|
+
for attr, _descr in obj_attrs.items():
|
|
31
31
|
hint = obj_hints.get(attr, str)
|
|
32
32
|
schema["properties"][attr] = attr_schema(hint, defs)
|
|
33
33
|
|
|
@@ -62,7 +62,7 @@ def attr_schema(hint, defs=None):
|
|
|
62
62
|
else:
|
|
63
63
|
try:
|
|
64
64
|
is_node = get_config_attributes(hint)
|
|
65
|
-
except:
|
|
65
|
+
except Exception:
|
|
66
66
|
is_node = False
|
|
67
67
|
if is_node:
|
|
68
68
|
key = defs_key(hint)
|
bsb_json/templates/__init__.py
CHANGED
|
File without changes
|
bsb_json/templates/skeleton.json
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: bsb-json
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0.0a5
|
|
4
4
|
Summary: JSON parser and utilities for the BSB.
|
|
5
|
-
Author-email: Robin De Schepper <
|
|
6
|
-
Requires-Python: >=3.
|
|
5
|
+
Author-email: Robin De Schepper <robin@alexandria.sc>, Dimitri Rodarie <dimitri.rodarie@unipv.it>
|
|
6
|
+
Requires-Python: >=3.10,<4
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
9
|
-
|
|
10
|
-
Requires-Dist: bsb-
|
|
11
|
-
Requires-Dist:
|
|
12
|
-
Requires-Dist: twine~=4.0 ; extra == "dev"
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: bsb-core~=6.0
|
|
11
|
+
Requires-Dist: bsb-json[test, docs] ; extra == "dev"
|
|
13
12
|
Requires-Dist: pre-commit~=3.5 ; extra == "dev"
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist:
|
|
16
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: ruff>=0.8.2 ; extra == "dev"
|
|
14
|
+
Requires-Dist: furo~=2024.0 ; extra == "docs"
|
|
15
|
+
Requires-Dist: sphinxext-bsb~=6.0 ; extra == "docs"
|
|
17
16
|
Requires-Dist: bsb-core[parallel] ; extra == "test"
|
|
18
17
|
Requires-Dist: bsb-test~=4.0 ; extra == "test"
|
|
19
|
-
Requires-Dist: coverage
|
|
18
|
+
Requires-Dist: coverage>=7.3 ; extra == "test"
|
|
20
19
|
Provides-Extra: dev
|
|
20
|
+
Provides-Extra: docs
|
|
21
21
|
Provides-Extra: test
|
|
22
22
|
|
|
23
23
|
[](https://github.com/dbbs-lab/bsb-json/actions/workflows/main.yml)
|
|
24
|
-
[](https://github.com/astral-sh/ruff)
|
|
25
25
|
|
|
26
26
|
# bsb-json
|
|
27
27
|
|
|
28
|
-
`bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb)
|
|
29
|
-
[bsb-core](https://github.com/dbbs-lab/bsb-core)).
|
|
28
|
+
`bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb).
|
|
30
29
|
It allows the user to write their models' configuration in the json format.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
bsb_json/__init__.py,sha256=vYhMHfjEmFiakveLHRFXhRccIQ6IRGXWZC-QkFY1NAQ,201
|
|
2
|
+
bsb_json/parser.py,sha256=d_ZMTKtcjcVFmE7B0QEaOIMWmS8s0TzmoZU54W7jxTk,1172
|
|
3
|
+
bsb_json/schema/__init__.py,sha256=wysUjXU8dQx5gK6w8O_bT6i99s0pL2N-FE-j6HhfH3E,2354
|
|
4
|
+
bsb_json/templates/__init__.py,sha256=lY5H_P07XnpMbjkUE9GhH8xiBf1DaCRe1pSpc0gtNsE,169
|
|
5
|
+
bsb_json/templates/skeleton.json,sha256=PGIB9yK_XookqruXYiDowPkyl4DeGIkG2jA5YcVpxzI,405
|
|
6
|
+
bsb_json/templates/starting_example.json,sha256=wajNhU-inAD_k6rP_WrG_5ZL5EssxQhgOwCdS6qXpMU,615
|
|
7
|
+
bsb_json-6.0.0a5.dist-info/entry_points.txt,sha256=494DZr0iQ9pIo05kX2XHNOu_hcB_MRgrcEYwZjHZNVk,101
|
|
8
|
+
bsb_json-6.0.0a5.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
9
|
+
bsb_json-6.0.0a5.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
10
|
+
bsb_json-6.0.0a5.dist-info/METADATA,sha256=ZLRdciHCTqJqk9-CFH8V6vcKrJUjDiXuEICfpAxVEVk,1332
|
|
11
|
+
bsb_json-6.0.0a5.dist-info/RECORD,,
|
|
File without changes
|
bsb_json-4.2.2.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
bsb_json/__init__.py,sha256=eZ831q86dWaapbGFDJd1CDtmS_kU8ZU2E7DKSGN2zxE,126
|
|
2
|
-
bsb_json/parser.py,sha256=HmATGli-cajiOfgTcsnLiBF0_h1z61hO_J6Kn-FI368,1171
|
|
3
|
-
bsb_json/schema/__init__.py,sha256=ZSY889zyTyKaa8D2jobeYTCM5YzR4xdb6UBRtGA0dF4,2343
|
|
4
|
-
bsb_json/templates/__init__.py,sha256=lY5H_P07XnpMbjkUE9GhH8xiBf1DaCRe1pSpc0gtNsE,169
|
|
5
|
-
bsb_json/templates/skeleton.json,sha256=PGIB9yK_XookqruXYiDowPkyl4DeGIkG2jA5YcVpxzI,405
|
|
6
|
-
bsb_json/templates/starting_example.json,sha256=wajNhU-inAD_k6rP_WrG_5ZL5EssxQhgOwCdS6qXpMU,615
|
|
7
|
-
bsb_json-4.2.2.dist-info/entry_points.txt,sha256=494DZr0iQ9pIo05kX2XHNOu_hcB_MRgrcEYwZjHZNVk,101
|
|
8
|
-
bsb_json-4.2.2.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
9
|
-
bsb_json-4.2.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
10
|
-
bsb_json-4.2.2.dist-info/METADATA,sha256=yjmNo5L-IhUAYYV5I3XBgaO7-ZszpVQKFeAUQu2KQ0A,1351
|
|
11
|
-
bsb_json-4.2.2.dist-info/RECORD,,
|
|
File without changes
|