Update givpower calculation - #55
Merged
Merged
Conversation
- Deleted the GET_TOP_POWER_RANK_QUERY as it is no longer needed for GIVpower scoring normalization.
- Deleted the getTopPowerRank method as it is no longer necessary for GIVpower scoring normalization, following recent updates to scoring calculations.
- Deleted the getTopPowerRank method and the GET_TOP_POWER_RANK_QUERY as they are no longer necessary for GIVpower scoring normalization, streamlining the ImpactGraphService.
- Revised comments in ScoringInputDto to enhance clarity regarding the highest power rank value for normalization, specifying behavior when null or undefined.
…d improved logging - Added checks to prevent division by zero in scoring calculations, returning 0 and logging warnings for invalid decay days and minimum posts thresholds. - Improved logging for GIVpower rank score calculations, including input values and results for better debugging. - Updated the getDaysSince method to return 0 for future dates, ensuring accurate decay calculations.
- Modified evaluateProjects method to accept projects with power data and highestPowerRank, enhancing flexibility in project evaluations. - Improved logging to include project power data and evaluation details for better debugging. - Removed the need to fetch top power rank, streamlining the evaluation process and reducing unnecessary queries. - Updated related methods to ensure consistent handling of power rank values across evaluations.
- Introduced ProjectWithPowerDto to encapsulate project ID and optional power metrics. - Updated EvaluateProjectsRequestDto to accept an array of ProjectWithPowerDto, enhancing the structure for project evaluations.
…werRank - Added highestPowerRank property to EvaluateMultipleCausesRequestDto, allowing for optional inclusion of a numeric power rank in evaluation requests. - Enhanced validation with IsOptional and IsNumber decorators to ensure proper handling of the new property.
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.
No description provided.