CouncilDataProject / cdp-backend

Data storage utilities and processing pipelines used by CDP instances.
https://councildataproject.org/cdp-backend
Mozilla Public License 2.0
22 stars 26 forks source link

Change `Transcript` object repr / to string #149

Closed evamaxfield closed 2 years ago

evamaxfield commented 2 years ago

I am not sure how to do this for a dataclass but I assume we can just do it in the object definition.

When I print out a Transcript object in a Jupyter notebook or any Python interpreter really, the repr and the tostring include the whole transcript details. I would prefer the shortened details:

Transcript(
    generator='CDP WebVTT Conversion -- CDP v3.0.2',
    confidence=0.9699999999999663,
    session_datetime='2021-11-18T09:30:00-08:00',
    created_datetime='2022-01-12T05:05:00.633612',
    sentences=[...],
    annotations=None
)

Basically hiding the sentences because it makes the repr massive.