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

Added test statistics #7164

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

martonmiklos
Copy link
Contributor

Fixed #5995

This PR adds test statistics views to the part and build pages which provides overview about the accumulated count of the passed/failed tests.

Copy link

netlify bot commented May 5, 2024

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit a7cafc7
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6650dddc06ebf40009b2fb06

Copy link

codecov bot commented May 5, 2024

Codecov Report

Attention: Patch coverage is 27.58621% with 84 lines in your changes are missing coverage. Please review.

Project coverage is 83.90%. Comparing base (0c56bd8) to head (4d112b7).

Current head 4d112b7 differs from pull request most recent head a7cafc7

Please upload reports for the commit a7cafc7 to get more accurate results.

Files Patch % Lines
src/backend/InvenTree/stock/models.py 11.62% 38 Missing ⚠️
.../frontend/src/tables/stock/TestStatisticsTable.tsx 5.55% 34 Missing ⚠️
src/backend/InvenTree/stock/api.py 69.56% 7 Missing ⚠️
src/backend/InvenTree/stock/serializers.py 54.54% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7164      +/-   ##
==========================================
+ Coverage   83.78%   83.90%   +0.12%     
==========================================
  Files        1049     1052       +3     
  Lines       46005    46269     +264     
  Branches     1386     1328      -58     
==========================================
+ Hits        38544    38821     +277     
- Misses       7098     7124      +26     
+ Partials      363      324      -39     
Flag Coverage Δ
backend 85.34% <35.06%> (+0.20%) ⬆️
pui 63.93% <12.82%> (-1.27%) ⬇️

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.

@SchrodingersGat
Copy link
Member

@martonmiklos can you please merge in the latest changes from master, and then I can review :)

@martonmiklos
Copy link
Contributor Author

martonmiklos commented May 8, 2024

@martonmiklos can you please merge in the latest changes from master, and then I can review :)

@SchrodingersGat Done. There are two things what might need to be looked into:

  • As far as I saw filtering for datetime fields is not implemented in the PUI yet, so the date filtering is only available in the old UI.

  • I have not managed to hide the pagination (it does not makes any sense as we will always have 3 rows).
    I saw the enablePagination property, but it does not hide the pagination bar.
    Maybe I will report it to upstream if there is no trick to do that.

@SchrodingersGat
Copy link
Member

@martonmiklos where are you at with this one? :)

@martonmiklos
Copy link
Contributor Author

martonmiklos commented May 24, 2024

@martonmiklos where are you at with this one? :)

@SchrodingersGat could you please help how to properly specify links with two parameters here:
https://github.com/martonmiklos/InvenTree/blob/a7cafc792e46c0e09441431126b4d3200328c983/src/backend/InvenTree/build/templates/build/build_base.html#L304
It works, but tests are failing, and I have not found any examples in the existing code.

@SchrodingersGat
Copy link
Member

I would suggest that you make a "generic" test statistics endpoint, and rather than pinning it against specific database instances, pass those as query parameters you can filter by.

Then you can have a single API endpoint and you can filter by:

  • Stock Item
  • Part
  • Build Order
  • etc

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.

[FR] Test statistics
2 participants