-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add transducer observation handling and improve database initialization #235
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d505856
feat: add transducer observation handling and improve database initia…
jirhiker 679f57c
fix: improve assertion messages for transducer data validation
jirhiker 0cdc9e4
Update transducer.py
jirhiker 27fb338
Formatting changes
jirhiker 00ad18b
fix: enhance data validation and improve well observation retrieval i…
jirhiker 52c27bf
Formatting changes
jirhiker 2e6eb67
fix: replace init_db with erase_and_rebuild_db and update transducer …
jirhiker 35c7649
fix: update BDD test workflow to include production tag
jirhiker 8648d01
fix: update BDD test workflow to use combined tags for backend and pr…
jirhiker b0863cd
fix: add PostgreSQL environment variables for BDD test execution
jirhiker b9bb73e
feat: add endpoint for retrieving transducer groundwater level observ…
jirhiker c0fa001
fix: remove deprecated transducer groundwater level endpoint and upda…
jirhiker 8cb670e
Merge branch 'staging' into jir-fix-transducer
jirhiker 6229d22
fix: remove commented-out SpatiaLite installation and related environ…
jirhiker 39e7b60
fix: remove commented-out PostGIS images from tests.yml
jirhiker f11e2cb
fix: uncomment PostGIS image version and clean up test run commands i…
jirhiker bf67ab0
fix: update transducer groundwater level endpoint to accept optional …
jirhiker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This raises a 404 error if
thing_iddoes not exist, but sincething_idis a query parameter if there are no observations for thatthing(one of the reasons could be that thething_iddoes not exist), it should just return an empty list.I think that 404 errors should only be returned for path parameters since the full path is a resource.
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.
That is not how the feature file is written. https://github.com/DataIntegrationGroup/OcotilloBDD/blob/main/features/backend/transducer-data-response.feature
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.
Remaining faithful to the feature file, it seems like making thing_id a path parameter is the best approach. In the case of using a query parameter, I don't think it makes sense to get an empty list if the thing_id is invalid.
I think internal int ids should be path parameters
get observation/transducer-groundwater-level/123Human-readable identifiers like name, pointid, site-name, etc, should be query parameters. e.g.
get observation/transducer-groundwater-level?thing.name == 'WL-001'but we don't have a need for this functionality at this time.
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.
I wrote up a discussion about this a while ago to record my thoughts: https://github.com/orgs/DataIntegrationGroup/discussions/14
The empty list vs 404 error came up when @TylerAdamMartinez and I were working on AMP API and the water level entry form a while ago. I can look more into the appropriate response when a user supplies an erroneous query parameter.
I also agree that path parameter
ids should pertain to that table