Skip to content

Commit

Permalink
fixed utci documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoTartarini committed Feb 13, 2020
1 parent 73e04f7 commit 4647e83
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.6
current_version = 0.3.0
commit = True
tag = True

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Overview
:alt: Supported implementations
:target: https://pypi.org/project/pythermalcomfort

.. |commits-since| image:: https://img.shields.io/github/commits-since/CenterForTheBuiltEnvironment/pythermalcomfort/v0.2.6.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/CenterForTheBuiltEnvironment/pythermalcomfort/v0.3.0.svg
:alt: Commits since latest release
:target: https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort/compare/v0.2.6...master
:target: https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort/compare/v0.3.0...master



Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
year = '2019-2020'
author = 'Federico Tartarini'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.2.6'
version = release = '0.3.0'

pygments_style = 'trac'
templates_path = ['.']
Expand Down
14 changes: 11 additions & 3 deletions docs/reference/pythermalcomfort.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@ SET

.. autofunction:: pythermalcomfort.models.set_tmp

Adaptive ASHRAE
---------------

.. autofunction:: pythermalcomfort.models.adaptive_ashrae

UTCI
----

.. autofunction:: pythermalcomfort.models.utci


References
----------
.. [1] ANSI, & ASHRAE. (2017). Thermal Environmental Conditions for Human Occupancy. Atlanta.
Adaptive ASHRAE
---------------
.. autofunction:: pythermalcomfort.models.adaptive_ashrae
Psychrometrics functions
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read(*names, **kwargs):

setup(
name='pythermalcomfort',
version='0.2.6',
version='0.3.0',
license='MIT',
description='Package to calculate sevral thermal comfort indeces (e.g. PMV, PPD, SET, adaptive) and convert physical variables.',
long_description='%s\n%s' % (
Expand Down
2 changes: 1 addition & 1 deletion src/pythermalcomfort/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.2.6'
__version__ = '0.3.0'

from pythermalcomfort.models import *
20 changes: 6 additions & 14 deletions src/pythermalcomfort/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def utci(ta, tr, rh, v):
Returns
-------
utci : float
utci
Universal Thermal Climate Index, [C]
Notes
Expand All @@ -501,19 +501,10 @@ def utci(ta, tr, rh, v):
--------
.. code-block:: python
>>> from pythermalcomfort.models import adaptive_ashrae
>>> results = adaptive_ashrae(ta=25, tr=25, t_running_mean=20, v=0.1)
>>> from pythermalcomfort.models import utci
>>> results = utci(ta=25, tr=25, rh=50, v=1)
>>> print(results)
{'tmp_cmf': 24.0, 'tmp_cmf_80_low': 20.5, 'tmp_cmf_80_up': 27.5, 'tmp_cmf_90_low': 21.5, 'tmp_cmf_90_up': 26.5, 'acceptability_80': True, 'acceptability_90': False}
>>> print(results['acceptability_80'])
True
# The conditions you entered are considered to be comfortable for by 80% of the occupants
>>> results = adaptive_ashrae(ta=25, tr=25, t_running_mean=9, v=0.1)
ValueError: The running mean is outside the standards applicability limits
# The adaptive thermal comfort model can only be used
# if the running mean temperature is higher than 10°C
24.6
Raises
------
Expand Down Expand Up @@ -787,4 +778,5 @@ def es(ta):
cmf = None
stress_range = None

return {'utci': round(UTCI_approx, 1), 'cmf': cmf, 'stress_range': stress_range}
# return {'utci': round(UTCI_approx, 1), 'cmf': cmf, 'stress_range': stress_range}
return round(UTCI_approx, 1) # todo maybe return also the other parameters see line above

0 comments on commit 4647e83

Please sign in to comment.