-
Notifications
You must be signed in to change notification settings - Fork 6
API query enhancements #207
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
base: master
Are you sure you want to change the base?
Conversation
…t clauses; remove pure sql and replace with ORM approach
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #207 +/- ##
==========================================
+ Coverage 59.68% 60.25% +0.56%
==========================================
Files 23 23
Lines 1146 1195 +49
==========================================
+ Hits 684 720 +36
- Misses 462 475 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I've added a new api function |
| Args: | ||
| verbose: If True, return denormalized data with related table | ||
| columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor style suggestion to line up name and description to:
verbose: If True, return denormalized data with related table
columns
| Args: | ||
| verbose: If True, return denormalized data with related table | ||
| columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same suggestion as above on how to line up argument name and description
This PR enhances the API query capabilities so that information from tables related to point and layer data can be easily included in the standard
areaorfilterqueries. I suggest averboseBoolean that returns only the base table columns (other than unnecessary foreign key values) forFALSE, and all other information in any foreign key related tables forTRUE.In order to make this work for both
areaandfilterqueries, all query logic needed to use the sqlalchemy ORM. In the previous PR I had pure SQL to handle the new postgis area calculations. These are now replaced with equivalent ORM approaches.In the notebook examples I wanted to be able to ask, "What types of data are available for just the layer or point data?". This required defining
all_typesuniquely for the Point and Layer classes so that only the types joined with those tables were returned.A small error was corrected for
all_instrumentswhere non-distinct values were being returned.Small updates to the Lambda handler were needed to accommodate the
verbosekeyword.Additional examples are added to the example notebook, still in draft form. We will continue updating gallery examples in a separate PR.
This PR makes use of the Claude Sonnet 4.5 coding agent.