Closed flexatone closed 1 year ago
I think case sensitivity is a great way to represent these differences concisely. For ease of typing these out, I would consider shortening DT
to D
or removing DT
all together.
Removing DT
completely gives a closer representation to the python class names.
Shortest:
IndexHierarchy
: IH
IndexHour
: Ih
IndexDate
: ID
IndexMonth
: IM
IndexMinute
: Im
IndexMillisecond
: Ims
...
Thanks, @michaeljpeters ! I like your suggestions... I guess I thought IH
was too close to Ih
but maybe it is fine, and I do appreciate that these stay concise. Plus, this is nearly backwards compatible.
Presently frame-fixtures does not support all Static-Frame index types due to a name conflict in the way abbreviations are presently constructed.
For the basic types,
Index
is represented as "I", andIndexHierarchy
is represented as: "IH".However, while
IndexDate
can be given as "ID", following the same approach forIndexHour
would result in "IH", colliding withIndexHierarchy
. Similarly,IndexMillisecond
andIndexMicrosecond
would both map to "IM".To avoid these conflicts, one option is to add the characters "DT" (for datetime) and use the case-sensitive representation that NumPy already uses for units, where, for example, "M" is month, "m" is minute, "ms" is millisecond, etc.
IndexYearMont
: "IDTM" (presently "IYM")IndexDate
: "IDTD" (presently "ID")IndexHour
: "IDTh"IndexMinute
: "IDTm"IndexMillisecond
: "IDTms"IndexNanosecond
: "IDTns" (presently "IN")This would be a backwards incompatible change made as part of the 1.0 release.
Happy to hear feedback or other suggestions.