Skip to content

Commit 831b01a

Browse files
authored
Merge pull request #48 from cmu-delphi/release/v2.1.1
Release v2.1.1
2 parents 09c1a35 + 1ad467e commit 831b01a

18 files changed

+233
-107
lines changed

.github/workflows/create_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
base: main
3333
title: Release ${{ steps.version.outputs.next_tag }}
3434
labels: chore
35-
reviewers: krivard
36-
assignees: krivard
35+
# reviewers:
36+
assignees: melange396
3737
body: |
3838
Releasing ${{ steps.version.outputs.next_tag }}.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Dependabot auto-assign reviewer
2+
on: pull_request
3+
4+
permissions:
5+
pull-requests: write
6+
7+
jobs:
8+
dependabot:
9+
runs-on: ubuntu-latest
10+
env:
11+
GH_TOKEN: ${{ secrets.CMU_DELPHI_AUTOMATION_MACHINE_DEPENDABOT_PAT }}
12+
if: ${{ github.actor == 'dependabot[bot]' }}
13+
steps:
14+
- name: Assign team to PR
15+
run: gh pr edit "$PR_URL" --add-reviewer "cmu-delphi/code-reviewers"
16+
env:
17+
PR_URL: ${{github.event.pull_request.html_url}}

.github/workflows/release_main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ jobs:
9696
commit-message: 'feat: update to EPIVis ${{ needs.create_release.outputs.tag_name }}'
9797
title: 'update to EPIVis ${{ needs.create_release.outputs.tag_name }}'
9898
labels: feat
99-
reviewers: krivard,sgratzl
100-
assignees: sgratzl
99+
# reviewers:
100+
assignees: melange396
101101
body: |
102102
update to [EPIVis ${{ needs.create_release.outputs.tag_name }}](https://github.com/cmu-delphi/www-epivis/releases/${{ needs.create_release.outputs.tag_name }})
103103
@@ -123,7 +123,7 @@ jobs:
123123
base: dev
124124
title: 'chore: sync main->dev'
125125
labels: chore
126-
reviewers: krivard,sgratzl
127-
assignees: sgratzl
126+
# reviewers:
127+
assignees: melange396
128128
body: |
129129
Syncing Main->Dev.

netlify.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[context.production.environment]
2-
EPIDATA_ENDPOINT_URL = "https://api.covidcast.cmu.edu/epidata"
2+
EPIDATA_ENDPOINT_URL = "https://api.delphi.cmu.edu/epidata"
33

44
[context.branch-deploy.environment]
5-
EPIDATA_ENDPOINT_URL = "https://api.covidcast.cmu.edu/epidata"
5+
EPIDATA_ENDPOINT_URL = "https://api.delphi.cmu.edu/epidata"
66

77
[context.deploy-preview.environment]
8-
EPIDATA_ENDPOINT_URL = "https://api.covidcast.cmu.edu/epidata"
8+
EPIDATA_ENDPOINT_URL = "https://api.delphi.cmu.edu/epidata"

package-lock.json

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "www-epivis",
3-
"version": "2.0.3",
3+
"version": "2.1.1",
44
"private": true,
55
"license": "MIT",
66
"description": "",
@@ -27,7 +27,8 @@
2727
"lint": "eslint src --ext .ts,.js,.svelte && prettier --check \"**/*\"",
2828
"fix": "eslint src --ext .ts,.js,.svelte --fix && prettier --write \"**/*\"",
2929
"prepare": "husky install",
30-
"prepack": "npm run build"
30+
"prepack": "npm run build",
31+
"prettier": "prettier --write \"**/*\""
3132
},
3233
"devDependencies": {
3334
"@fortawesome/free-solid-svg-icons": "^6.1.2",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default [
5151
'process.env.NODE_ENV': JSON.stringify(production ? 'production' : 'development'),
5252
__VERSION__: JSON.stringify(pkg.version),
5353
'process.env.EPIDATA_ENDPOINT_URL': JSON.stringify(
54-
process.env.EPIDATA_ENDPOINT_URL || 'https://api.covidcast.cmu.edu/epidata',
54+
process.env.EPIDATA_ENDPOINT_URL || 'https://api.delphi.cmu.edu/epidata',
5555
),
5656
},
5757
preventAssignment: true,

src/App.svelte

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,48 @@
66
import type { IChart } from './store';
77
import { onMount } from 'svelte';
88
import { tour } from './tour';
9+
import { addDataSet } from './store';
10+
import { fluViewRegions } from './data/data';
11+
import { DEFAULT_ISSUE } from './components/dialogs/utils';
12+
import { importFluView } from './api/EpiData';
913
1014
let chart: Chart | null = null;
1115
$: ichart = chart as unknown as IChart | null;
1216
1317
onMount(() => {
14-
tour.start();
18+
if (!localStorage.getItem('shepherd-tour')) {
19+
tour.start();
20+
}
21+
22+
// Try fetching the default FluView dataset! (unless the URL has a shared dataset in it)
23+
const url = new URL(location.href);
24+
const hash = url.hash.slice(1);
25+
if (!hash) {
26+
let regions = fluViewRegions[0].value;
27+
let issue = DEFAULT_ISSUE;
28+
let auth: string = '';
29+
30+
importFluView({ regions, ...issue, auth }).then((ds) => {
31+
if (ds) {
32+
// add the dataset itself
33+
addDataSet(ds);
34+
// reset active datasets to fluview -> ili
35+
$activeDatasets = [ds.datasets[1]];
36+
if (chart) {
37+
chart.fitData(true);
38+
}
39+
}
40+
});
41+
}
1542
});
1643
</script>
1744

1845
<TopMenu chart={ichart} style="grid-area: menu" />
19-
<LeftMenu style="grid-area: side" />
46+
<LeftMenu chart={ichart} style="grid-area: side; max-height: 100vh; overflow: scroll" />
2047
<Chart
2148
bind:this={chart}
2249
style="grid-area: main"
2350
bind:showPoints={$isShowingPoints}
2451
bind:navMode={$navMode}
2552
initialViewport={$initialViewport}
26-
datasets={$activeDatasets}
2753
/>

src/api/EpiData.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {
2121
import DataSet, { DataGroup } from '../data/DataSet';
2222
import EpiDate from '../data/EpiDate';
2323
import EpiPoint from '../data/EpiPoint';
24+
import { get } from 'svelte/store';
25+
import { expandedDataGroups } from '../store';
2426

2527
// import DataSet from "../data/DataSet";
2628
// import EpiDate from "../data/EpiDate";
@@ -111,6 +113,17 @@ export function loadDataSet(
111113
userParams: Record<string, unknown>,
112114
columns: string[],
113115
): Promise<DataGroup | null> {
116+
const duplicates = get(expandedDataGroups).filter((d) => d.title == title);
117+
if (duplicates.length > 0) {
118+
return UIkit.modal
119+
.alert(
120+
`
121+
<div class="uk-alert uk-alert-error">
122+
Cannot import duplicate dataset: <b>${title}.</b>
123+
</div>`,
124+
)
125+
.then(() => null);
126+
}
114127
const url = new URL(ENDPOINT + `/${endpoint}/`);
115128
const params = cleanParams(userParams);
116129
Object.entries(fixedParams).forEach(([key, value]) => {

src/components/Chart.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { onMount } from 'svelte';
3+
import { activeDatasets } from '../store';
34
import type DataSet from '../data/DataSet';
45
import { DEFAULT_VIEWPORT } from '../data/DataSet';
56
import EpiDate from '../data/EpiDate';
@@ -81,7 +82,8 @@
8182
export let showPoints = false;
8283
export let interpolate = false;
8384
export let highlightedDate: EpiDate | null = null;
84-
export let datasets: DataSet[] = [];
85+
86+
$: datasets = $activeDatasets;
8587
8688
function date2x(date: number): number {
8789
return ((date - xMin) / (xMax - xMin)) * width;
@@ -381,6 +383,7 @@
381383
}
382384
383385
export function fitData(shouldAnimate = false): void {
386+
datasets = $activeDatasets; // force an update
384387
if (datasets.length === 0) {
385388
return;
386389
}

0 commit comments

Comments
 (0)