Skip to content

Commit

Permalink
feat: import temperatures and implement the simulation engine
Browse files Browse the repository at this point in the history
- feat(deps): add vitest
  • Loading branch information
ReidyT committed Oct 28, 2024
1 parent 8fbf3fa commit 3451646
Show file tree
Hide file tree
Showing 37 changed files with 230,492 additions and 82 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
VITE_ENABLE_MOCK_API: true
VITE_VERSION: cypress-tests

- name: Vitest Run
run: yarn vitest
shell: bash

- name: Cypress Run
uses: cypress-io/github-action@v5
env:
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,30 @@ If an existing model is updated, we should replace the type and the React compon

The positions of the meshes within the group are auto-generated, and they should never be manually modified. If an object needs to be repositioned, adjust its `position` prop applied directly to the group instead. This maintains consistency and ensures the auto-generated structure remains intact while allowing for flexible positioning.

## Downloading a CSV File

To download a CSV file of temperatures, follow these steps:

1. **CSV File Requirements**:

- The CSV file must contain a header.
- The first column should represent time in GMT+0, formatted in ISO 8601.
- The second column should contain the temperature values in °C.

2. **File Location**:

- Ensure that your CSV file is placed in the `public` directory of your project.
- For example, if your file is named `temperatures.csv`, the path will be `'temperatures.csv'` when referencing it from the public directory (i.e., `public/temperatures.csv`).

3. **Data Source**:

- You can download the required CSV data from [Open Meteo](https://open-meteo.com/). Be aware of the measurement frequency, which can be either per hour or per day, based on historical data (per hour) or futur predictions (one temperature per day).

4. **Using the TemperatureContext**:
- In TemperatureContext, you can load this CSV file by referencing the appropriate path. Make sure to handle the data correctly based on the specified format and structure. Also be sure to specify the measurement frequency, which can be either per hour or per day, based on your needs.

Following these guidelines will ensure that your CSV file is correctly set up and accessible for the application.

### Credits

The house and tree models are created by [Sloyd.ai](https://www.sloyd.ai). All rights reserved by Sloyd for these models.
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"i18next": "^23.9.0",
"papaparse": "^5.4.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-i18next": "14.1.3",
Expand Down Expand Up @@ -64,6 +65,7 @@
"@eslint/js": "^9.12.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/i18n": "0.13.12",
"@types/papaparse": "^5.3.15",
"@types/three": "^0",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "7.18.0",
Expand Down Expand Up @@ -94,7 +96,8 @@
"uuid": "9.0.1",
"vite": "^5.1.3",
"vite-plugin-checker": "^0.8.0",
"vite-plugin-istanbul": "^6.0.0"
"vite-plugin-istanbul": "^6.0.0",
"vitest": "^2.1.3"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit 3451646

Please sign in to comment.