-
Notifications
You must be signed in to change notification settings - Fork 9
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
Series beginDateTime source in ODM2 timeseries DAO? #200
Comments
It gets it from seriesResult here: https://github.com/ODM2/WOFpy/blob/master/wof/core_1_1.py#L779 |
Probably it takes the first and last of the datetime in all your results values. If you don't think that is correct and it is not meeting what WaterML1_1 is supposed to do, please let me know and point me to the documentation of what is supposed to be there. Thanks. |
Yeah it would make sense if it where finding the first and last datetime in the result values for the series but in this case it is not finding the correct beginDateTime. I checked in the database. actually you have a copy resultid 16664 if you want to look. |
Okay, I will look into what's going on here. Thanks for letting me know. |
I'm looking into this too.
Miguel, have you noticed that two of the variables do have a beginning in
August 2017?
On Oct 20, 2017 9:47 AM, "Landung Setiawan" <[email protected]> wrote:
Okay, I will look into what's going on here. Thanks for letting me know.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#200 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAtUA3dfm4v3ZwWzrWKscnbnpWyrB49fks5suM6pgaJpZM4QA17F>
.
|
Hi All, It seems like the values are grabbed from Action. https://github.com/ODM2/WOFpy/blob/master/wof/examples/flask/odm2/timeseries/sqlalch_odm2_models.py#L126 Here's what I get from debugging (All Action Instances)
|
Though the end date is not any of those values... hmm... |
Well, see the logic starting on the next line: if a_obj.EndDateTime is not None:
self.EndDateTimeUTC = a_obj.EndDateTime.isoformat()
else:
self.EndDateTimeUTC = r.tsrv_EndDateTime.isoformat() A time series that's still ongoing (eg, sensor is still deployed) is supposed to have a NULL action Back to the |
Haha yea.. I remember that logic now! We put that in place 😄 Thanks @emiliom |
I should add that the logic used in WOFpy can get tricky (ie, would need customization) if there's a chain of related actions during a sensor deployment. Or one can say, screw the attempt to minimize response times by leveraging |
@emiliom Yeah, I don't have an action for each sensor deployment. In most cases I have a generic sensor deployment action that is just serving to link the sampling feature and method. The funny thing is I'm actually going through a fair amount of trouble storing start and end dates in some result extension property values in ODM2 Admin. 😢 |
Well, the silver lining is that maybe you can customize your DAO to read from those result extension properties instead. I don't remember if Then, let's discuss the broader issue of ODM2 conventions and challenges at the workshop, with a broader group! Maybe it's a good topic to discuss with everyone at the workshop, not just a small subset of people. |
Yes, looks like it does. Yes, discussing conventions and challenges does sound like a good idea. I'll look into customizing the DAO. |
@lsetiawan
I'm looking at the results from the following call, particularly the section below. Where does beginDateTime come from? I tried poking around in the code but I'm not finding it. The listed end date 2016-09-18T13:00:00 is correct but the first record for this time series is on 2016-07-07T10:00. This site was only active for a short time.
http://odm2admin.cuahsi.org/wofpy/odm2lczo/rest/1_1/GetSiteInfo?site=odm2lczo:RESDN
The text was updated successfully, but these errors were encountered: