bsb-json 0.0.0b5__tar.gz → 4.0.0rc2__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 bsb-json might be problematic. Click here for more details.
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/LICENSE +0 -0
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/PKG-INFO +4 -4
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/README.md +0 -0
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/__init__.py +1 -1
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/parser.py +11 -5
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/schema/__init__.py +0 -0
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/templates/__init__.py +0 -0
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/templates/skeleton.json +0 -0
- {bsb_json-0.0.0b5 → bsb_json-4.0.0rc2}/bsb_json/templates/starting_example.json +0 -0
- bsb_json-4.0.0rc2/pyproject.toml +70 -0
- bsb_json-0.0.0b5/pyproject.toml +0 -34
|
File without changes
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bsb-json
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0rc2
|
|
4
4
|
Summary: JSON parser and utilities for the BSB.
|
|
5
5
|
Author-email: Robin De Schepper <robingilbert.deschepper@unipv.it>
|
|
6
6
|
Requires-Python: >=3.8
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
9
|
-
Requires-Dist: bsb-core
|
|
9
|
+
Requires-Dist: bsb-core==4.0.0rc2
|
|
10
10
|
Requires-Dist: pre-commit~=3.5 ; extra == "dev"
|
|
11
11
|
Requires-Dist: black~=23.11 ; extra == "dev"
|
|
12
12
|
Requires-Dist: isort~=5.12 ; extra == "dev"
|
|
13
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: bump-my-version~=0.18 ; extra == "dev"
|
|
14
14
|
Requires-Dist: bsb-core[parallel] ; extra == "test"
|
|
15
|
-
Requires-Dist: bsb-test
|
|
15
|
+
Requires-Dist: bsb-test==4.0.0rc2 ; extra == "test"
|
|
16
16
|
Requires-Dist: coverage~=7.0 ; extra == "test"
|
|
17
17
|
Provides-Extra: dev
|
|
18
18
|
Provides-Extra: test
|
|
File without changes
|
|
@@ -7,9 +7,15 @@ import json
|
|
|
7
7
|
import os
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
|
-
from bsb
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
from bsb import ConfigurationParser, ConfigurationWarning, ParserError, warn
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class JsonImportError(ParserError):
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class JsonReferenceError(ParserError):
|
|
18
|
+
pass
|
|
13
19
|
|
|
14
20
|
|
|
15
21
|
def _json_iter(obj): # pragma: nocover
|
|
@@ -150,10 +156,10 @@ def _to_json(value):
|
|
|
150
156
|
if isinstance(value, np.ndarray):
|
|
151
157
|
return value.tolist()
|
|
152
158
|
else:
|
|
153
|
-
raise TypeError()
|
|
159
|
+
raise TypeError(f"Can't encode '{value}' ({type(value)})")
|
|
154
160
|
|
|
155
161
|
|
|
156
|
-
class JsonParser(
|
|
162
|
+
class JsonParser(ConfigurationParser):
|
|
157
163
|
"""
|
|
158
164
|
Parser plugin class to parse JSON configuration files.
|
|
159
165
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,70 @@
|
|
|
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==4.0.0rc2"]
|
|
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.0rc2", "coverage~=7.0"]
|
|
26
|
+
dev = [
|
|
27
|
+
"pre-commit~=3.5",
|
|
28
|
+
"black~=23.11",
|
|
29
|
+
"isort~=5.12",
|
|
30
|
+
"bump-my-version~=0.18"
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.isort]
|
|
34
|
+
profile = "black"
|
|
35
|
+
|
|
36
|
+
[tool.bumpversion]
|
|
37
|
+
current_version = "4.0.0-rc2"
|
|
38
|
+
parse = """(?x)
|
|
39
|
+
(?P<major>0|[1-9]\\d*)\\.
|
|
40
|
+
(?P<minor>0|[1-9]\\d*)\\.
|
|
41
|
+
(?P<patch>0|[1-9]\\d*)
|
|
42
|
+
(?:
|
|
43
|
+
- # dash seperator for pre-release section
|
|
44
|
+
(?P<pre_l>[a-zA-Z-]+) # pre-release label
|
|
45
|
+
(?P<pre_n>0|[1-9]\\d*) # pre-release version number
|
|
46
|
+
)? # pre-release section is optional
|
|
47
|
+
"""
|
|
48
|
+
serialize = [
|
|
49
|
+
"{major}.{minor}.{patch}-{pre_l}{pre_n}",
|
|
50
|
+
"{major}.{minor}.{patch}",
|
|
51
|
+
]
|
|
52
|
+
search = "{current_version}"
|
|
53
|
+
replace = "{new_version}"
|
|
54
|
+
regex = false
|
|
55
|
+
ignore_missing_version = false
|
|
56
|
+
tag = true
|
|
57
|
+
sign_tags = false
|
|
58
|
+
tag_name = "v{new_version}"
|
|
59
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
|
60
|
+
allow_dirty = false
|
|
61
|
+
commit = true
|
|
62
|
+
message = "Bump version: {current_version} → {new_version}"
|
|
63
|
+
commit_args = "--no-verify"
|
|
64
|
+
|
|
65
|
+
[tool.bumpversion.parts.pre_l]
|
|
66
|
+
values = ["dev", "a", "b", "rc", "final"]
|
|
67
|
+
optional_value = "final"
|
|
68
|
+
|
|
69
|
+
[[tool.bumpversion.files]]
|
|
70
|
+
filename = "bsb_json/__init__.py"
|
bsb_json-0.0.0b5/pyproject.toml
DELETED
|
@@ -1,34 +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>=4.0.0b6,<=4.0.0b9999"]
|
|
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>=0.0.0b7,<=0.0.0b9999", "coverage~=7.0"]
|
|
26
|
-
dev = [
|
|
27
|
-
"pre-commit~=3.5",
|
|
28
|
-
"black~=23.11",
|
|
29
|
-
"isort~=5.12",
|
|
30
|
-
"bump2version~=1.0"
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
[tool.isort]
|
|
34
|
-
profile = "black"
|