Skip to content

Updates to make use of aodncore API improvements#249

Draft
mhidas wants to merge 8 commits intomasterfrom
update_for_new_aodncore_api
Draft

Updates to make use of aodncore API improvements#249
mhidas wants to merge 8 commits intomasterfrom
update_for_new_aodncore_api

Conversation

@mhidas
Copy link
Copy Markdown
Contributor

@mhidas mhidas commented Jan 14, 2021

aodn/python-aodncore#209 introduces a couple of API improvements for:

  • handlers explicitly creating and adding PipelineFile objects to their file_collection; and
  • handlers downloading remote files
    The old functionality is still there, but now issues deprecation warnings.

This PR is to update all handlers to use the new API, so the old methods can be removed in a future aodncore update.

mhidas and others added 4 commits January 19, 2021 11:35
Add fail-fast: false
for remote file downloads and file_collection additions
@mhidas mhidas force-pushed the update_for_new_aodncore_api branch from c0449e1 to bc7b709 Compare January 19, 2021 00:39
@mhidas mhidas mentioned this pull request Jan 19, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 19, 2021

Codecov Report

Merging #249 (4b1e4df) into master (2e12545) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
- Coverage   88.02%   87.98%   -0.05%     
==========================================
  Files          50       50              
  Lines        3214     3203      -11     
  Branches      534      534              
==========================================
- Hits         2829     2818      -11     
  Misses        241      241              
  Partials      144      144              
Impacted Files Coverage Δ
setup.py 0.00% <ø> (ø)
aodndata/aatams/aatams_sattag.py 87.50% <100.00%> (-0.58%) ⬇️
aodndata/moorings/handlers.py 96.22% <100.00%> (-0.14%) ⬇️
aodndata/moorings/products_handler.py 86.77% <100.00%> (-0.21%) ⬇️
aodndata/soop/soop_trv.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e12545...4b1e4df. Read the comment docs.

Comment on lines +82 to 84
files_for_layer = broker.query_files('soop_trv_duplicate_url')
self.assertEqual(files_for_layer[0],
'IMOS/SOOP/SOOP-TRV/VMQ9273_Solander/By_Cruise/Cruise_START-20181205T035932Z_END-20181206T045722Z/temperature/IMOS_SOOP-TRV_T_20181205T035932Z_VMQ9273_FV01_END-20181206T045722Z.nc')
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lwgordonimos Should this test be creating a WfsBroker instead of using the new state_query api?
e.g.

Suggested change
files_for_layer = broker.query_files('soop_trv_duplicate_url')
self.assertEqual(files_for_layer[0],
'IMOS/SOOP/SOOP-TRV/VMQ9273_Solander/By_Cruise/Cruise_START-20181205T035932Z_END-20181206T045722Z/temperature/IMOS_SOOP-TRV_T_20181205T035932Z_VMQ9273_FV01_END-20181206T045722Z.nc')
handler = self.handler_class(GOOD_NC)
files_for_layer = handler.state_query.query_wfs_files('soop_trv_duplicate_url')
self.assertEqual(files_for_layer[0].dest_path,
'IMOS/SOOP/SOOP-TRV/VMQ9273_Solander/By_Cruise/Cruise_START-20181205T035932Z_END-20181206T045722Z/temperature/IMOS_SOOP-TRV_T_20181205T035932Z_VMQ9273_FV01_END-20181206T045722Z.nc')

In fact, this is already implicitly tested by test_good_netcdf above, so this one is kind of rendundant.
@lbesnard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants