-
Notifications
You must be signed in to change notification settings - Fork 1
Switch species tree view to Archaeopteryx.js #76
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
Switch species tree view to Archaeopteryx.js #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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