-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fix timestamp / -> - #2075
Fix timestamp / -> - #2075
Conversation
@antgonza unfortunately changing |
This is ready for review: @josenavas, @wasade, @ElDeveloper A lot of the changes were to update the tests to match the new date formats. Remember that now we are actually patching the test DB/files so this change also implies that I needed to change how we are testing some functionality. However, I think there are not big changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments. A few blocks were a bit confusing
break | ||
except ValueError: | ||
pass | ||
if date is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block is rather confusing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions? Basically, is testing which is the fmt of the date within the old formats, if it's found it using the new format. Now, new format doesn't accept 2 digits so I'm simply reassigning to one with 4 digits if one of the 2 year digits is found ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. What about a format mapping: {old_fmt: new_format}
, and in the case of unacceptable, just specify None
as the new format?
fn_prep = [f for f in tgz_obs | ||
if f.startswith('templates/1_prep_1_')][0] | ||
# 3 times | ||
self.assertTrue(fn_prep in tgz_obs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would the item continue to exist after being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we created the tests we added more artifacts and didn't assign new file paths so we reused the same ones
| | or ``mm/dd/yyyy hh`` | | | ||
| | or ``mm/dd/yyyy`` | | | ||
| | or ``mm/yyyy`` | | | ||
| ``collection_timestamp`` | ``yyyy-mm-dd hh:mm:ss`` | The time stamp (preferred) of when the sample was collected. Several format are accepted, all ISO 8601. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timezone or are these UTC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User defined? We never got to discuss this in the meetings, do you, @josenavas have a preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No preference, whatever the standard says.
| | or ``mm/dd/yyyy hh`` | | | ||
| | or ``mm/dd/yyyy`` | | | ||
| | or ``mm/yyyy`` | | | ||
| ``collection_timestamp`` | ``yyyy-mm-dd hh:mm:ss`` | The time stamp (preferred) of when the sample was collected. Several format are accepted, all ISO 8601. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No preference, whatever the standard says.
@wasade and @josenavas this is what we discussed during the last meeting about the new timestamp formats.