-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update get_onc_ctd
and get_onc_ferry
workers to work with ONC API v3
#234
Merged
Conversation
This file contains 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
Added unit test for production YAML configuration file ctd data observations elements used in after_* () functions.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
==========================================
+ Coverage 77.65% 77.72% +0.06%
==========================================
Files 133 133
Lines 18705 18758 +53
Branches 1900 1900
==========================================
+ Hits 14526 14580 +54
+ Misses 4113 4112 -1
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Modified the get_onc_ctd worker to use ONC API v3 'getByLocation' method. The new method uses a location code instead of a station name. Also, these changes include adding a 'dateTo' parameter to limit the data to a specific time range for the day. Additionally, small changes to variable and parameter names were made to match the new method requirements.
Add unit tests for production YAML config file elements related to worker; re: issue #117.
The 'nowcast.yaml' configuration file has been updated to include the Tsawwassen - Duke Point ferry route details including devices, sensors, and other relevant data.
The dataset ID for TWDP-ferry was updated in the 'nowcast.yaml' configuration file and in respective test. The change is reflected accurately to match the new details for the Tsawwassen - Duke Point ferry route.
Modified the get_onc_ferry worker to use ONC API v3 'getByLocation' method. The new method uses a location code instead of a station name. Also, these changes include adding a 'dateTo' parameter to limit the data to a specific time range for the day. Server-side averaging into 1-second bins is used to ensure that an entire day's observations from each sensor can be obtained by a single API request; there is a limit of 100,000 "rows" per sensor. Additionally, small changes to variable and parameter names were made to match the new method requirements.
Updated the ONC_data_product_url attribute in the datasets produced by the get_onc_ferry worker to reflect changes in the data source's domain name and API query parameter names. Code changes include updating the ONC data API domain name, adding the 'locationCode' query parameter, and changing the 'deviceCategory' query parameter name to 'deviceCategoryCode'. All of those changes are for compatibility with the ONC data API v3.
Changed the naming representation of the relative humidity attribute in the 'get_onc_ferry' worker. The attribute was initially named "REL_HUMIDITY" and it was renamed to "rel_humidity", matching the common low-caps format of the other attributes for consistency of naming convention.
Adjust the QA/QC filter settings in the 'get_onc_ferry' worker to now include data where the 'qaqcFlag' attribute is less than or equal to 1 or greater than or equal to 7. This update is necessary because of the change to server-side averaging in the request.
ONC API v3 has more/different ways of returning empty responses to data requests that we have to handle. It's not as clean as I would like, but it is good enough for the purpose.
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.
No description provided.