Update app.py
Browse files
app.py
CHANGED
|
@@ -31,35 +31,35 @@ except Exception as e:
|
|
| 31 |
# msg_template = "Compaction velocity must be between 0.5 and 1.5 mm/min"
|
| 32 |
|
| 33 |
|
| 34 |
-
class SoilInput__(BaseModel):
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
|
| 64 |
class SoilInput(BaseModel):
|
| 65 |
cement_perecent: float = Field(
|
|
|
|
| 31 |
# msg_template = "Compaction velocity must be between 0.5 and 1.5 mm/min"
|
| 32 |
|
| 33 |
|
| 34 |
+
# class SoilInput__(BaseModel):
|
| 35 |
+
# cement_perecent: float
|
| 36 |
+
# curing_period: float
|
| 37 |
+
# compaction_rate: float
|
| 38 |
|
| 39 |
|
| 40 |
+
# @model_validator(mode="after")
|
| 41 |
+
# def check_cement_and_curing(self):
|
| 42 |
+
# if self.cement_perecent == 0:
|
| 43 |
+
# self.curing_period = 0
|
| 44 |
+
# else:
|
| 45 |
+
# if not (1 <= self.curing_period <= 90):
|
| 46 |
+
# # raise CuringPeriodError()
|
| 47 |
+
# raise ValueError("Curing period must be between 1 and 90 days")
|
| 48 |
+
# return self
|
| 49 |
|
| 50 |
+
# @validator('cement_perecent')
|
| 51 |
+
# def validate_cement(cls, v):
|
| 52 |
+
# if not 0 <= v <= 15:
|
| 53 |
+
# # raise CementPercentError()
|
| 54 |
+
# raise ValueError("Cement percentage must be between 0% and 15%")
|
| 55 |
+
# return v
|
| 56 |
+
|
| 57 |
+
# @validator('compaction_rate')
|
| 58 |
+
# def validate_compaction(cls, v):
|
| 59 |
+
# if not 0.5 <= v <= 1.5:
|
| 60 |
+
# # raise CompactionRateError()
|
| 61 |
+
# raise ValueError("Compaction velocity must be between 0.5 and 1.5 mm/min")
|
| 62 |
+
# return v
|
| 63 |
|
| 64 |
class SoilInput(BaseModel):
|
| 65 |
cement_perecent: float = Field(
|