audeering / audobject

Generic Python interface for serializing objects to YAML
https://audeering.github.io/audobject/
Other
1 stars 0 forks source link

Support short ID #32

Closed frankenjoe closed 10 months ago

frankenjoe commented 2 years ago

In addition to id add a property short_id to Object, which returns only the last 8 digits of the full ID.

See https://audeering.github.io/audb/api.html#audb.Flavor.short_id

frankenjoe commented 2 years ago

@hagenw would be straightforward to implement - do you agree it's a useful extension?

hagenw commented 2 years ago

In general I'm wondering how we should handle our new usage of shorter IDs.

In audeer we still have audeer.is_uid() and audeer.uid() which do not support our short UIDs. Maybe we start by adding a short=False argument to both of them?

Or would you prefer to have audeer.is_short_uid() and audeer.short_uid() and match this here by id and short_id?

frankenjoe commented 2 years ago

Good point. I think I would go for two additional functions.

frankenjoe commented 1 year ago

Or we add only audeer.short_uid() and audeer.is_uid() returns True for short and long IDs.

hagenw commented 1 year ago

I think I would also vote for changing audeer.is_uid() to return True for short and long IDs. I would then not add another audeer.short_uid() function, but simply add an argument to audeer.uid().

As this is somehwat a breaking change for audeer.is_uid() it would also be ok with me to make a 2.0.0 release of audeer afterwards.

frankenjoe commented 1 year ago

I would then not add another audeer.short_uid() function, but simply add an argument to audeer.uid().

Ok, agree

As this is somehwat a breaking change for audeer.is_uid() it would also be ok with me to make a 2.0.0 release of audeer afterwards.

I don't think this is really needed

hagenw commented 1 year ago

I created https://github.com/audeering/audeer/issues/88