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

chore(model): Minor package related fixes #9671

Merged
merged 2 commits into from
Dec 28, 2024
Merged

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented Dec 27, 2024

See individual commits.

Context: #8725.

@fviernau fviernau requested a review from a team as a code owner December 27, 2024 09:11
@fviernau fviernau enabled auto-merge (rebase) December 27, 2024 09:11
@fviernau fviernau force-pushed the ort-result-labels-seroder branch from e238a23 to 419f45d Compare December 27, 2024 09:22
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.10%. Comparing base (60edfdf) to head (c71261b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9671   +/-   ##
=========================================
  Coverage     68.10%   68.10%           
  Complexity     1294     1294           
=========================================
  Files           249      249           
  Lines          8841     8841           
  Branches        922      922           
=========================================
  Hits           6021     6021           
  Misses         2432     2432           
  Partials        388      388           
Flag Coverage Δ
funTest-docker 65.14% <ø> (ø)
funTest-non-docker 33.28% <ø> (ø)
test-ubuntu-24.04 35.91% <ø> (ø)
test-windows-2022 35.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fviernau fviernau changed the title chore(model): Serialize OrtResult.labels in alphabetical order chore(model): Minor package related fixes Dec 27, 2024
@fviernau fviernau force-pushed the ort-result-labels-seroder branch from 077a032 to e377c4d Compare December 27, 2024 10:36
@@ -147,10 +147,8 @@ data class Package(
val EMPTY = Package(
id = Identifier.EMPTY,
purl = "",
authors = emptySet(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I believe that by convention we should always set all arguments for any val EMPTY. Because if ever a default value changes to something non-"empty", then you don't need to remember to adjust that parameter here as well.

Some places already do set all values despite their default values being empty / null (like OrtResult), other's don't (like ScanSummary). IMO we should align all of these to set all values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've dropped the commit for now.

@fviernau fviernau force-pushed the ort-result-labels-seroder branch from e377c4d to c3c999c Compare December 27, 2024 21:50
@fviernau fviernau requested a review from sschuberth December 27, 2024 21:51
Make the serialization more deterministic.

Signed-off-by: Frank Viernau <[email protected]>
Move the function to its only caller and reduce the visibility.

Signed-off-by: Frank Viernau <[email protected]>
@fviernau fviernau force-pushed the ort-result-labels-seroder branch from c3c999c to c71261b Compare December 28, 2024 10:04
@fviernau fviernau merged commit 4cae987 into main Dec 28, 2024
26 checks passed
@fviernau fviernau deleted the ort-result-labels-seroder branch December 28, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants