shacl2code 0.0.20__tar.gz → 0.0.22__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.
- {shacl2code-0.0.20 → shacl2code-0.0.22}/PKG-INFO +11 -2
- {shacl2code-0.0.20 → shacl2code-0.0.22}/README.md +6 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/pyproject.toml +7 -1
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/common.py +0 -2
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/lang.py +0 -1
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/python.j2 +686 -292
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/model.py +0 -2
- shacl2code-0.0.22/src/shacl2code/version.py +1 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/roundtrip.json +8 -7
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_model_source.py +0 -4
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_python.py +155 -71
- shacl2code-0.0.20/src/shacl2code/version.py +0 -1
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.flake8 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.github/workflows/coverage-generate.yaml +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.github/workflows/coverage-report.yaml +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.github/workflows/publish.yaml +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.github/workflows/scorecard.yml +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.github/workflows/test.yaml +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/.gitignore +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/LICENSE +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/SECURITY.md +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/__init__.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/__main__.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/context.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/__init__.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/cpp.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/golang.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/jinja.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/jsonschema.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/python.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/sources/cpp/json.hpp +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/Doxyfile.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/Makefile.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/api.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/datetime.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/datetime.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/decode.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/decode.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/encode.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/encode.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/errorhandler.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/errorhandler.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/exceptions.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/extensible.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/extensible.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/header.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/jsonld-header.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/jsonld-source.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/link.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/link.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/namedindividual.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/namedindividual.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/object.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/object.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/objectpath.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/objectpath.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/objectset.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/objectset.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/pkgconfig.pc.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/prop.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/property.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/property.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/propertyvalue.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/propertyvalue.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/ref.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/refproperty.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/refproperty.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/source.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/type.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/type.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/util.cpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/util.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/validate.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/cpp/walk.hpp.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/classes.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/decode.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/encode.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/errorhandler.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/errors.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/extensible.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/linkstate.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/listproperty.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/optional.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/path.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/property.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/ref.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/reflistproperty.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/refproperty.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/shaclobject.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/shaclobjectset.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/shacltype.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/util.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/golang/validator.go.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/lang/templates/jsonschema.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/main.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/src/shacl2code/urlcontext.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/testfixtures/testfixtures/__init__.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/testfixtures/testfixtures/httpserver.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/testfixtures/testfixtures/jsonvalidation.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/testfixtures/testfixtures/timetests.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/testfixtures/testfixtures/utils.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/conftest.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/abort.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-id.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-node-kind.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-pattern-class.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-pattern-integer.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-prop-type.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/bad-reference.jsonld +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/context-url.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/context.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/links.json +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/missing-range.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/model/test-context.json +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/model/test.ttl +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/python/bad-object-type-inline.json +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/python/bad-object-type-ref-after.json +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/python/bad-object-type-ref-before.json +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/data/raw.j2 +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_cli.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_common_jinja.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_common_prefix.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_context.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_cpp.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_golang.py +0 -0
- {shacl2code-0.0.20 → shacl2code-0.0.22}/tests/test_jsonschema.py +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shacl2code
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.22
|
|
4
4
|
Summary: Convert SHACL model file to code bindings
|
|
5
5
|
Project-URL: Homepage, https://github.com/JPEWdev/shacl2code
|
|
6
6
|
Project-URL: Repository, https://github.com/JPEWdev/shacl2code.git
|
|
7
7
|
Project-URL: Issues, https://github.com/JPEWdev/shacl2code/issues
|
|
8
8
|
Author-email: Joshua Watt <JPEWhacker@gmail.com>
|
|
9
|
+
License-Expression: MIT
|
|
9
10
|
License-File: LICENSE
|
|
10
11
|
Classifier: Development Status :: 4 - Beta
|
|
11
12
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.8
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -23,6 +23,9 @@ Requires-Dist: rdflib>=7.0.0
|
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: flake8>=7.0.0; extra == 'dev'
|
|
25
25
|
Requires-Dist: jsonschema>=4.21.1; extra == 'dev'
|
|
26
|
+
Requires-Dist: mypy>=1.14.1; extra == 'dev'
|
|
27
|
+
Requires-Dist: pyrefly>=0.28.1; extra == 'dev'
|
|
28
|
+
Requires-Dist: pyright>=1.1.403; extra == 'dev'
|
|
26
29
|
Requires-Dist: pyshacl>=0.25.0; extra == 'dev'
|
|
27
30
|
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
|
|
28
31
|
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
@@ -100,6 +103,12 @@ pytest
|
|
|
100
103
|
In addition to the test results, a test coverage report will also be generated
|
|
101
104
|
using [pytest-cov][pytest-cov]
|
|
102
105
|
|
|
106
|
+
The test suite is quite extensive and can catch a lot of errors. When adding
|
|
107
|
+
new features to the code generation, please add tests to ensure that these
|
|
108
|
+
features continue to behave as expected.
|
|
109
|
+
|
|
110
|
+
All changes to the code are expected to pass the test suite before they merge.
|
|
111
|
+
|
|
103
112
|
## Custom Annotations
|
|
104
113
|
|
|
105
114
|
`shacl2code` supports a number of custom annotations that can be specified in a
|
|
@@ -70,6 +70,12 @@ pytest
|
|
|
70
70
|
In addition to the test results, a test coverage report will also be generated
|
|
71
71
|
using [pytest-cov][pytest-cov]
|
|
72
72
|
|
|
73
|
+
The test suite is quite extensive and can catch a lot of errors. When adding
|
|
74
|
+
new features to the code generation, please add tests to ensure that these
|
|
75
|
+
features continue to behave as expected.
|
|
76
|
+
|
|
77
|
+
All changes to the code are expected to pass the test suite before they merge.
|
|
78
|
+
|
|
73
79
|
## Custom Annotations
|
|
74
80
|
|
|
75
81
|
`shacl2code` supports a number of custom annotations that can be specified in a
|
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
|
15
15
|
"Development Status :: 4 - Beta",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"Topic :: Software Development :: Build Tools",
|
|
18
|
-
"License :: OSI Approved :: MIT License",
|
|
19
18
|
"Programming Language :: Python :: 3",
|
|
20
19
|
"Programming Language :: Python :: 3.8",
|
|
21
20
|
"Programming Language :: Python :: 3.9",
|
|
@@ -23,11 +22,15 @@ classifiers = [
|
|
|
23
22
|
"Programming Language :: Python :: 3.11",
|
|
24
23
|
"Programming Language :: Python :: 3.12",
|
|
25
24
|
]
|
|
25
|
+
license = "MIT"
|
|
26
26
|
|
|
27
27
|
[project.optional-dependencies]
|
|
28
28
|
dev = [
|
|
29
29
|
"flake8 >= 7.0.0",
|
|
30
30
|
"jsonschema >= 4.21.1",
|
|
31
|
+
"mypy >= 1.14.1", # latest version for Python 3.8 is 1.14.x
|
|
32
|
+
"pyrefly >= 0.28.1",
|
|
33
|
+
"pyright >= 1.1.403",
|
|
31
34
|
"pyshacl >= 0.25.0",
|
|
32
35
|
"pytest >= 7.4",
|
|
33
36
|
"pytest-cov >= 4.1",
|
|
@@ -59,3 +62,6 @@ pythonpath = [
|
|
|
59
62
|
|
|
60
63
|
[tool.coverage.run]
|
|
61
64
|
relative_files = true
|
|
65
|
+
|
|
66
|
+
[tool.black]
|
|
67
|
+
include = '(\.pyi?$)|(python\.j2$)'
|