veg / phylotree.js

Interactive viewer of phylogenetic trees
http://phylotree.hyphy.org
MIT License
169 stars 77 forks source link

Selectome example, tests #271

Closed stephenshank closed 3 years ago

stephenshank commented 3 years ago

Adds ability to parse annotated newick used by Selectome and others. Please let me know if a dedicated parser is desired.

Adds an example for selectome.

Restores tests and adds very simple UI tests based on puppeteer.

One commit that I believe was breaking examples and subsequently reverted concerned use on Observable. I thus constructed a minimal working example for Observable.

Note that the Observable MWE sources the bundle from https://phylotree-alpha.hyphy.org/, which is now possible since it is served over SSL (as recommend by one of our users).

Feedback welcome; I may hold off on merging this until the Selectome example is complete.

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging 17c99170d7a712a59a7f79a31263947e3de5f6ba into 3be7ee50bfbacb6497ff4be3374b0ae064f2a2ce - view on LGTM.com

new alerts:

stevenweaver commented 3 years ago

Thanks @stephenshank. I might be overlooking something, but using yarn test and building node_modules from scratch with the updated yarn.lock, the new test doesn't pass.

# Hello world loads
not ok 53 should be truthy
  ---
    operator: ok
    expected: true
    actual:   ''
    at: Test.<anonymous> (/Users/sweaver/Programming/phylotree.js/test/ui-examples-test.js:49:8)
    stack: |-
      Error: should be truthy
          at Test.assert [as _assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:228:54)
          at Test.bound [as _assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:80:32)
          at Test.assert (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:347:10)
          at Test.bound [as assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:80:32)
          at Test.<anonymous> (/Users/sweaver/Programming/phylotree.js/test/ui-examples-test.js:49:8)
  ...
# Selctome loads
not ok 54 should be truthy
  ---
    operator: ok
    expected: true
    actual:   ''
    at: Test.<anonymous> (/Users/sweaver/Programming/phylotree.js/test/ui-examples-test.js:66:8)
    stack: |-
      Error: should be truthy
          at Test.assert [as _assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:228:54)
          at Test.bound [as _assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:80:32)
          at Test.assert (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:347:10)
          at Test.bound [as assert] (/Users/sweaver/Programming/phylotree.js/node_modules/tape/lib/test.js:80:32)
          at Test.<anonymous> (/Users/sweaver/Programming/phylotree.js/test/ui-examples-test.js:66:8)
  ...
# teardown

1..54

Best, Steven

stephenshank commented 3 years ago

Hmm, that is definitely odd. Travis tests fail as well. I suspect it has something to do with puppeteer/chromium and am looking into it now. Thanks for trying it out.

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging 2bbf83c79a1ba863af40a557d78ca442ff7a1fc8 into 3be7ee50bfbacb6497ff4be3374b0ae064f2a2ce - view on LGTM.com

new alerts:

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging 5d438c9a003a61796ca21e89a9e80636103c19ef into 3be7ee50bfbacb6497ff4be3374b0ae064f2a2ce - view on LGTM.com

new alerts: