Open vsoch opened 3 years ago
I think we should have a consistent timestamp (ideally the same as snakemake does). The only thing I would propose/choose something compatible with humanfriendly.
I was actually going to suggest that we look through dependencies and remove those that aren't essential, humanfriendly was one that caught my eye because it's used just once:
$ grep -R humanfriendly
app.py:import humanfriendly
app.py: return humanfriendly.format_timespan(value)
And we could achieve the same with just a regular expression. Would you be open to an issue that looks through current dependencies and sees if we can slim down the set?
It looks like you have a function to format the timestamp in a view, another option
def format_datetime(value, format="%d %b %Y %I:%M %p"):
...
Although I do think the human friendly timestamp to show in a web interface should be different than the one used programatically (the first optimized for human readability, the latter for machine).
@gkostoulas Any opinion on this? It relates to https://github.com/panoptes-organization/panoptes/issues/79
@vsoch I think that the timestamps that you chose are fine.
It looks like several of the Workflow fields return a timestamp in the json, and I don't see specific formatting so I think with flask's jsonify it might come out like this
Should there be a more common / standard datetime format here? It looks like snakemake uses a sort of flattened version:
And more standard would be something like:
or even if we just print it (is this what the flask app currently does?