Improving location support (backend) - #2002
Open
OMWalmsley wants to merge 3 commits into
Open
Conversation
OMWalmsley
marked this pull request as ready for review
August 12, 2026 11:30
datalab
|
||||||||||||||||||||||||||||
| Project |
datalab
|
| Branch Review |
OMWalmsley/location-route-and-location-trait
|
| Run status |
|
| Run duration | 25m 30s |
| Commit |
|
| Committer | Oliver Walmsley |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
548
|
| View all changes introduced in this branch ↗︎ | |
ml-evs
changed the base branch from
ml-evs/bump-pydantic-final-final
to
ml-evs/custom-items
August 12, 2026 13:35
Contributor
Author
|
Added ability to have server default locations and added a test for this occurrence. To use this CONFIG.EXTRA_LOCATIONS should be populated. |
ml-evs
force-pushed
the
OMWalmsley/location-route-and-location-trait
branch
from
August 12, 2026 15:23
d6f6b58 to
19e494b
Compare
ml-evs
force-pushed
the
OMWalmsley/location-route-and-location-trait
branch
from
August 13, 2026 22:49
16f0d16 to
d37a5aa
Compare
ml-evs
force-pushed
the
OMWalmsley/location-route-and-location-trait
branch
from
August 13, 2026 23:14
d37a5aa to
66f1042
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ml-evs/custom-items #2002 +/- ##
=======================================================
+ Coverage 80.30% 80.34% +0.04%
=======================================================
Files 84 84
Lines 7824 7841 +17
=======================================================
+ Hits 6283 6300 +17
Misses 1541 1541
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseeds #2001 (This new version is not from a fork and thus can be "stacked")
Resolves #1970
Locations are where things are stored. Currently we are using a single string in the database to store the location and then frontend application logic on top to create a nested hierarchy. Moving forward it would be ideal to move some of this logic to the backend to prevent locations being generated from stale/deprecated data that has been stored in the frontend.
Features
GET \locationsendpoint.HasLocationattribute for all itemsExample
An example return from the endpoint is here
{"flat_locations":["Hub1 > Hub2 > Place 1","LHud One","Lab 1 > Shelf 1 > Place A","Lab 4 > Shelf 1","lab1"],"nested_locations":{"Hub1":{"Hub2":{"Place 1":{}}},"LHud One":{},"Lab 1":{"Shelf 1":{"Place A":{}}},"Lab 4":{"Shelf 1":{}},"lab1":{}}}Testing
Currently three tests have been written to test this endpoint functionality (
GET \locations).Further planned functionality
Implement this into the frontend so that it queries this endpoint instead of using frontend storage.