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: better submission status #421

Merged
merged 8 commits into from
May 16, 2024
Merged

chore: better submission status #421

merged 8 commits into from
May 16, 2024

Conversation

francisvaut
Copy link
Contributor

closes #418

  • In the submission status endpoint, use the models for structure_checks and extra_checks in backend instead of the is_valid field.
  • ProjectMeter now also displays the amount of tests that succeeded the structure checks but failed the extra checks.
  • Extra tests

@francisvaut francisvaut added frontend Issues regarding the frontend backend labels May 13, 2024
@francisvaut francisvaut added this to the Final milestone milestone May 13, 2024
@francisvaut francisvaut self-assigned this May 13, 2024
@francisvaut
Copy link
Contributor Author

Ignore the failing tests: both frontend and backend tests succeed, Cypress fails.

@francisvaut francisvaut marked this pull request as draft May 14, 2024 09:10
@francisvaut francisvaut marked this pull request as ready for review May 15, 2024 18:44
backend/api/serializers/project_serializer.py Show resolved Hide resolved
backend/api/tests/test_project.py Show resolved Hide resolved
return [
{
value: (submissionsPassed / groups) * 100,
value: (extraChecksPassed / groups) * 100,
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it possible to have extrachecks passed but structure checks not? I would change this to the min of those 2.

Copy link
Contributor Author

@francisvaut francisvaut May 16, 2024

Choose a reason for hiding this comment

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

That code is not extrachecks and structurechecks for a single submission, but for a whole project (PojectMeter).

Copy link
Contributor

Choose a reason for hiding this comment

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

You should round this to the nearest integer to account for representation errors, it could happen that the meter now displays 22.3333333333331%.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the MeterGroup component already rounds these values by default.

@EwoutV EwoutV merged commit 143c994 into development May 16, 2024
3 checks passed
@EwoutV EwoutV deleted the submission-status2 branch May 16, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend frontend Issues regarding the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend: is_valid does not mean passed
3 participants