-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"set_metadata" parameter #302
Comments
hyanwong
added a commit
to hyanwong/tsdate
that referenced
this issue
Jul 23, 2023
Defaults to a "struct" type unless a schema already exists (or if there is a null schema that can be interpreted as JSON). Fixes tskit-dev#302
Closed
hyanwong
added a commit
to hyanwong/tsdate
that referenced
this issue
Jul 23, 2023
Defaults to a "struct" type unless a schema already exists (or if there is a null schema that can be interpreted as JSON). Fixes tskit-dev#302
For backwards compatibility #303 is slightly more sophisticated and if the null schema is set, tries to interpret it as JSON (and if it succeeds, sets the schema to a permissive JSON type). |
hyanwong
added a commit
to hyanwong/tsdate
that referenced
this issue
Jul 24, 2023
Defaults to a "struct" type unless a schema already exists (or if there is a null schema that can be interpreted as JSON). Fixes tskit-dev#302
hyanwong
added a commit
to hyanwong/tsdate
that referenced
this issue
Jul 24, 2023
Defaults to a "struct" type unless a schema already exists (or if there is a null schema that can be interpreted as JSON). Fixes tskit-dev#302
hyanwong
added a commit
to hyanwong/tsdate
that referenced
this issue
Jul 24, 2023
Defaults to a "struct" type unless a schema already exists (or if there is a null schema that can be interpreted as JSON). Fixes tskit-dev#302
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linked to #203 and #237 (comment). At the moment,
tsdate
, as well as changing node times, also changes node metadata to add (unconstrained) means and variances. It would be useful to have the ability to (a) not add to metadata and (b) specify whether or not node metadata should be stomped on, if it exists.Since this is the only metdata that tsdate touches, I suggest that as a first step, we could have a parameter
set_metadata
,save_metadata
,store_metadata
or evenforce_metadata
with the following values:False
: do not touch any metadata columns in any tablesTrue
: always add metadata to the node column, changing the schema and overwriting any existing node metadataNone
(default): try to append the existing node metadata, overwriting the tsdate-specific fields if they exist. A minor wrinkle is if there is binary node metadata (i.e. without a schema) and the metadata column is not empty (see Set node metadata schema #203 (comment)). In this case we won't know how to adjust the node metadata properly, so we should either raise an error or emit a warning. I suggest we should raise a warning, but it would be a pain to have run tsdate all the way through only to raise an error at the end, so we could check before running the main tsdate routine, and raise the error early?The text was updated successfully, but these errors were encountered: