bsb-json 4.2.2__tar.gz → 5.0.0__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.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: bsb-json
3
+ Version: 5.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
+ [![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)
13
+ [![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)
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.
@@ -1,8 +1,7 @@
1
1
  [![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)
2
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2
+ [![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)
3
3
 
4
4
  # bsb-json
5
5
 
6
- `bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb) (see also
7
- [bsb-core](https://github.com/dbbs-lab/bsb-core)).
6
+ `bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb).
8
7
  It allows the user to write their models' configuration in the json format.
@@ -0,0 +1,12 @@
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
+ ]
@@ -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)
@@ -0,0 +1,67 @@
1
+ dependency-groups = { }
2
+
3
+ [build-system]
4
+ requires = [ "flit_core >=3.2,<4" ]
5
+ build-backend = "flit_core.buildapi"
6
+
7
+ [project]
8
+ name = "bsb-json"
9
+ version = "5.0.0"
10
+ readme = "README.md"
11
+ requires-python = ">=3.10,<4"
12
+ dynamic = [ "description" ]
13
+ classifiers = [
14
+ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"
15
+ ]
16
+ dependencies = [ "bsb-core~=6.0" ]
17
+
18
+ [[project.authors]]
19
+ name = "Robin De Schepper"
20
+ email = "robin@alexandria.sc"
21
+
22
+ [[project.authors]]
23
+ name = "Dimitri Rodarie"
24
+ email = "dimitri.rodarie@unipv.it"
25
+
26
+ [project.license]
27
+ file = "LICENSE"
28
+
29
+ [project.entry-points."bsb.config.parsers"]
30
+ json = "bsb_json.parser"
31
+
32
+ [project.entry-points."bsb.config.templates"]
33
+ json_templates = "bsb_json.templates"
34
+
35
+ [tool.uv]
36
+ default-groups = [ "dev", "docs", "test" ]
37
+ sources = { }
38
+
39
+ [tool.flit.module]
40
+ name = "bsb_json"
41
+
42
+ [tool.coverage.run]
43
+ branch = true
44
+ source = [ "bsb_json" ]
45
+
46
+ [tool.coverage.report]
47
+ exclude_lines = [ "if TYPE_CHECKING:" ]
48
+ show_missing = true
49
+
50
+ [tool.ruff]
51
+ exclude = [ ".ruff_cache", ".svn", ".tox", ".venv", "dist" ]
52
+ line-length = 90
53
+ indent-width = 4
54
+
55
+ [tool.ruff.format]
56
+ quote-style = "double"
57
+ indent-style = "space"
58
+ skip-magic-trailing-comma = false
59
+ line-ending = "auto"
60
+ docstring-code-format = true
61
+ docstring-code-line-length = 90
62
+
63
+ [tool.ruff.lint]
64
+ select = [ "E", "F", "UP", "B", "SIM", "I" ]
65
+ ignore = [ ]
66
+ fixable = [ "ALL" ]
67
+ unfixable = [ ]
bsb_json-4.2.2/PKG-INFO DELETED
@@ -1,30 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: bsb-json
3
- Version: 4.2.2
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
- Requires-Dist: bsb-core~=5.0
10
- Requires-Dist: bsb-json[test] ; extra == "dev"
11
- Requires-Dist: build~=1.0 ; extra == "dev"
12
- Requires-Dist: twine~=4.0 ; extra == "dev"
13
- Requires-Dist: pre-commit~=3.5 ; extra == "dev"
14
- Requires-Dist: black~=24.1.1 ; extra == "dev"
15
- Requires-Dist: isort~=5.12 ; extra == "dev"
16
- Requires-Dist: bump-my-version~=0.24 ; extra == "dev"
17
- Requires-Dist: bsb-core[parallel] ; extra == "test"
18
- Requires-Dist: bsb-test~=4.0 ; extra == "test"
19
- Requires-Dist: coverage~=7.0 ; extra == "test"
20
- Provides-Extra: dev
21
- Provides-Extra: test
22
-
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)
24
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
25
-
26
- # bsb-json
27
-
28
- `bsb-json` is a plugin of the [BSB](https://github.com/dbbs-lab/bsb) (see also
29
- [bsb-core](https://github.com/dbbs-lab/bsb-core)).
30
- It allows the user to write their models' configuration in the json format.
@@ -1,7 +0,0 @@
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.2"
@@ -1,61 +0,0 @@
1
- [build-system]
2
- requires = ["flit_core >=3.2,<4"]
3
- build-backend = "flit_core.buildapi"
4
-
5
- [project]
6
- name = "bsb-json"
7
- authors = [{name = "Robin De Schepper", email = "robingilbert.deschepper@unipv.it"}]
8
- readme = "README.md"
9
- license = {file = "LICENSE"}
10
- classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
11
- dynamic = ["version", "description"]
12
- requires-python = ">=3.8"
13
- dependencies = ["bsb-core~=5.0"]
14
-
15
- [project.entry-points."bsb.config.parsers"]
16
- json = "bsb_json.parser"
17
-
18
- [project.entry-points."bsb.config.templates"]
19
- json_templates = "bsb_json.templates"
20
-
21
- [tool.flit.module]
22
- name = "bsb_json"
23
-
24
- [project.optional-dependencies]
25
- test = ["bsb-core[parallel]", "bsb-test~=4.0", "coverage~=7.0"]
26
- dev = [
27
- "bsb-json[test]",
28
- "build~=1.0",
29
- "twine~=4.0",
30
- "pre-commit~=3.5",
31
- "black~=24.1.1",
32
- "isort~=5.12",
33
- "bump-my-version~=0.24"
34
- ]
35
-
36
- [tool.isort]
37
- profile = "black"
38
-
39
- [tool.bumpversion]
40
- current_version = "4.2.2"
41
- parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
42
- serialize = ["{major}.{minor}.{patch}"]
43
- search = "{current_version}"
44
- replace = "{new_version}"
45
- regex = false
46
- ignore_missing_version = false
47
- tag = true
48
- sign_tags = false
49
- tag_name = "v{new_version}"
50
- tag_message = "Bump version: {current_version} → {new_version}"
51
- allow_dirty = false
52
- commit = true
53
- message = "Bump version: {current_version} → {new_version}"
54
- commit_args = "--no-verify"
55
-
56
- [tool.bumpversion.parts.pre_l]
57
- values = ["dev", "a", "b", "rc", "final"]
58
- optional_value = "final"
59
-
60
- [[tool.bumpversion.files]]
61
- filename = "bsb_json/__init__.py"
File without changes