Skip to content

Commit

Permalink
Merge pull request #13 from broadinstitute/update-sc2-broad-custom-to…
Browse files Browse the repository at this point in the history
…-upstream-v2.37.0

Update sc2-broad-custom branch on broadinstitute/auspice (w/ Broad logo, etc.) to include changes from upstream v2.37.0
  • Loading branch information
tomkinsc authored May 6, 2022
2 parents 5915827 + a97d535 commit a37830f
Show file tree
Hide file tree
Showing 107 changed files with 10,290 additions and 11,784 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
extends: "airbnb"
plugins: ["react-hooks"]
parser: "babel-eslint"
parser: "@babel/eslint-parser"
globals:
page: true
browser: true
Expand Down Expand Up @@ -45,6 +45,8 @@ rules:
react/prop-types: off # possibly reinstate
react/sort-comp: off # possibly reinstate
jsx-a11y/no-static-element-interactions: off
jsx-a11y/anchor-has-content: off
jsx-a11y/heading-has-content: off
import/prefer-default-export: off
no-multi-spaces: ["error", { ignoreEOLComments: true }]
no-labels: off
Expand Down
53 changes: 43 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@ on:
push:
branches:
- master
- release
pull_request:
name: ci
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm ci
- run: npm run build
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10]
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: node --version
Expand All @@ -22,10 +36,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10]
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm ci
Expand All @@ -35,20 +49,39 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10]
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm ci
- run: npm run lint
bundlesize:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 10
- run: npm install
node-version: ${{ matrix.node }}
- run: npm ci
- run: npx bundlesize
publish:
if: ${{ github.ref == 'refs/heads/release' }}
needs: [build, unit-test, smoke-test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: node --version
- run: npm ci
- run: npm run rebuild-docker-image
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/make_prs_for_other_repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.JAMES_PAT }}
token: ${{ secrets.NEXTSTRAIN_BOT_PAT }}
branch: "auspice-pr-${{ github.event.pull_request.number }}"
commit-message: "[testing only] upgrade auspice to ${{ env.auspice_commit }}"
title: 'Test auspice PR ${{ github.event.pull_request.number }}'
author: 'nextstrain-bot <[email protected]>'
committer: 'nextstrain-bot <[email protected]>'
title: '[bot] [DO NOT MERGE] Test auspice PR ${{ github.event.pull_request.number }}'
body: |
This PR has been created to test Auspice from [PR ${{ github.event.pull_request.number }}](https://github.com/nextstrain/auspice/pull/${{ github.event.pull_request.number }})
Expand Down
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

128 changes: 127 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,134 @@
title: Changelog
---

## version 2.28.0 - 2021/07/05
## version 2.37.0 - 2022/04/28


* Improved footer styling of tables.
See [PR 1502](https://github.com/nextstrain/auspice/pull/1502) for more.
* Branch labels are now shown/hidden depending according to the proportion of visible tips they define.
See [PR 1501](https://github.com/nextstrain/auspice/pull/1501) for more.

## version 2.36.0 - 2022/03/28

### Functional improvements

* Dynamically update regression lines to reflect filtered data.
See [PR 1484](https://github.com/nextstrain/auspice/pull/1484) for more.
* Scatterplot axes can now use "node-order" which is the order nodes appear on the rectangular tree.
See [PR 1494](https://github.com/nextstrain/auspice/pull/1494) for more.
* Show an "experimental" icon and on-hover info text for the explode-tree functionality.
See [PR 1486](https://github.com/nextstrain/auspice/pull/1486) for more.
* You can now use the escape key to remove a tip/branch info modal over the tree.
See [PR 1485](https://github.com/nextstrain/auspice/pull/1485) for more.

### Bugfixes

* Drag-n-drop metadata now works for the second tree.
See [PR 1489](https://github.com/nextstrain/auspice/pull/1489) for more.
* Available filters are now correct when switching from a narrative to exploding the data.
See [PR 1493](https://github.com/nextstrain/auspice/pull/1493) for more.
* The auspice server only accepts valid sidecar file types.
See [PR 1495](https://github.com/nextstrain/auspice/pull/1495) for more.

## version 2.35.0 - 2022/03/16
* Upgrade how we render dropdown menus, which greatly improves the display of long options (e.g. submitting labs).
See [PR 1482](https://github.com/nextstrain/auspice/pull/1482) for more.


## version 2.34.1 - 2022/03/08
* (Minor change) expose functions for use in auspice.us. See [PR 1478](https://github.com/nextstrain/auspice/pull/1478) for more.

## version 2.34.0 - 2022/03/02

#### Major changes
* Measurements panel intended for displaying titer or DMS data where a tip in the tree has multiple values associated with it.
This function requires a dataset with a `_measurements.json` sidecar file
See [PR 1452](https://github.com/nextstrain/auspice/pull/1452) for more.

#### Minor changes
* Improved YAML parsing for narratives
See [PR 1472](https://github.com/nextstrain/auspice/pull/1472) for more.
* Remove unused properties from tip-frequencies panel.
See [PR 1471](https://github.com/nextstrain/auspice/pull/1471) for more.
* Fixed a bug where shift+clicking on branches for trees without mutations defined caused a crash.
See [PR 1475](https://github.com/nextstrain/auspice/pull/1475) for more.



## version 2.33.0 - 2022/02/15

* (Experimental) Explode phylogeny into subtrees and allow multiple trees to be provided in the dataset.
See [PR 1442](https://github.com/nextstrain/auspice/pull/1442) for more.
* Categorise mutations to better understand sequence changes on branches and tips.
See [PR 1449](https://github.com/nextstrain/auspice/pull/1449) for more.
* Add a datepicker to allow precise changes to the selected date range.
See [PR 1412](https://github.com/nextstrain/auspice/pull/1412) for more.
* Allow build-time customizable fine print.
See [PR 1448](https://github.com/nextstrain/auspice/pull/1448) for more.
* Remove scrollbar in panels when no scrolling is possible
See [PR 1439](https://github.com/nextstrain/auspice/pull/1439) for more.
* Allow searching in the color-by dropdown.
See [PR 1456](https://github.com/nextstrain/auspice/pull/1456) for more.

There have also been internal changes related to how we run CI. These should not affect using Auspice as a library / CLI.

## version 2.32.1 - 2021/11/11
* Fix URL parsing to allow the string "narratives" to be in a dataset without it being interpreted as a narrative itself.
See [PR 1428](https://github.com/nextstrain/auspice/pull/1428) for more.

## version 2.32.0 - 2021/10/20

* Tree info boxes are now improved, and you can shift+click on a branch to see more information about that branch.
See [PR 1420](https://github.com/nextstrain/auspice/pull/1420) for more.
* Filters in footer are now expandable to improve usability and discoverability of the true footer.
See [PR 1414](https://github.com/nextstrain/auspice/pull/1414) for more.
* Fixed a bug with CSV (drag & drop) parsing. See [PR 1401](https://github.com/nextstrain/auspice/pull/1401) for more.
* Removed unnecessary postinstall step. See [PR 1419](https://github.com/nextstrain/auspice/pull/1419) for more.
* Improved image sizing in narratives. See [PR 1408](https://github.com/nextstrain/auspice/pull/1408) for more.
* Improved documentation around how to build auspice documentation!


## version 2.31.0 - 2021/09/16
* Improvements to our ability to zoom out in a tree, both by exposing the root branch and via a new icon next to "Zoom to Selected".
See [PR 1392](https://github.com/nextstrain/auspice/pull/1392) for more.

## version 2.30.0 - 2021/09/07

* Narratives can now load sidecar files and second trees.
This allows allowing frequency panel display, colouring by root-sequence, and tanglegrams.
See [PR 1305](https://github.com/nextstrain/auspice/pull/1305) for more.
* Excel (`.xlsx`) files can be used as additional metadata for drag-and-drop.
See [PR 1386](https://github.com/nextstrain/auspice/pull/1386) for more.
* Trees are now clipped to improve axes visibility.
See [PR 1383](https://github.com/nextstrain/auspice/pull/1383) for more.
* Improved accession URL creation.
See [PR 1382](https://github.com/nextstrain/auspice/pull/1382) for more.
* minor documentation improvements.

## version 2.29.1 - 2021/07/16

* Update TravisCI script to improve how we publish Auspice to npm.
See [PR 1380](https://github.com/nextstrain/auspice/pull/1380) for more.

## version 2.29.0 - 2021/07/15

**Note: this version may not install from npm. Please use v2.29.1 instead**

* Branch labels are no longer displayed if the branch is not in the selected view.
See [PR 1370](https://github.com/nextstrain/auspice/pull/1370) for more.
* Clicking on a tip and then closing the info-box will result in that tip remaining as a inactivated filter.
See [PR 1372](https://github.com/nextstrain/auspice/pull/1372) for more.
* Category filters in the sidebar can now be used to inactivate all active filters in a category, and if all are inactive then this may be used to re-activate them all.
See [PR 1371](https://github.com/nextstrain/auspice/pull/1371) for more.
* On-hover tooltip widths are improved for the tree. See [PR 1375](https://github.com/nextstrain/auspice/pull/1375) for more.
* [bugfix] Colour scales can now have 37 values. See [PR 1355](https://github.com/nextstrain/auspice/pull/1355) for more.

#### Minor updates
* Docs updates
* Updated files fetched by `npm run get-data`

## version 2.28.0 - 2021/07/05

* Remove ability to download metadata TSV from GISAID datasets. Replace with acknowledgments TSV. See [PR 1366](https://github.com/nextstrain/auspice/pull/1366).
* Cleanup header fields when downloading metadata TSV, including switch to use name (eg `pango_lineage`) instead of title (eg `PANGO lineage`). See [PR 1367](https://github.com/nextstrain/auspice/pull/1367).
Expand Down
8 changes: 5 additions & 3 deletions DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Please see the [project boards](https://github.com/orgs/nextstrain/projects) for

## Contributing code

Code contributions are welcomed! [Please see the main auspice docs](https://nextstrain.github.io/auspice/introduction/install) for details on how to install and run auspice from source.
Code contributions are welcomed! [Please see the main auspice docs](https://docs.nextstrain.org/projects/auspice/en/latest/introduction/install.html) for details on how to install and run auspice from source.

Please comment on an open issue if you are working on it.
For changes unrelated to an open issue, please make an issue outlining what you would like to change/add.
Expand Down Expand Up @@ -116,7 +116,9 @@ git lfs ls-files # list LFS tracked tiles

The main Nextstrain documentation is available at [docs.nextstrain.org](https://docs.nextstrain.org/en/latest/index.html). That documentation is built from the [docs.nextstrain.org GitHub repo](https://github.com/nextstrain/docs.nextstrain.org/) -- see the [contributing page for docs.nextstrain.org](https://docs.nextstrain.org/en/latest/guides/contribute/documentation.html) for more details on how to contribute to that documentation.

The Auspice technical reference guide is available at [docs.nextstrain.org/projects/auspice](https://docs.nextstrain.org/projects/auspice/en/stable/index.html). That documentation is built from the Auspice GitHub repo -- see the [docs/README](https://github.com/nextstrain/auspice/tree/master/docs#auspice-read-the-docs-documentation) within the `docs` directory for more details and on how to contribute to that documentation.
The Auspice technical reference guide is available at [docs.nextstrain.org/projects/auspice](https://docs.nextstrain.org/projects/auspice/en/stable/index.html). That documentation is built from the files in this repo in the `./docs` folder.

To build the Auspice documentation locally, run `npm run build-docs` and open `docs/_build/html/index.html`.

## Contributing to Internationalization and Localization (i18n/l18n)

Expand Down Expand Up @@ -163,4 +165,4 @@ If a translation of a particular string is not yet available, then auspice will

## Releases & versioning

New versions are released via the `./releaseNewVersion.sh` script from an up-to-date `master` branch. It will prompt you for the version number increase, push changes to the `release` branch and, as long as Travis-CI is successful then a new version will be automatically published to [npm](https://www.npmjs.com/package/auspice).
New versions are released via the `./releaseNewVersion.sh` script from an up-to-date `master` branch. It will prompt you for the version number increase, push changes to the `release` branch and, as long as the GitHub workflow is successful then a new version will be automatically published to [npm](https://www.npmjs.com/package/auspice).
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Build Status](https://travis-ci.com/nextstrain/auspice.svg?branch=master)](https://travis-ci.com/nextstrain/auspice)
[![GitHub CI Status](https://travis-ci.com/nextstrain/auspice.svg?branch=master)](https://github.com/nextstrain/auspice/actions?query=workflow%3Aci)
[![Build Status](https://github.com/nextstrain/auspice/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/nextstrain/auspice/actions/workflows/ci.yaml?query=branch:master)
[![NPM version](https://img.shields.io/npm/v/auspice.svg?style=flat)](https://www.npmjs.com/package/auspice)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

Expand Down Expand Up @@ -73,7 +72,7 @@ curl http://data.nextstrain.org/ncov.json --compressed -o data/ncov.json
...
```

If you've installed auspice from source, we have helper scripts to make all the datasets & narratives you see on nextstrain.org available locally:
If you've installed auspice from source, we have a helper script to download a number of datasets for testing:

```bash
# from the auspice src directory
Expand Down
18 changes: 10 additions & 8 deletions cli/server/getAvailable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ const getAvailableDatasets = async (localDataPath) => {
const files = await readdir(localDataPath);
/* v2 files -- match JSONs not ending with `_tree.json`, `_meta.json`,
`_tip-frequencies.json`, `_seq.json` */

const v2FilesRaw = files.filter((file) => (
(file.endsWith(".json")||file.endsWith(".json.gz")) &&
!file.includes("manifest") &&
!file.endsWith("_tree.json") &&
!file.endsWith("_meta.json") &&
!file.includes("_tip-frequencies.json") &&
!file.includes("_root-sequence.json") &&
!file.endsWith("_seq.json")
));
(file.endsWith(".json")||file.endsWith(".json.gz")) &&
!file.includes("manifest") &&
!file.endsWith("_tree.json") &&
!file.endsWith("_meta.json") &&
!file.includes("_tip-frequencies.json") &&
!file.includes("_root-sequence.json") &&
!file.endsWith("_seq.json") &&
!file.endsWith("_measurements.json")
));

const v2Files = v2FilesRaw.map((file) => file
.replace(".json.gz", "")
Expand Down
12 changes: 9 additions & 3 deletions cli/server/getDatasetHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ const interpretRequest = (req) => {
if (!query.prefix) throw new Error("'prefix' not defined in request");
const datanameParts = splitPrefixIntoParts(query.prefix);
const info = {parts: datanameParts};
if (query.type && query.type !== "tree") { // "tree" is deprecated
/* query.type is used to indicate which sidecar file should be fetched,
without it we fetch the "main" dataset JSON. See the `Dataset` constructor
in `./src/actions/loadData.js` for which sidecars auspice may try to fetch */
const sidecars = ['tip-frequencies', 'root-sequence', 'measurements'];
if (!query.type || query.type==="tree") {
// note that "tree" is deprecated and unnecessary, so it's ignored
info.dataType = "dataset";
} else if (sidecars.includes(query.type)) {
info.dataType = query.type;
} else {
info.dataType = "dataset";
throw new Error(`Unknown file type '${query.type}' requested.`);
}

return info;
};

Expand Down
Loading

0 comments on commit a37830f

Please sign in to comment.