~savoy

https://tilde.team/~savoy

hobbyist programmer, mostly python and slowly getting more with rust

additional links and contact methods can be found at my homepage linked above

Trackers

~savoy/holo

Last active 2 months ago

~savoy/ade

Last active 1 year, 2 months ago

~savoy/tilde

Last active 1 year, 6 months ago

~savoy/mailcap

Last active 1 year, 11 months ago

~savoy/tiktok-dl

Last active 2 years ago

~savoy/psmt

Last active 2 years ago

~savoy/ipm

Last active 2 years ago

#18 allow None values in `insert` 2 months ago

bug added by ~savoy on ~savoy/holo

#18 allow None values in `insert` 2 months ago

~savoy assigned ~savoy to #18 on ~savoy/holo

#18 allow None values in `insert` 2 months ago

Ticket created by ~savoy on ~savoy/holo

TOML does not have a way to indicate a None value in its syntax, meaning that setting inserting a "none" of "" is shown as an empty string instead of null. This is an issue that has come up with attempting to insert people into the DB that don't have an email address. As there has already been an entry with "", it won't insert as the email field requires a unique value (or null).

Fields should be able to be ommitted from the TOML insertion if nullable or holo should automatically change empty strings. There already exist (and are used) two functions that should be doing this: holo_data._get_nullable_values & holo_data.get_type_matchup, but the now intended functionality is not present.

It seems this:

type_match: dict[re.Pattern, tuple[str, type, pl.datatypes.DataTypeClass, Any]] = {
        re.compile("BIGINT UNSIGNED"): ("number", int, pl.UInt64, 0),
        re.compile("BIGINT"): ("number", int, pl.Int64, 0),
        re.compile("INT UNSIGNED"): ("number", int, pl.UInt32, 0),
        re.compile("INT"): ("number", int, pl.Int32, 0),
        re.compile("CHAR|TEXT"): ('text (enclosed in "")', str, pl.Utf8, ""),
        re.compile("BOOLEAN"): ("boolean (true/false)", bool, pl.Boolean, False),
        re.compile("DATE|TIME"): (
            "datetime (in ISO format)",
            dt.datetime,
            pl.Datetime,
            dt.datetime(1970, 1, 1, 0, 0, 0),
        ),
    }

should be changed so that the CHAR|TEXT key reads:

re.compile("CHAR|TEXT"): ('text (enclosed in "")', str, pl.Utf8, "")

instead. This may achieve the desired result of setting empty strings to None. OR somewhere along the way, "" should be set to None before being inserted into the database.

#15 process for editing existing DB data 3 months ago

bug added by ~savoy on ~savoy/holo

#15 process for editing existing DB data 3 months ago

Comment by ~savoy on ~savoy/holo

savoy referenced this ticket in commit 47beea1.

#15 process for editing existing DB data 3 months ago

Comment by ~savoy on ~savoy/holo

Additionally, any changes to columns that make up the hash for the ID of the table should force a regeneration of id. When pulling through Data.from_sql, the id hash is generated, and if any of the hash columns have changed, the id will differ from the database.

#15 process for editing existing DB data 3 months ago

urgent added by ~savoy on ~savoy/holo

#17 text-heavy output (e.g. message history) should have CLI command and formatted output 4 months ago

feature added by ~savoy on ~savoy/holo

#17 text-heavy output (e.g. message history) should have CLI command and formatted output 4 months ago

~savoy assigned ~savoy to #17 on ~savoy/holo

#17 text-heavy output (e.g. message history) should have CLI command and formatted output 4 months ago

Ticket created by ~savoy on ~savoy/holo

Commands for viewing message history (history?) and meeting notes should be standalone and not relied upon with holo list; the unread query present under extra/reports/unread.sql can even be moved here.

Message history is notable as it needs to be easy parsed and chronological, and is most likely to be run regularly and needs to be familiar. A TOML or DataFrame output doesn't make sense. The way message history is appended when sending a message to look like an email is ideal.

Create a history command with parameters to search for by name/email/phone (multiple matches should be prompted with user choice of which to view) and have it print the output from holo_sms._get_message_history, which can easily be piped into less or bat.