bsb-json 4.2.3__py3-none-any.whl → 6.0.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.
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-6.0.0.dist-info/METADATA +18 -0
- bsb_json-6.0.0.dist-info/RECORD +11 -0
- {bsb_json-4.2.3.dist-info → bsb_json-6.0.0.dist-info}/WHEEL +1 -1
- bsb_json-4.2.3.dist-info/METADATA +0 -31
- bsb_json-4.2.3.dist-info/RECORD +0 -11
- {bsb_json-4.2.3.dist-info → bsb_json-6.0.0.dist-info}/entry_points.txt +0 -0
- {bsb_json-4.2.3.dist-info → bsb_json-6.0.0.dist-info}/licenses/LICENSE +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)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bsb-json
|
|
3
|
+
Version: 6.0.0
|
|
4
|
+
Summary: JSON parser and utilities for the BSB.
|
|
5
|
+
Author-email: Robin De Schepper <robin@alexandria.sc>, Dimitri Rodarie <dimitri.rodarie@unipv.it>
|
|
6
|
+
Requires-Python: >=3.10,<4
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: bsb-core~=6.0
|
|
11
|
+
|
|
12
|
+
[](https://github.com/dbbs-lab/bsb-json/actions/workflows/main.yml)
|
|
13
|
+
[](https://github.com/astral-sh/ruff)
|
|
14
|
+
|
|
15
|
+
# bsb-json
|
|
16
|
+
|
|
17
|
+
`bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb).
|
|
18
|
+
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.0.dist-info/entry_points.txt,sha256=494DZr0iQ9pIo05kX2XHNOu_hcB_MRgrcEYwZjHZNVk,101
|
|
8
|
+
bsb_json-6.0.0.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
9
|
+
bsb_json-6.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
10
|
+
bsb_json-6.0.0.dist-info/METADATA,sha256=vime5eqPqWrOgXIoKb8k1WeQQgpGT_Vz6BRisve3dzk,879
|
|
11
|
+
bsb_json-6.0.0.dist-info/RECORD,,
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: bsb-json
|
|
3
|
-
Version: 4.2.3
|
|
4
|
-
Summary: JSON parser and utilities for the BSB.
|
|
5
|
-
Author-email: Robin De Schepper <robingilbert.deschepper@unipv.it>
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Requires-Dist: bsb-core~=5.0
|
|
11
|
-
Requires-Dist: bsb-json[test] ; extra == "dev"
|
|
12
|
-
Requires-Dist: build~=1.0 ; extra == "dev"
|
|
13
|
-
Requires-Dist: twine~=4.0 ; extra == "dev"
|
|
14
|
-
Requires-Dist: pre-commit~=3.5 ; extra == "dev"
|
|
15
|
-
Requires-Dist: black~=25.1.0 ; extra == "dev"
|
|
16
|
-
Requires-Dist: isort~=6.0.0 ; extra == "dev"
|
|
17
|
-
Requires-Dist: bump-my-version~=0.24 ; extra == "dev"
|
|
18
|
-
Requires-Dist: bsb-core[parallel] ; extra == "test"
|
|
19
|
-
Requires-Dist: bsb-test~=4.0 ; extra == "test"
|
|
20
|
-
Requires-Dist: coverage~=7.0 ; extra == "test"
|
|
21
|
-
Provides-Extra: dev
|
|
22
|
-
Provides-Extra: test
|
|
23
|
-
|
|
24
|
-
[](https://github.com/dbbs-lab/bsb-json/actions/workflows/main.yml)
|
|
25
|
-
[](https://github.com/psf/black)
|
|
26
|
-
|
|
27
|
-
# bsb-json
|
|
28
|
-
|
|
29
|
-
`bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb) (see also
|
|
30
|
-
[bsb-core](https://github.com/dbbs-lab/bsb-core)).
|
|
31
|
-
It allows the user to write their models' configuration in the json format.
|
bsb_json-4.2.3.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
bsb_json/__init__.py,sha256=wA0bbWs80I3WPnWMV-DkXxcL4nbgKSTJCvLTBqI9fEs,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.3.dist-info/entry_points.txt,sha256=494DZr0iQ9pIo05kX2XHNOu_hcB_MRgrcEYwZjHZNVk,101
|
|
8
|
-
bsb_json-4.2.3.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
9
|
-
bsb_json-4.2.3.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
|
|
10
|
-
bsb_json-4.2.3.dist-info/METADATA,sha256=_LQ9l4LzmXPQZvqUWxqW-20PjfmwrIHv9sik7mNg4E8,1374
|
|
11
|
-
bsb_json-4.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|