Skip to content

Commit

Permalink
Merge pull request #94 from Myoldmopar/FixIDDPackaging
Browse files Browse the repository at this point in the history
Package IDDs and test IDFs
  • Loading branch information
Myoldmopar authored Feb 6, 2017
2 parents ad2e68c + 9f7c985 commit c7aed8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include eptransition *.idf *.idd
2 changes: 1 addition & 1 deletion eptransition/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__name__ = "EPTransition"
__version__ = 0.92
__version__ = 0.951
__description__ = "This tool is used to transition EnergyPlus input files between versions"
9 changes: 8 additions & 1 deletion eptransition/idd/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def process_file_given_file_path(self, file_path):
"""
if not os.path.exists(file_path):
raise exceptions.ProcessingException("Input IDD file not found=\"" + file_path + "\"") # pragma: no cover
self.idd_file_stream = open(file_path, "r")
self.idd_file_stream = open(file_path, "rb")
self.file_path = file_path
return self.process_file()

Expand Down Expand Up @@ -159,6 +159,13 @@ def process_file(self):
if not peeked_char:
peeked_char = "\n" # to simulate that the line ended

# if we are on Windows, we may end up with "\r", so move the read and peeked characters forward once
if peeked_char == "\r": # pragma no cover -- we don't unit test on windows, so this won't be caught
just_read_char = self.read_one_char()
peeked_char = self.peek_one_char()
if not peeked_char:
peeked_char = "\n"

# jump if we are at an EOL
if just_read_char == "\n":
# increment the counter
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def my_test_suite():
],
keywords='cli energyplus',
packages=setuptools.find_packages(exclude=['test', 'test.*', '.tox']),
include_package_data=True,
install_requires=[],
extras_require={
'test': ['coverage', 'unittest', 'coveralls'],
Expand Down

0 comments on commit c7aed8a

Please sign in to comment.