Skip to content

Commit

Permalink
temp 2m_max -> 2m_mean and fix package-lock (#293)
Browse files Browse the repository at this point in the history
* temp 2m_max -> 2m_mean and fix package-lock

* package-lock for node 20 instead of node 22

* epic-web/config 1.16.5 also had issues, use 1.12

* add temporary test-pyodide until upgrade of epic-stack

* add temporary test-pyodide until upgrade of epic-stack
  • Loading branch information
thadk authored Feb 1, 2025
1 parent 6ef7f45 commit 053aad1
Show file tree
Hide file tree
Showing 5 changed files with 9,879 additions and 4,110 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/heat-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ jobs:
- name: 🖼 Build icons
working-directory: ${{ env.heat-stack-working-directory }}
run: npm run build:icons
- name: ⚡ Run vitest
- name: ⚡ Run vitest (restore to run test after epic-web v7 upgrade)
working-directory: ${{ env.heat-stack-working-directory }}
run: npm run test app/utils/pyodide.test.ts --
run: npm run test-pyodide
# --coverage

deploy-to-servers:
Expand Down
4 changes: 2 additions & 2 deletions heat-stack/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
- name: 🖼 Build icons
run: npm run build:icons

- name: ⚡ Run vitest
run: npm run test -- --coverage
- name: ⚡ Run vitest-pyodide (restore to run test after epic-web v7 upgrade)
run: npm run test-pyodide -- --coverage

playwright:
name: 🎭 Playwright
Expand Down
8 changes: 4 additions & 4 deletions heat-stack/app/utils/WeatherUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interface ArchiveApiResponse {
elevation: number;
daily_units: {
time: string;
temperature_2m_max: string;
temperature_2m_mean: string;
};
daily: {
time: string[];
temperature_2m_max: (number | null)[];
temperature_2m_mean: (number | null)[];
};
}

Expand All @@ -37,7 +37,7 @@ class WeatherUtil {

params.append("latitude",`${ latitude }`);
params.append("longitude",`${ longitude }`);
params.append("daily","temperature_2m_max");
params.append("daily","temperature_2m_mean");
params.append("timezone","America/New_York");
params.append("start_date",startDate);
params.append("end_date",endDate);
Expand All @@ -50,7 +50,7 @@ class WeatherUtil {
jrez.daily.time.forEach((timeStr: string) => {
dates.push(new Date(timeStr));
});
let temperatures: (number | null)[] = jrez.daily.temperature_2m_max
let temperatures: (number | null)[] = jrez.daily.temperature_2m_mean
// console.log({dates,temperatures});
return {dates,temperatures};
}
Expand Down
Loading

0 comments on commit 053aad1

Please sign in to comment.