Closed CowanSM closed 11 years ago
I'm not entirely sure what the DEBUG variable and "test" parameters do. Just cache the WSDL responses to make subsequent tests faster?
Yes, the DEBUG and test parameters are for cacheing Nerrs responses so to make subsequent tests faster and to prevent putting unnecessary strain on Nerrs.
Addressed concerns. Removed caching (test and DEBUG no longer used).
The "Collector" should contact NERRS and query the data spatially, temporally, by siteid, etc. It should pass the resulting XML (minus any SOAP overhead) to the "Parser" that will create the pyoos station object. Look at the WQP (collector) and WQX (parser) for samples.
Forgot to say so in the commit. But it should address all open concerns for the pull request.
Rename the NERRS parser "folders/files" to match the functionality. They are "soap/nerrs_wsdl", but shouldn't be parsing any SOAP XML any longer. The collector should be stripping that all out.
Can create a Station object from nerrs by doing the following:
Known kwargs:
To get a list of station_codes (uid for a station), you can do the following:
Most NERRS functions have 'test' as an optional argument, this will mean that the function will try to read from a local file as opposed to going to the NERRS wsdl source. Local files are written when the DEBUG flag in nerrs.py is set to True and 'test' is not sent (or sent False) to the function. After an initial run of each function, with DEBUG set to True, then subsequent calls to the same function (with the same arguments) with 'test' set to True should allow the functions to read from the local files. If 'test' is set to True and needed local files do not exist (either because DEBUG is False or no initial run was made), the functions will fail.