Skip to content

Add option to get human readable timestamps back from get_tabular_change_log #308

@bdpedigo

Description

@bdpedigo

I often do something like this

import datetime

import pytz
from caveclient import CAVEclient

root_id = 864691135851320007

client = CAVEclient("minnie65_phase3_v1")

log = client.chunkedgraph.get_tabular_change_log(root_id)[root_id]
log["timestamp"] = log["timestamp"].apply(
    lambda x: datetime.datetime.fromtimestamp(x / 1000, pytz.UTC)
)

but it's hard to remember the magic words to convert timestamps, that 1000 factor is odd, etc.

What do people think about something like

client.chunkedgraph.get_tabular_change_log(root_id, convert_timestamps=True)

to automatically do a conversion like that on the return?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions