Skip to content

Schema cleanup tmp - #9143

Merged
SchrodingersGat merged 8 commits into
inventree:masterfrom
1337joe:schema-cleanup-tmp
Feb 28, 2025
Merged

SchrodingersGat merged 8 commits into
inventree:masterfrom
1337joe:schema-cleanup-tmp

Conversation

@1337joe

@1337joe 1337joe commented Feb 22, 2025

Copy link
Copy Markdown
Contributor

This doesn't cover everything, but it at least hits the endpoints I've written tests for using a opanapi-generated api client in Java. I'll continue working on that as I have time but I wanted to get a first batch committed, especially since I see the auth api just got reworked and I don't want to get merge conflicts from sitting on my changes too long.

The added type hints address warnings thrown by schema generation.

Nullable is added to various fields that my tests get null responses from using the sample data.

Works on #9045 but doesn't fully solve it

@netlify

netlify Bot commented Feb 22, 2025 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 7d828e1
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67bff59e374ebf0007bdc2e0

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@1337joe

1337joe commented Feb 22, 2025

Copy link
Copy Markdown
Contributor Author

I'll get the failing tests cleaned up tonight. Apparently the nullable type hint that I put in for the schema generator is not at all supported by the testing framework.

@SchrodingersGat

Copy link
Copy Markdown
Member

The annotated fields which are read only should not be nullable IMO. They are always going to be either true or false

@codecov

codecov Bot commented Feb 26, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.10%. Comparing base (92edbf4) to head (7d828e1).
Report is 217 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9143      +/-   ##
==========================================
+ Coverage   86.05%   86.10%   +0.04%     
==========================================
  Files        1182     1182              
  Lines       52116    52117       +1     
  Branches     2185     2185              
==========================================
+ Hits        44850    44875      +25     
+ Misses       6706     6682      -24     
  Partials      560      560              
Flag Coverage Δ
backend 88.11% <100.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat

Copy link
Copy Markdown
Member

@1337joe getting there! You just need to increment the API version in ./src/backend/InvenTree/InvenTree/api_version.py

@SchrodingersGat

Copy link
Copy Markdown
Member

@1337joe you'll also need to add a descriptive entry into the api version file :)

@1337joe

1337joe commented Feb 28, 2025

Copy link
Copy Markdown
Contributor Author

I'm guessing there's nothing I can do about the API schema documentation diff being too big for the job to complete?

@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair what do you think here? Are we OK to merge, or will this break things?

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems to be covered by tests pretty well; should be ok;
Ready for merge

@SchrodingersGat
SchrodingersGat merged commit 157cbbe into inventree:master Feb 28, 2025
@1337joe
1337joe deleted the schema-cleanup-tmp branch February 28, 2025 12:14
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.

3 participants