Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pandas==2.2.3 numpy pyarrow tqdm requests hubdata jsonschema
pip install pandas numpy pyarrow tqdm requests hubdata jsonschema

- name: Process All Datasets (Hubs + NHSN)
run: |
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/format-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Formatting and lint compliance

on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]

jobs:
quality-check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: app/package-lock.json

- name: Install Dependencies
run: npm ci

- name: Run Linter
run: npm run lint

- name: Verify Formatting
run: npm run format:check
28 changes: 0 additions & 28 deletions .github/workflows/lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/parity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pandas==2.2.3 jsonschema
pip install pandas jsonschema

- name: Set up R
uses: r-lib/actions/setup-r@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pandas==2.2.3 pytest jsonschema
pip install pandas pytest jsonschema

- name: Run processor unit tests
run: python -m pytest tests/test_processors.py
10 changes: 10 additions & 0 deletions app/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Help GUI apps (like GitHub Desktop) find Node and npx
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"

# Move into the app directory
cd app

# Run lint-staged
npx lint-staged
32 changes: 32 additions & 0 deletions app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# build outputs
dist/
build/
out/
.next/

# dependencies
node_modules/
vendor/

# environment variables
.env
.env.*

# any potential testing and logs
coverage/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# assets + data (corrupts images, takes too long for data)
public/
*.svg
*.ico
*.png
*.jpg

# locks
package-lock.json
yarn.lock
pnpm-lock.yaml
1 change: 1 addition & 0 deletions app/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
40 changes: 21 additions & 19 deletions app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import js from "@eslint/js";
import globals from "globals";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import eslintConfigPrettier from "eslint-config-prettier";

export default [
{ ignores: ['dist'] },
{ ignores: ["dist"] },
{
files: ['**/*.{js,jsx}'],
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaVersion: "latest",
ecmaFeatures: { jsx: true },
sourceType: 'module',
sourceType: "module",
},
},
settings: { react: { version: '18.3' } },
settings: { react: { version: "18.3" } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...react.configs["jsx-runtime"].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
"react/jsx-no-target-blank": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
'react/prop-types': 'off',
'react/no-unescaped-entities': 'off',
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"no-irregular-whitespace": "off",
},
},
]
eslintConfigPrettier,
];
54 changes: 33 additions & 21 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,48 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RespiLens</title>
<meta name="description" content="Explore the latest forecasts of respiratory disease activity across every U.S. state. RespiLens provides intuitive and consolidated visualization of influenza, COVID-19, and RSV forecasts from CDC-led competitions." />
<meta
name="description"
content="Explore the latest forecasts of respiratory disease activity across every U.S. state. RespiLens provides intuitive and consolidated visualization of influenza, COVID-19, and RSV forecasts from CDC-led competitions."
/>
<!-- Google Analytics (GA4) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=%VITE_GA_MEASUREMENT_ID%"></script>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=%VITE_GA_MEASUREMENT_ID%"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '%VITE_GA_MEASUREMENT_ID%');
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "%VITE_GA_MEASUREMENT_ID%");
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Respilens",
"url": "https://respilens.com",
"logo": "https://www.respilens.com/respilens-logo.svg",
"sameAs": [
"https://github.com/ACCIDDA/RespiLens",
]
}
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Respilens",
"url": "https://respilens.com",
"logo": "https://www.respilens.com/respilens-logo.svg",
"sameAs": ["https://github.com/ACCIDDA/RespiLens"]
}
</script>
<script>
// Color scheme handling
(function() {
var key = 'respilens-color-scheme';
var colorScheme = localStorage.getItem(key) || 'auto';
if (colorScheme === 'auto') {
colorScheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
(function () {
var key = "respilens-color-scheme";
var colorScheme = localStorage.getItem(key) || "auto";
if (colorScheme === "auto") {
colorScheme = window.matchMedia("(prefers-color-scheme: dark)")
.matches
? "dark"
: "light";
}
document.documentElement.setAttribute('data-mantine-color-scheme', colorScheme);
document.documentElement.setAttribute(
"data-mantine-color-scheme",
colorScheme,
);
})();
</script>
</head>
Expand Down
Loading
Loading