Refactor StateQuery to provide download methods for child handlers#209
Conversation
Codecov Report
@@ Coverage Diff @@
## master #209 +/- ##
==========================================
+ Coverage 91.69% 91.81% +0.12%
==========================================
Files 36 36
Lines 3647 3664 +17
Branches 416 418 +2
==========================================
+ Hits 3344 3364 +20
+ Misses 251 249 -2
+ Partials 52 51 -1
Continue to review full report at Codecov.
|
mhidas
left a comment
There was a problem hiding this comment.
Not sure if you're still working on this... I had a quick look and made a few comments. I think this will be helpful, but it will introduce breaking changes, so will required updates in aodndata deployed in parallel.
It shouldn't introduce any breaking changes. I've run a quick test of aodndata against this branch and made sure any deprecated methods still work, but show a deprecation warning. From this point of, I don't want to break the API and require deployment shenanigans to avoid breakages. That's why I'm keen with this to formalise the "public API" of aodncore, and then audit aodndata to make sure it isn't going into parts of the library that it shouldn't. |
4eed8f4 to
e7b786f
Compare
e7b786f to
a13bf9d
Compare
a13bf9d to
2489daf
Compare
2489daf to
425af6a
Compare
mhidas
left a comment
There was a problem hiding this comment.
👍 I made a few comments with optional suggestions, but otherwise it's good to go.
There was a problem hiding this comment.
👍 Looks good! Just added another idea in a separate inline comment (above), but not sure if that's worth looking into now.
Otherwise, just two final comments:
- Since this introduces new non-breaking API changes, would a minor version bump be warranted?
- Also, see conflict in test_dummyHandler
…StateQuery. Move instantiation of WfsBroker out of StateQuery.
…ameters in subclasses
…nefile constructor
… WfsBroker.getfeature_dict, to avoid calling code having to perform the conversion each time. Replace ambiguous 'filter' terminology with 'expression' when dealing with OGCExpression objects.
…raffic to WFS server before WFS access is required
Co-authored-by: Marty Hidas <marty.hidas@utas.edu.au>
…low path strings to be added in addition to PipelineFile objects
c51850c to
8835d93
Compare
Following on from #208
This is how the above PR should have been implemented. The
StateQueryinstance represents the high level "public" interface to any existing state. This provides clarity to child handlers by providing a single "API".In addition, to reduce boilerplate in aodndata when adding custom files after input file resolution (e.g. products), PipelineFile's check_type and publish_type attributes may be set during initialisation time and a helper method was added to HandlerBase in order to automatically assign the file update callback attribute.
These are real world examples of recurring patterns in aodndata (which are currently "correct" given the current library, but should be improved):
Before
After
Before
After
state_queryinstance, without having to dig out the private storage broker objects to do it (as it is intentional that child handlers don't use these directly)