From 3ec2d91f92685482b4198bfef4f29e251f44c96b Mon Sep 17 00:00:00 2001 From: federico Tartarini Date: Fri, 15 Mar 2024 14:57:35 +1030 Subject: [PATCH] fix: tox only testing python 3.10 and added type ints to cooling effect --- .github/workflows/build-test-publish-testPyPI.yml | 2 +- pythermalcomfort/models/cooling_effect.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish-testPyPI.yml b/.github/workflows/build-test-publish-testPyPI.yml index c207088..21423dc 100644 --- a/.github/workflows/build-test-publish-testPyPI.yml +++ b/.github/workflows/build-test-publish-testPyPI.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: [ '3.10' ] steps: - uses: actions/checkout@v3 diff --git a/pythermalcomfort/models/cooling_effect.py b/pythermalcomfort/models/cooling_effect.py index 4171e89..bc17c2a 100644 --- a/pythermalcomfort/models/cooling_effect.py +++ b/pythermalcomfort/models/cooling_effect.py @@ -1,4 +1,5 @@ import warnings +from typing import Union from scipy import optimize @@ -8,7 +9,16 @@ from pythermalcomfort.models.set_tmp import set_tmp -def cooling_effect(tdb, tr, vr, rh, met, clo, wme=0, units="SI"): +def cooling_effect( + tdb: Union[float, int], + tr: Union[float, int], + vr: Union[float, int], + rh: Union[float, int], + met: Union[float, int], + clo: Union[float, int], + wme=0, + units="SI", +): """Returns the value of the Cooling Effect (`CE`_) calculated in compliance with the ASHRAE 55 2020 Standard [1]_. The `CE`_ of the elevated air speed is the value that, when subtracted equally from both the average air