-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add thresholds to variable model
Add `variable.lower_threshold` and `variable.upper_threshold` to the variable model, so that thresholds are savedin the app database.
- Loading branch information
1 parent
4f1692a
commit b0395db
Showing
9 changed files
with
88 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
import { createContext } from "react"; | ||
import { SimulateResponse, TimeIntervalRead } from "../app/backendApi"; | ||
import { Thresholds } from "../App"; | ||
import { SimulateResponse } from "../app/backendApi"; | ||
|
||
export const SimulationContext = createContext({ | ||
simulations: [] as SimulateResponse[], | ||
setSimulations: (simulations: SimulateResponse[]) => {}, | ||
thresholds: {} as Thresholds, | ||
setThresholds: (thresholds: Thresholds) => {}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.25 on 2024-11-25 14:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('pkpdapp', '0016_auto_20241122_1523'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='variable', | ||
name='lower_threshold', | ||
field=models.FloatField(blank=True, help_text='lower threshold for this variable', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='variable', | ||
name='upper_threshold', | ||
field=models.FloatField(blank=True, help_text='upper threshold for this variable', null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters