The current __repr__ of GenericSeq (default we get from attrs) is very verbose but not in a way that would be super helpful, especially when there its annot attribute has many crowsetta.Annotation instances.
The example I'm working with in a vignette gives something like this
Number of annotation instances from Giraudon et al. 2021: 459 Converted to 'generic-seq': GenericSeq(annots=[Annotation(annot_path=PosixPath('data/audacity-annotations/100_marron1_May_24_2016_62101389.audacity.txt'), notated_path=None, seq=<Sequence with 77 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/101_marron1_May_24_2016_64441045.audacity.txt'), notated_path=None, seq=<Sequence with 48 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/102_marron1_May_24_2016_69341205.audacity.txt'), notated_path=None, seq=<Sequence with 59 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/103_marron1_May_24_2016_73006746.audacity.txt'), notated_path=None, seq=<Sequence with 19 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/104_marron1_May_24_2016_73006746.audacity.txt'), notated_path=None, seq=<Sequence with 52 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/...
(with many more lines)
[ ] use reprlib to make concise, esp for many annotations. Might have to write a __repr__ with an if statement that checks the length of the annot attribute
The current
__repr__
ofGenericSeq
(default we get fromattrs
) is very verbose but not in a way that would be super helpful, especially when there itsannot
attribute has manycrowsetta.Annotation
instances.The example I'm working with in a vignette gives something like this
Number of annotation instances from Giraudon et al. 2021: 459 Converted to 'generic-seq': GenericSeq(annots=[Annotation(annot_path=PosixPath('data/audacity-annotations/100_marron1_May_24_2016_62101389.audacity.txt'), notated_path=None, seq=<Sequence with 77 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/101_marron1_May_24_2016_64441045.audacity.txt'), notated_path=None, seq=<Sequence with 48 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/102_marron1_May_24_2016_69341205.audacity.txt'), notated_path=None, seq=<Sequence with 59 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/103_marron1_May_24_2016_73006746.audacity.txt'), notated_path=None, seq=<Sequence with 19 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/104_marron1_May_24_2016_73006746.audacity.txt'), notated_path=None, seq=<Sequence with 52 segments>), Annotation(annot_path=PosixPath('data/audacity-annotations/...
(with many more lines)reprlib
to make concise, esp for many annotations. Might have to write a__repr__
with an if statement that checks the length of theannot
attribute