Add a new option --chronumental_add_inferred_date #608
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the new option
--chronumental_add_inferred_date <column_name>
that I suggested in #607. Feel free to bounce it back if there is anything big or small that you'd like me to change / rename / reword / etc.An example usage is
After running chronumental, it reads the date output file(*) and adds a new metadata 'column' (in this example,
chronumental_date
) whose value for each node is the date inferred by chronumental for that node. When viewing the resultingmy_tree.jsonl.gz
in taxonium, the inferred date is displayed for each node when hovering over or clicking on the node, appearing as an extra metadata item. When the node is clicked on, the label for the inferred date is "Chronumental date" in this example (derived the usual way fromchronumental_date
).(*) The date output file is either the filename specified with
--chronumental_date_output
if given, or the default name which currently is derived from the metadata file name (chronumental_dates_
metadata_file.tsv
). If--chronumental_date_output
is not given and the expected metadata-derived date output file does not exist, then it quits with a suggestion to add--chronumental_date_output
.I have tested it with and without
--chronumental_date_output
and with a relative and absolute path for the metadata file from which the default date output file name is derived, and it seems to work.Thanks as always for taxonium, don't know what I'd do without it! 🙂