Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7917167
Merge pull request #29 from cmu-delphi/bot/sync-main-dev
krivard Sep 14, 2022
cd30219
Remove sgratzl from other auto PR assignments
krivard Sep 15, 2022
0780a96
Merge pull request #30 from cmu-delphi/krivard/release-assignments
krivard Sep 15, 2022
f62d946
build(deps): bump yaml from 2.1.1 to 2.2.2
dependabot[bot] Apr 25, 2023
2cda09d
Merge pull request #31 from cmu-delphi/dependabot/npm_and_yarn/yaml-2…
krivard Apr 26, 2023
226dcb2
ci: make dependabot assign reviewers
dshemetov Jun 29, 2023
d542d86
ci: make linter happy
dshemetov Jun 29, 2023
6b8fbbb
Merge pull request #32 from cmu-delphi/ds/dependabot
dshemetov Jun 30, 2023
f1b3e71
bug(ci): fix dependabot reviewer assignment
dshemetov Jul 13, 2023
63cc82f
Merge pull request #33 from cmu-delphi/ds/dependabot
dshemetov Jul 14, 2023
584b91c
build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 19, 2023
f82e7ea
Update release_main workflow: katie -> george; reviewer -> assignee
krivard Jul 21, 2023
b6f4829
Update create_release workflow: katie -> george, reviewer -> assignee
krivard Jul 21, 2023
4520ab4
add prettier script
krivard Jul 21, 2023
28247fd
Appease prettier
krivard Jul 21, 2023
5f1e4f4
Merge pull request #35 from cmu-delphi/krivard/departure-workflows
krivard Jul 24, 2023
dc20919
Merge pull request #34 from cmu-delphi/dependabot/npm_and_yarn/word-w…
rzats Aug 8, 2023
12211ff
update hostname for epidata api to 'delphi' instead of 'covidcast'
melange396 Apr 5, 2024
b89d033
Merge pull request #37 from cmu-delphi/api_hostname_update
melange396 Apr 29, 2024
452d259
build(deps-dev): bump ws from 7.5.9 to 7.5.10
dependabot[bot] Jun 18, 2024
4c16f28
Merge pull request #40 from cmu-delphi/dependabot/npm_and_yarn/ws-7.5.10
melange396 Jun 20, 2024
23f89dc
build(deps-dev): bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jul 16, 2024
6e310a1
Merge pull request #39 from cmu-delphi/dependabot/npm_and_yarn/braces…
melange396 Jul 16, 2024
422769a
Upgrade EpiVis dashboard (#36)
rzats Jul 30, 2024
1ad467e
chore: release v2.1.1
rzats Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
base: main
title: Release ${{ steps.version.outputs.next_tag }}
labels: chore
reviewers: krivard
assignees: krivard
# reviewers:
assignees: melange396
body: |
Releasing ${{ steps.version.outputs.next_tag }}.
17 changes: 17 additions & 0 deletions .github/workflows/dependabot-assignments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependabot auto-assign reviewer
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.CMU_DELPHI_AUTOMATION_MACHINE_DEPENDABOT_PAT }}
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Assign team to PR
run: gh pr edit "$PR_URL" --add-reviewer "cmu-delphi/code-reviewers"
env:
PR_URL: ${{github.event.pull_request.html_url}}
8 changes: 4 additions & 4 deletions .github/workflows/release_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
commit-message: 'feat: update to EPIVis ${{ needs.create_release.outputs.tag_name }}'
title: 'update to EPIVis ${{ needs.create_release.outputs.tag_name }}'
labels: feat
reviewers: krivard,sgratzl
assignees: sgratzl
# reviewers:
assignees: melange396
body: |
update to [EPIVis ${{ needs.create_release.outputs.tag_name }}](https://github.com/cmu-delphi/www-epivis/releases/${{ needs.create_release.outputs.tag_name }})

Expand All @@ -123,7 +123,7 @@ jobs:
base: dev
title: 'chore: sync main->dev'
labels: chore
reviewers: krivard,sgratzl
assignees: sgratzl
# reviewers:
assignees: melange396
body: |
Syncing Main->Dev.
6 changes: 3 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[context.production.environment]
EPIDATA_ENDPOINT_URL = "https://api.covidcast.cmu.edu/epidata"
EPIDATA_ENDPOINT_URL = "https://api.delphi.cmu.edu/epidata"

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

[context.deploy-preview.environment]
EPIDATA_ENDPOINT_URL = "https://api.covidcast.cmu.edu/epidata"
EPIDATA_ENDPOINT_URL = "https://api.delphi.cmu.edu/epidata"
68 changes: 34 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "www-epivis",
"version": "2.0.3",
"version": "2.1.1",
"private": true,
"license": "MIT",
"description": "",
Expand All @@ -27,7 +27,8 @@
"lint": "eslint src --ext .ts,.js,.svelte && prettier --check \"**/*\"",
"fix": "eslint src --ext .ts,.js,.svelte --fix && prettier --write \"**/*\"",
"prepare": "husky install",
"prepack": "npm run build"
"prepack": "npm run build",
"prettier": "prettier --write \"**/*\""
},
"devDependencies": {
"@fortawesome/free-solid-svg-icons": "^6.1.2",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default [
'process.env.NODE_ENV': JSON.stringify(production ? 'production' : 'development'),
__VERSION__: JSON.stringify(pkg.version),
'process.env.EPIDATA_ENDPOINT_URL': JSON.stringify(
process.env.EPIDATA_ENDPOINT_URL || 'https://api.covidcast.cmu.edu/epidata',
process.env.EPIDATA_ENDPOINT_URL || 'https://api.delphi.cmu.edu/epidata',
),
},
preventAssignment: true,
Expand Down
32 changes: 29 additions & 3 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,48 @@
import type { IChart } from './store';
import { onMount } from 'svelte';
import { tour } from './tour';
import { addDataSet } from './store';
import { fluViewRegions } from './data/data';
import { DEFAULT_ISSUE } from './components/dialogs/utils';
import { importFluView } from './api/EpiData';

let chart: Chart | null = null;
$: ichart = chart as unknown as IChart | null;

onMount(() => {
tour.start();
if (!localStorage.getItem('shepherd-tour')) {
tour.start();
}

// Try fetching the default FluView dataset! (unless the URL has a shared dataset in it)
const url = new URL(location.href);
const hash = url.hash.slice(1);
if (!hash) {
let regions = fluViewRegions[0].value;
let issue = DEFAULT_ISSUE;
let auth: string = '';

importFluView({ regions, ...issue, auth }).then((ds) => {
if (ds) {
// add the dataset itself
addDataSet(ds);
// reset active datasets to fluview -> ili
$activeDatasets = [ds.datasets[1]];
if (chart) {
chart.fitData(true);
}
}
});
}
});
</script>

<TopMenu chart={ichart} style="grid-area: menu" />
<LeftMenu style="grid-area: side" />
<LeftMenu chart={ichart} style="grid-area: side; max-height: 100vh; overflow: scroll" />
<Chart
bind:this={chart}
style="grid-area: main"
bind:showPoints={$isShowingPoints}
bind:navMode={$navMode}
initialViewport={$initialViewport}
datasets={$activeDatasets}
/>
13 changes: 13 additions & 0 deletions src/api/EpiData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
import DataSet, { DataGroup } from '../data/DataSet';
import EpiDate from '../data/EpiDate';
import EpiPoint from '../data/EpiPoint';
import { get } from 'svelte/store';
import { expandedDataGroups } from '../store';

// import DataSet from "../data/DataSet";
// import EpiDate from "../data/EpiDate";
Expand Down Expand Up @@ -111,6 +113,17 @@ export function loadDataSet(
userParams: Record<string, unknown>,
columns: string[],
): Promise<DataGroup | null> {
const duplicates = get(expandedDataGroups).filter((d) => d.title == title);
if (duplicates.length > 0) {
return UIkit.modal
.alert(
`
<div class="uk-alert uk-alert-error">
Cannot import duplicate dataset: <b>${title}.</b>
</div>`,
)
.then(() => null);
}
const url = new URL(ENDPOINT + `/${endpoint}/`);
const params = cleanParams(userParams);
Object.entries(fixedParams).forEach(([key, value]) => {
Expand Down
5 changes: 4 additions & 1 deletion src/components/Chart.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { activeDatasets } from '../store';
import type DataSet from '../data/DataSet';
import { DEFAULT_VIEWPORT } from '../data/DataSet';
import EpiDate from '../data/EpiDate';
Expand Down Expand Up @@ -81,7 +82,8 @@
export let showPoints = false;
export let interpolate = false;
export let highlightedDate: EpiDate | null = null;
export let datasets: DataSet[] = [];

$: datasets = $activeDatasets;

function date2x(date: number): number {
return ((date - xMin) / (xMax - xMin)) * width;
Expand Down Expand Up @@ -381,6 +383,7 @@
}

export function fitData(shouldAnimate = false): void {
datasets = $activeDatasets; // force an update
if (datasets.length === 0) {
return;
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/LeftMenu.svelte
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<script lang="ts">
import DataSet from '../data/DataSet';
import type { IChart } from '../store';
import { datasetTree, version } from '../store';
import ImportDataSetsMenu from './ImportDataSetsMenu.svelte';
import TreeInnerNode from './tree/TreeInnerNode.svelte';
import TreeLeafNode from './tree/TreeLeafNode.svelte';

export let style = '';
export let chart: IChart | null;
</script>

<side class="left" {style} data-tour="browser">
<ImportDataSetsMenu />
<div class="tree">
{#each $datasetTree.datasets as child (child.title)}
{#if child instanceof DataSet}
<TreeLeafNode node={child} />
<TreeLeafNode {chart} node={child} />
{:else}
<TreeInnerNode node={child} />
<TreeInnerNode {chart} node={child} />
{/if}
{/each}
</div>
Expand Down
Loading