sgkit
sgkit copied to clipboard
Validate arrays of indices via DataArray attrs
Related to #795
Multiple variables in sgkit store arrays of indices into other arrays. This can result in unexpected behavior if a user generates one of these arrays, subsets or re-orders a dimension related to those indices , and then uses the array of (now invalid) indices. Issues are most likely with the window variables (window_start, window_stop) and the parent array which respectively contain indices into the variants and samples dimensions.
We could mitigate this risk by storing some metadata in the attrs of these arrays at creation time. DataArray attrs are kept when an array is sliced or sorted, making them suitable for downstream validation. This requires methods consuming these arrays to validate that this metadata is still accurate.
A simple example would be to store the size of relevant dimensions at array creation time, and validate that these are unchanged at on array consumption. A more robust approach would be to store a hash related to the relevant dimension. In the case of the parent array, this could be its own hash at creation time.
The icon you circled is not really the bookmark icon. It is the Notes icon. Only bookmarks with notes get that icon.
But i have had a similar thought - add an extra field to the label dialog that allows the user to assign an icon or perhaps a unicode character. This icon could then be displayed in some contexts such as what you have described. There are a few places where I think it could be useful.
www.TenOutOfTen.org https://www.TenOutOfTen.org @.*** (+61) 0477 174 193 (Australia) (+95) 09 250018669 (Myanmar)
On Sun, 10 Dec 2023 at 22:15, MeIchthys @.***> wrote:
ResizedImage_ResizedImage__2023-12-10_10-44-04_2644.png_2023-12-10_10-44-30_7467.png (view on web) https://github.com/AndBible/and-bible/assets/10717998/d6f9a940-6c29-417c-888c-6b8d359a4771
— Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/3110#issuecomment-1849000254, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJVWAQBSFMXB3SBG7NLYIXKIPAVCNFSM6AAAAABAOUUYRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGAYDAMRVGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I would give option to choose from predefined selection of FontAwesome icons, though unicode icons might work too. It would show symbol only if marker style is selected.
I'm estimating this would take 3-5 hours of work from me if someone wants to sponsor this feature.