Switch species tree view to Archaeopteryx.js#76
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the species tree visualization from phylotree.js to Archaeopteryx.js, a more feature-rich phylogenetic viewer. The change replaces the existing tree rendering implementation with one that uses Archaeopteryx.js and its required dependencies, all loaded from CDNs with Subresource Integrity (SRI) hashes for security.
Changes:
- Replaced phylotree.js with Archaeopteryx.js 1.8.1 and its dependencies (jQuery, jQuery UI, D3 v3.5.17, underscore, phyloxml)
- Updated tree initialization code to use Archaeopteryx's parsing and launch APIs
- Applied black formatting to nl_query.py (lambda expression wrapped in parentheses)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| app/templates/show_species.html | Replaced phylotree-based tree viewer with Archaeopteryx.js implementation, including dependency loading and initialization code |
| app/nl_query.py | Code formatting change (black) - wrapped lambda expression in parentheses |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Description
app/templates/show_species.htmlto remove phylotree and instead loadarchaeopteryx@1.8.1plus its runtime dependencies via UNPKG (jquery 3.7.1, jquery-ui 1.13.3, d3 3.5.17, underscore 1.13.7, phyloxml 0.9.16) and included computedsha384SRIs for each script and the jquery-ui stylesheet.archaeopteryx.parseNewHampshireand launch Archaeopteryx witharchaeopteryx.launch, passing options/settings that enable dynamic sizing and zoom-to-fit behavior.app/nl_query.py(lambda wrapped) as part ofblackreformatting.Testing
black .which reformatted a few files and completed successfully.pytest tests/and all tests passed:9 passed.MARC_TREE_FPat a demo treefile and captured a Playwright screenshot of/species/Demo%20Species, confirming an SVG tree rendered (screenshot artifact produced and verified to contain tree elements).Codex Task