Skip to content
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

Fix order of exported colorings from augur export v2 when color by metadata is used #1177

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

huddlej
Copy link
Contributor

@huddlej huddlej commented Mar 10, 2023

Description of proposed changes

Adds a functional test and mock data that should work where augur export includes the --color-by-metadata argument with a column named custom_trait. The resulting Auspice JSON should include the custom_trait as a node attribute for each tip and as a coloring that appears after the colorings explicitly defined in the Auspice config JSON.

The original goal of this test was to confirm that "color by metadata" colorings disrupt the order of all colorings in the Auspice config JSON (a bug I encountered this morning in another project and wanted to confirm here), but this test also reveals a separate potential bug where one of the node data annotations (mutation_length) that also appears in the metadata gets dropped completety from the Auspice JSON when the color by metadata argument is used.

Testing

  • Adds functional test
  • CI passes

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

Adds a functional test and mock data that should work where augur export
includes the `--color-by-metadata` argument with a column named
`custom_trait`. The resulting Auspice JSON should include the
`custom_trait` as a node attribute for each tip and as a coloring that
appears after the colorings explicitly defined in the Auspice config
JSON.

The original goal of this test was to confirm that "color by metadata"
colorings disrupt the order of all colorings in the Auspice config JSON,
but this test also reveals a separate potential bug where one of the
node data annotations (`mutation_length`) that also appears in the
metadata gets dropped completety from the Auspice JSON when the color by
metadata argument is used.
@huddlej huddlej changed the title Add test for export with color by metadata Fix order of exported colorings from augur export v2 when color by metadata is used Mar 10, 2023
Adds option to pretty-print DeepDiff output in functional tests and uses
this option for a new test that has especially long diff output when the
test fails where clearer printing helps with debugging.
@genehack
Copy link
Contributor

@huddlej it looks like maybe this was a proof-of-bug and can be closed?

@huddlej
Copy link
Contributor Author

huddlej commented Jan 14, 2025

I don't know if either of the bugs I mentioned above have been resolved or not. I can convert this into a proper issue at some point before closing this PR but probably not this week.

@huddlej huddlej self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants