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

Unit tests for Weighted Arithmetic Mean and Distribution #248

Merged
merged 10 commits into from
Dec 1, 2022

Conversation

nathannaveen
Copy link
Contributor

  • Added unit tests for WAM.

Signed-off-by: nathannaveen 42319948+nathannaveen@users.noreply.github.com

@nathannaveen nathannaveen changed the title Unit tests for Weighted Arthmetic Mean Unit tests for Weighted Arithmetic Mean and Distribution Nov 23, 2022
Copy link
Contributor

@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Thanks for implementing these tests!

internal/scorer/algorithm/wam/wam.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/distribution_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/distribution_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/distribution_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/distribution_test.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam.go Outdated Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Show resolved Hide resolved
internal/scorer/algorithm/wam/wam_test.go Show resolved Hide resolved
internal/scorer/algorithm/wam/wam.go Outdated Show resolved Hide resolved
internal/scorer/config.go Outdated Show resolved Hide resolved
- Added unit tests for WAM.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
- Added unit tests for distribution

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
- formatted WAM
- formatted wam_test
- Edited test for wam_test

Addressed Code Review Comments

- Included additional tests
- Refactored structs within tests
- Re-formatted code

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Copy link
Contributor

@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Looking good, just one minor change!

internal/scorer/config.go Outdated Show resolved Hide resolved
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Copy link
Contributor

@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Thanks!

@calebbrown calebbrown merged commit cb65541 into ossf:main Dec 1, 2022
@nathannaveen
Copy link
Contributor Author

Thanks!

Yay! Thanks for all your reviews! Merged! 🥳

nathannaveen added a commit to nathannaveen/criticality_score that referenced this pull request Feb 9, 2023
* Unit tests for Weighted Arthmetic Mean

- Added unit tests for WAM.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Unit tests for distribution

- Added unit tests for distribution

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Fixed WAM issues

- formatted WAM
- formatted wam_test
- Edited test for wam_test

Addressed Code Review Comments

- Included additional tests
- Refactored structs within tests
- Re-formatted code

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Refactored Code

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Updated based on code review comments

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Removed the ignored files

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Fixed the validation after unmarshalling

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Fixed code review comment

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Fixed based on comment

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Co-authored-by: Caleb Brown <calebbrown@google.com>
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.

None yet

2 participants