Shacl2code

Latest version: v0.0.15

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.0.9

In this release:
* A new `SHACLDocument` object is created to manage object sets when serializing/deserializing
* Memory usage in python is reduced by making properties class members instead of object members
* `SHACLObject` initialization rearranged to make it easier to create custom classes
* A new `register()` class decorator makes it easier to register custom classes to be serialized/deserialized
* JSON-LD serializers order data more plesantly

**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.8...v0.0.9

0.0.8

In this release:
* Allow properties that reference non-`sh:NodeShape` classes to be referenced by a URI

**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.7...v0.0.8

0.0.7

In this release:
* Enum values are no longer named based on `rdfs:label` since that is intended to be the human readable name
* `xsd:dateTimeStamp` is now supported
* `shacl2code` now accepts multiple RDF graph input files. This is useful to add annotations to an existing model
* `https://rdf.spdx.org/ns/schema#idPropertyName` is renamed `https://jpewdev.github.io/shacl2code/schema#idPropertyName` to namespace it to shacl2code
* `spdx:refable` is removed in favor of using `sh:nodeKind` on a class since that property is validated by SHACL
* Python bindings no longer include the entire context with an arbitrary parser; compacted values are now included in the generated code instead
* Inheriting from `sh:NodeShape` is now the trigger to generate a class instead of "not being an enum"

**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.6...v0.0.7

0.0.6

In this release:
* _Lots_ of rewrites of things to make them better
* It should now be possible to write other Encoders and Decoders to serialize/deserialize data in different formats (instead of just JSON-LD)
* Adds support for custom schema properties in the model to provide information for the serializers
* Tests now use a custom model instead of the SPDX 3 model. This is more flexible and allows testing of corner cases
* Python property names now have `_` for invalid variable name characters.
* Parsing of the model now uses `rdflib` so it can handle any format supported by that library (e.g Turtle, etc.)
* Eliding of arrays that have a single member is no longer enabled by default for JSON schema (it's annoying for plain JSON consumers to have to deal with that; it's either an array or it's not).


**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.5...v0.0.6

0.0.5

*In this Release*
* Much better testing, including 100% code coverage and coverage reports
* Support for mandatory context in the generated bindings. The context is pulled when the bindings are generated and encoded in the bindings. This allows files to be written in a more human readable format, but the generated bindings don't need to go pull the context from the internet to work. Note: This only works if your context is static since it's only referenced when the bindings are generated.
* Reworking the way context is handled both in the code and in the generated Python bindings
* A new `jsonschema` output format which generates a [JSONSchema](https://json-schema.org/) file that can be used to validate a document is correctly formatted. This can be useful if users want to validate their documents without needing a full JSON-LD validator.

**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.4...v0.0.5

0.0.4

In this release:
* Added `version` subcommand

**Full Changelog**: https://github.com/JPEWdev/shacl2code/compare/v0.0.3...v0.0.4

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.