Skip to content

feat: allow custom (de)normalization#32

Merged
jkowalleck merged 2 commits intomainfrom
feat/custom_normalize
Oct 10, 2023
Merged

feat: allow custom (de)normalization#32
jkowalleck merged 2 commits intomainfrom
feat/custom_normalize

Conversation

@jkowalleck
Copy link
Collaborator

@jkowalleck jkowalleck commented Oct 9, 2023

allow custom (de)normalization.

the functionality is layered over the existing (de)serialization, and falls back to it.
therefore, this is a non-breaking change.

fixes #14


  • implement
  • (integration) tests

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck marked this pull request as ready for review October 10, 2023 07:03
@jkowalleck jkowalleck requested a review from madpah as a code owner October 10, 2023 07:03
@jkowalleck jkowalleck merged commit aeecd6b into main Oct 10, 2023
@jkowalleck jkowalleck deleted the feat/custom_normalize branch October 10, 2023 07:10
jkowalleck referenced this pull request in CycloneDX/cyclonedx-python-lib Oct 10, 2023
breaking changes
------------------
* Reworked license related models and collections
* API
  * Removed class `factory.license.LicenseChoiceFactory`  
    The old functionality was integrated into `factory.license.LicenseFactory`.
  * Method `factory.license.LicenseFactory.make_from_string()`'s parameter `name_or_spdx` was renamed to `value`
  * Method `factory.license.LicenseFactory.make_from_string()`'s return value can also be a `LicenseExpression`
    The behavior imitates the old `factory.license.LicenseChoiceFactory.make_from_string()`
  * Renamed class `module.License` to `module.license.DisjunctliveLicense`
  * Removed class `module.LicenseChoice`
    Use dedicated classes `module.license.DisjunctliveLicense` and `module.license.LicenseExpression` instead
  * All occurrences of `models.LicenseChoice` were replaced by `models.licenses.License`
  * All occurrences of `SortedSet[LicenseChoice]` were specialized to `models.license.LicenseRepository`


fixes
------------------
* serialization of multy-licenses #365

added
------------------
* API
  * Method `factory.license.LicenseFactory.make_with_expression()`
  * Class `model.license.DisjunctiveLicense`
  * Class `model.license.LicenseExpression`
  * Class `model.license.LicenseRepository`
  * Class `serialization.LicenseRepositoryHelper`

tests
------------------
* added regression test for bug #365

misc
------------------
* raised dependency `py-serializable@^9.15`



----

fixes #365

~~BLOCKED by a feature request to serializer: <https://github.com/madpah/serializable/pull/32>~~


---------

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: allow custom-XML-serialization of lists/child-elements

1 participant