Conversation
- Also fixes the issue that single-compound fields break the code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the library to support custom terms, which are treated differently than the standard
licensefield. This enhancement addresses the use case raised in #46 regarding custom terms of use. Additionally, it resolves issue #45, where fields likeSocialScienceNotes(which is a sinfle-valued compound) were parsed incorrectly, resulting in aDottedDictholding the raw response and triggering aValidationError.Implementation Details
Dataverse responses may include a set of custom term fields that appear at the root level of the JSON. This PR introduces a new
CustomLicenseclass to encapsulate and parse these fields. The decision to extract this into a separate class is motivated by two key considerations:LicenseandCustomLicenseare exposed via the samelicenseproperty on theDataset, maintaining a clean API and avoiding the need to manage additional initialization properties.licensefield reflects Dataverse behavior, where either a standard license or custom terms may be present — but not both.Example Usage