Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test and fix serialization #16

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Test and fix serialization #16

merged 1 commit into from
Sep 6, 2024

Conversation

theory
Copy link
Member

@theory theory commented Sep 5, 2024

Add TryFrom<Meta> for Value and TryFrom<&Meta> for String to handle serialization.

Then add tests to ensure that Meta object loaded from v2 meta files deserialize into the same data structure. Done mainly by omitting Optional fields set to None, but also by eliminating the meta-spec.url default value and a custom x_ property, which will be restored in a future commit.

In the process, add support for badges in the resources object. This was an oversight in e803409.

While at it, change a parameter instance of &Vec<T> to &[T].

@theory theory added the enhancement New feature or request label Sep 5, 2024
@theory theory self-assigned this Sep 5, 2024
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e803409) to head (a20ac19).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          525       529    +4     
=========================================
+ Hits           525       529    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from convert-v1 to main September 5, 2024 21:53
Add `TryFrom<Meta> for Value` and `TryFrom<&Meta> for String` to handle
serialization.

Then add tests to ensure that Meta object loaded from v2 meta files
deserialize into the same data structure. Done mainly by omitting
Optional fields set to `None`, but also by eliminating the
`meta-spec.url` default value and a custom `x_` property, which will be
restored in a future commit.

In the process, add support for badges in the resources object. This was
an oversight in e803409.

While at it, change a parameter instance of `&Vec<T>` to `&[T]`.
@theory theory linked an issue Sep 5, 2024 that may be closed by this pull request
@theory theory merged commit a20ac19 into main Sep 6, 2024
138 checks passed
@theory theory deleted the round-trip branch September 6, 2024 02:06
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.

Add Meta v1 to v2 Conversion to SDK
2 participants