Update weather-mv's start_time, end_time parameters to string.#316
Open
deepgabani8 wants to merge 1 commit intomainfrom
Open
Update weather-mv's start_time, end_time parameters to string.#316deepgabani8 wants to merge 1 commit intomainfrom
deepgabani8 wants to merge 1 commit intomainfrom
Conversation
alxmrs
reviewed
Apr 13, 2023
Contributor
alxmrs
left a comment
There was a problem hiding this comment.
A nit to try to make the code simpler. Otherwise, this LGTM.
I have a slight hesitation that this will break some pipelines, though I realize it will make weather-mv compatible with others, still.
| channel_names: A list of channel names in the asset. | ||
| start_time: Image start time in floating point seconds since epoch. | ||
| end_time: Image end time in floating point seconds since epoch. | ||
| start_time: Image start time in '%Y-%m-%dT%H:%M:%SZ' format. |
Contributor
There was a problem hiding this comment.
Is this the same as isoformat? If it is, let's just call it that.
| """Turn a numpy datetime64 into UTC timestring.""" | ||
| timestamp = float((np_time - np.datetime64(0, 's')) / np.timedelta64(1, 's')) | ||
| if isinstance(time, datetime.datetime): | ||
| return time.strftime('%Y-%m-%dT%H:%M:%SZ') |
Contributor
There was a problem hiding this comment.
If this is isofromat, let's use time.isoformat()
This file contains hidden or 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
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.