-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add support for more recent API endpoints #90
Comments
I'm working on a PR for these:
The testing is proving to be a bit finicky, it's hard to know what the status is, especially when running the tests several times consecutively. Also, the names of the functions/API endpoints is not consistent. I'm not working on the 'complete' API endpoint, as this is for completing outputs, not the total order - which is called finish. |
@miggland if you have suggestions for better names we are very open for that. The easier to understand the better as a German would say ;-) |
Try to ensure that each unit test can run "atomically" - i.e. set the state of the items under test to a known state at the start of the test. This way, other tests won't get in the way. e.g. here : inventree-python/test/test_part.py Line 121 in a5c4fd0
The unit test ensures that the new categories created are unique, by not hard-coding the names of the categories. |
There's only a few which have different names, as below. Changing these would make things more consistent. But, it would also break things..
|
@miggland great suggestions here. The collisions are hard to solve - would need to be a major release for sure. |
@miggland I'd rather not rename any API endpoints, as this will break existing code. We can improve the documentation around the functionality, but I think we are stuck with them. Note that you can call the python functions something more sensible, and just point to the poorly-named endpoints |
Currently, I have added aliases, eg so that 'finish' and 'complete' on a build-order does the same thing. Once I get around to it I'll have another go at the tests (as you suggest, I'll have to make them atomic - just that requires adding an order, parts, assigning, shipping, and then completing the order.. |
Many database actions have now been migrated to the API:
inventree/InvenTree#2253
Some (many) of these could now be supported directly by the Python bindings:
The text was updated successfully, but these errors were encountered: