diff --git a/pythermalcomfort/models/ankle_draft.py b/pythermalcomfort/models/ankle_draft.py index 47bea9e..d0cf5cd 100644 --- a/pythermalcomfort/models/ankle_draft.py +++ b/pythermalcomfort/models/ankle_draft.py @@ -19,14 +19,14 @@ class AnkleDraft: Attributes ---------- - PPD_ad : float + ppd_ad : float Predicted Percentage of Dissatisfied occupants with ankle draft, [%]. - Acceptability : bool + acceptability : bool Indicates if the air speed at the ankle level is acceptable according to ASHRAE 55 2020 standard. """ - PPD_ad: Union[float, npt.ArrayLike] - Acceptability: Union[bool, npt.ArrayLike] + ppd_ad: Union[float, npt.ArrayLike] + acceptability: Union[bool, npt.ArrayLike] def __getitem__(self, item): return getattr(self, item) @@ -130,7 +130,7 @@ def ankle_draft( from pythermalcomfort.models import ankle_draft results = ankle_draft(25, 25, 0.2, 50, 1.2, 0.5, 0.3, units="SI") print(results) - # AnkleDraft(PPD_ad=18.5, Acceptability=True) + # AnkleDraft(ppd_ad=18.5, acceptability=True) """ # Validate inputs using the AnkleDraftInputs class AnkleDraftInputs( @@ -170,7 +170,7 @@ def ankle_draft( 1, ) acceptability = ppd_val <= 20 - return AnkleDraft(PPD_ad=ppd_val, Acceptability=acceptability) + return AnkleDraft(ppd_ad=ppd_val, acceptability=acceptability) if __name__ == "__main__": diff --git a/tests/test_ankle_draft.py b/tests/test_ankle_draft.py index 38e50fd..01036e3 100644 --- a/tests/test_ankle_draft.py +++ b/tests/test_ankle_draft.py @@ -15,7 +15,7 @@ def test_ankle_draft(get_test_url, retrieve_data): inputs = entry["inputs"] outputs = entry["outputs"] result = ankle_draft(**inputs) - + validate_result(result, outputs, tolerance) @@ -30,10 +30,10 @@ def test_ankle_draft_invalid_input_range(): def test_ankle_draft_outside_ashrae_range(): r = ankle_draft(50, 25, 0.1, 50, 1.2, 0.5, 0.1) - assert np.isnan(r.PPD_ad) + assert np.isnan(r.ppd_ad) r = ankle_draft([50, 45], 25, 0.1, 50, 1.2, 0.5, 0.1) - assert np.all(np.isnan(r.PPD_ad)) + assert np.all(np.isnan(r.ppd_ad)) def test_ankle_draft_list_inputs(): @@ -48,8 +48,8 @@ def test_ankle_draft_list_inputs(): units="SI", ) assert isinstance(results, AnkleDraft) - assert len(results.PPD_ad) == 3 - assert len(results.Acceptability) == 3 + assert len(results.ppd_ad) == 3 + assert len(results.acceptability) == 3 def test_ankle_draft_invalid_list_inputs():