Add Dataverse Hub endpoints #219
Closed
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 introduces endpoints to interact with the Dataverse Hub server, which manages installation records and provides access to global metrics. It includes the implementation of request and response models using Pydantic, which has been added as a new dependency. These models ensure payload and response validation and offer a convenient interface for navigating response data.
Example
Metric Filtering
The PR also adds the
FilterMetricsclass to simplify passing filter parameters to the metrics endpoint. This approach improves readability and scalability by avoiding a bloated method signature and making it easier to extend filtering options in the future.TLDR
Adds Dataverse Hub endpoints
Responses and payloads as PyDantic models
Tests to verify functionality
Due to PyDantic dep --> Python 3.8 support needs to be dropped
Closes client bindings based on https://hub.dataverse.org/openapi #218