Skip to content

Commit

Permalink
fix(requirements): Add PH-units dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-p-may committed Nov 13, 2022
1 parent 1e1c3dd commit 8da30ec
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions PHX/to_PHPP/xl_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Union, Optional
import string

from honeybee_ph_utils import units
from ph_units.converter import convert

xl_writable = Optional[Union[str, float, int, list, tuple]]
xl_range_value = Optional[Union[str, float, int]]
Expand Down Expand Up @@ -36,9 +36,9 @@ def write_value(self):
return self._write_value

if isinstance(self._write_value, (tuple, list)):
return [units.convert(v, self.input_unit, self.target_unit) for v in self._write_value]
return [convert(v, self.input_unit, self.target_unit) for v in self._write_value]
else:
return units.convert(self._write_value, self.input_unit, self.target_unit)
return convert(self._write_value, self.input_unit, self.target_unit)

def __str__(self):
return f'{self.__class__.__name__}({self.sheet_name}, {self.xl_range}, {self.write_value})'
Expand Down
8 changes: 4 additions & 4 deletions _testing_to_PHPP.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

# --- Input file Path
# -------------------------------------------------------------------------
# SOURCE_FILE = pathlib.Path(
# "/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/tests/_source_hbjson/Default_Model_Single_Zone.hbjson"
# )
SOURCE_FILE = pathlib.Path(
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/sample/hbjson/221104_Whole_Building.hbjson"
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/tests/_source_hbjson/Default_Model_Single_Zone.hbjson"
)
SOURCE_FILE = pathlib.Path(
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/sample/hbjson/221104_Residential.hbjson"
)

if __name__ == '__main__':
Expand Down
18 changes: 9 additions & 9 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
coverage>=6.4.1
pytest>=6.2.4
pytest-cov>=3.0.0
rich>=12.4.4
setuptools>=63.1.0
Sphinx>=5.0.2
sphinx-bootstrap-theme>=0.7.1
twine>=4.0.1
wheel>=0.36.2
coverage
pytest
pytest-cov
rich
setuptools
Sphinx
sphinx-bootstrap-theme
twine
wheel
13 changes: 7 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
honeybee-core>=1.51.47
honeybee-energy>=1.94.10
honeybee-ph>=1.3.5
pydantic>=1.9.1
rich>=12.4.1
xlwings>=0.27.8
honeybee-core>=1.54.2
honeybee-energy>=1.95.6
honeybee-ph
PH-units
pydantic
rich
xlwings

0 comments on commit 8da30ec

Please sign in to comment.