bsb-json 4.2.3__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 CHANGED
@@ -1,7 +1,12 @@
1
- """
2
- JSON parser and utilities for the BSB.
3
- """
4
-
5
- from .schema import get_json_schema, get_schema
6
-
7
- __version__ = "4.2.3"
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
@@ -1,5 +1,7 @@
1
1
  """
2
- JSON parsing module. Built on top of the Python ``json`` module. Adds JSON imports and
2
+ JSON parsing module.
3
+
4
+ Built on top of the Python ``json`` module. Adds JSON imports and
3
5
  references.
4
6
  """
5
7
 
@@ -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, descr in obj_attrs.items():
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)
File without changes
File without changes
File without changes
@@ -1,31 +1,29 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bsb-json
3
- Version: 4.2.3
3
+ Version: 6.0.0a5
4
4
  Summary: JSON parser and utilities for the BSB.
5
- Author-email: Robin De Schepper <robingilbert.deschepper@unipv.it>
6
- Requires-Python: >=3.8
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
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"
10
+ Requires-Dist: bsb-core~=6.0
11
+ Requires-Dist: bsb-json[test, docs] ; extra == "dev"
14
12
  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"
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"
18
16
  Requires-Dist: bsb-core[parallel] ; extra == "test"
19
17
  Requires-Dist: bsb-test~=4.0 ; extra == "test"
20
- Requires-Dist: coverage~=7.0 ; extra == "test"
18
+ Requires-Dist: coverage>=7.3 ; extra == "test"
21
19
  Provides-Extra: dev
20
+ Provides-Extra: docs
22
21
  Provides-Extra: test
23
22
 
24
23
  [![Build Status](https://github.com/dbbs-lab/bsb-json/actions/workflows/main.yml/badge.svg)](https://github.com/dbbs-lab/bsb-json/actions/workflows/main.yml)
25
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
24
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
26
25
 
27
26
  # bsb-json
28
27
 
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)).
28
+ `bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb).
31
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.11.0
2
+ Generator: flit 3.12.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -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,,