-
Notifications
You must be signed in to change notification settings - Fork 8
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
refactor: added new types to form the basis of scoring refactor #127
Merged
Conversation
This file contains 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
There's a new Rust version out as of last Thursday, and I suspect that's the issue with the CI. |
… activity analysis
alilleybrinker
requested changes
Jun 17, 2024
@j-lanson just some minor changes! |
alilleybrinker
approved these changes
Jun 18, 2024
My one remaining comment about turning the |
Thanks @j-lanson! |
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.
Note: Not sure why the Ubuntu
clippy
is complaining about unused fields now that it used to not have a problem with. Perhaps a change was made over the past few days that removedDebug
from the field usage calculation?An attempt at defining new types for overhauling the
AnalysisResult
system and Hipcheck scoring in general.HC
prefix was added to structs/variants to disambiguate with existing structs and can/should be renamed once the old system has been removed in a subsequent PR.The goal of this PR is to produce an
AnalysisReport
replacement with the following changes:db.<X>_active()
to decide themselves whether or not to run. The oldAnalysisOutcome
enum contains theSkip
variant which is absent from the new one. Instead, we wrap theHCAnalysisResult
in an option to represent the skipped/executed status of an analysis.Pass
,Fail
language is also removed from this replacement infrastructure, and analyses won't know or return their own thresholds.AnalysisReport
for each analysis type as the existing system does. In this new system, analyses will return a basic/composite value type, and the config/analysis will select from a set of "predicates" that specify how that result is to be interpreted for pass/fail determination. The only one that we have right now isThresholdPredicate
, which allows specifying that a basic value must be above/equal/below a certain value of the same type.I added the
indexmap
depedency for theIndexMap
object, which is an order-preserving HashMap drop-in replacement. In the past I have found this important for JSON dict comparison. I imagine we will want to update the predicates for comparing composite types.