ocdevel / gnothi

Gnothi is an open-source AI journal and toolkit for self-discovery. If you're interested in getting involved, we'd love to hear from you.
https://gnothiai.com
GNU Affero General Public License v3.0
171 stars 19 forks source link

Fields: allow clearing out a field-entry (setting to null) #113

Open lefnire opened 3 years ago

lefnire commented 3 years ago

User: I find myself wanting an empty stat for my fields. Currently an empty field stat is set to zero, and shown as zero in the graph. However, for some of my fields zero is an actual possible stat, so there's no way to distinguish it from a statless field. And especially on the graph I'd like the graph to just break off for a statless day, or be marked in a different colour. What I mean is in terms of information content it makes a difference to me wether I walked zero steps that day as opposed to "I do not know if and if yes how many steps I walked". And for my fields that show a time 0 means midnight, and "I did it at midnight" is also different from "I don't know when I did it". Me: Certainly, NULLs are valuable to the influencer algorithm (XGBoost) - they mean something, as you point out. So I agree, we as humans should be able to set to NULL and the UI indicate such in the various locations. I'll add a ticket.

Entails adding a DELETE /field-entries/{field_id}?day={day} route (rather than PUTing it to null)