From 6b554c53d1bd25af2683f422d01e37fc8abe07db Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 2 Mar 2023 13:28:03 -0600 Subject: [PATCH] Rename source dir to energyplus_api_helpers --- .github/workflows/flake8.yml | 2 +- .github/workflows/test.yml | 10 +++++----- README.md | 4 ++-- .../__init__.py | 0 .../demos/01_simple_library_call.py | 2 +- .../demos/02_threaded.py | 2 +- .../demos/03_multiprocessed.py | 2 +- .../demos/04_dynamic_terminal_output_progress.py | 2 +- .../demos/05_dynamic_terminal_output.py | 2 +- .../demos/06_plot_e_plus.py | 2 +- .../demos/07_server.py | 2 +- .../demos/07_server_index.html | 0 .../demos/08_server_advanced.py | 2 +- .../demos/08_server_advanced_index.html | 0 .../demos/__init__.py | 0 .../import_helper.py | 2 +- setup.py | 14 +++++++------- 17 files changed, 24 insertions(+), 24 deletions(-) rename {eplus_api_helpers => energyplus_api_helpers}/__init__.py (100%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/01_simple_library_call.py (87%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/02_threaded.py (92%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/03_multiprocessed.py (94%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/04_dynamic_terminal_output_progress.py (92%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/05_dynamic_terminal_output.py (96%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/06_plot_e_plus.py (97%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/07_server.py (98%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/07_server_index.html (100%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/08_server_advanced.py (98%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/08_server_advanced_index.html (100%) rename {eplus_api_helpers => energyplus_api_helpers}/demos/__init__.py (100%) rename {eplus_api_helpers => energyplus_api_helpers}/import_helper.py (98%) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 3ecdb5d..93d4c3d 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -18,4 +18,4 @@ jobs: run: pip install flake8 - name: Run Flake8 - run: flake8 eplus_api_helpers + run: flake8 energyplus_api_helpers diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48e9d2d..e78ea1e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,12 +44,12 @@ jobs: - name: Extract EnergyPlus run: ${{ matrix.extract_command }} "energyplus${{ matrix.file_extension }}" - name: Run Example Script 01 - run: python ./eplus_api_helpers/demos/01_simple_library_call.py "./${{ matrix.file_base_name }}" + run: python ./energyplus_api_helpers/demos/01_simple_library_call.py "./${{ matrix.file_base_name }}" # - name: Run Example Script 02 -# run: python ./eplus_api_helpers/demos/02_threaded.py "./${{ matrix.file_base_name }}" +# run: python ./energyplus_api_helpers/demos/02_threaded.py "./${{ matrix.file_base_name }}" - name: Run Example Script 03 - run: python ./eplus_api_helpers/demos/03_multiprocessed.py "./${{ matrix.file_base_name }}" + run: python ./energyplus_api_helpers/demos/03_multiprocessed.py "./${{ matrix.file_base_name }}" - name: Run Example Script 04 - run: python ./eplus_api_helpers/demos/04_dynamic_terminal_output_progress.py "./${{ matrix.file_base_name }}" + run: python ./energyplus_api_helpers/demos/04_dynamic_terminal_output_progress.py "./${{ matrix.file_base_name }}" - name: Run Example Script 05 - run: python ./eplus_api_helpers/demos/05_dynamic_terminal_output.py "./${{ matrix.file_base_name }}" + run: python ./energyplus_api_helpers/demos/05_dynamic_terminal_output.py "./${{ matrix.file_base_name }}" diff --git a/README.md b/README.md index 978b462..a81d492 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ This project is a small library of helper functionality and, more importantly, demo scripts, for interacting with the EnergyPlus API. The EnergyPlus Python API is not on PyPi (as of now), it simply comes with the EnergyPlus installation. -This library makes that process a bit easier, and also offers a set of demos in the `eplus_api_helpers/demos` folder. +This library makes that process a bit easier, and also offers a set of demos in the `energyplus_api_helpers/demos` folder. A super minimal example using the helper class here: ```python from pathlib import Path -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper helper = EPlusAPIHelper(Path('/path/to/EnergyPlus-22-2-0')) api = helper.get_api_instance() diff --git a/eplus_api_helpers/__init__.py b/energyplus_api_helpers/__init__.py similarity index 100% rename from eplus_api_helpers/__init__.py rename to energyplus_api_helpers/__init__.py diff --git a/eplus_api_helpers/demos/01_simple_library_call.py b/energyplus_api_helpers/demos/01_simple_library_call.py similarity index 87% rename from eplus_api_helpers/demos/01_simple_library_call.py rename to energyplus_api_helpers/demos/01_simple_library_call.py index 41c2403..5c44c5f 100644 --- a/eplus_api_helpers/demos/01_simple_library_call.py +++ b/energyplus_api_helpers/demos/01_simple_library_call.py @@ -1,6 +1,6 @@ from pathlib import Path from sys import argv -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper eplus_path = '/eplus/installs/EnergyPlus-22-2-0' diff --git a/eplus_api_helpers/demos/02_threaded.py b/energyplus_api_helpers/demos/02_threaded.py similarity index 92% rename from eplus_api_helpers/demos/02_threaded.py rename to energyplus_api_helpers/demos/02_threaded.py index 0e27232..5ebfa61 100644 --- a/eplus_api_helpers/demos/02_threaded.py +++ b/energyplus_api_helpers/demos/02_threaded.py @@ -1,7 +1,7 @@ from pathlib import Path from sys import argv from threading import Thread -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper eplus_path = '/eplus/installs/EnergyPlus-22-2-0' diff --git a/eplus_api_helpers/demos/03_multiprocessed.py b/energyplus_api_helpers/demos/03_multiprocessed.py similarity index 94% rename from eplus_api_helpers/demos/03_multiprocessed.py rename to energyplus_api_helpers/demos/03_multiprocessed.py index b66190f..96bfea1 100644 --- a/eplus_api_helpers/demos/03_multiprocessed.py +++ b/energyplus_api_helpers/demos/03_multiprocessed.py @@ -1,7 +1,7 @@ from pathlib import Path import multiprocessing as mp from sys import argv -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper eplus_path = '/eplus/installs/EnergyPlus-22-2-0' if len(argv) > 1: diff --git a/eplus_api_helpers/demos/04_dynamic_terminal_output_progress.py b/energyplus_api_helpers/demos/04_dynamic_terminal_output_progress.py similarity index 92% rename from eplus_api_helpers/demos/04_dynamic_terminal_output_progress.py rename to energyplus_api_helpers/demos/04_dynamic_terminal_output_progress.py index c3ffa6c..82c969a 100644 --- a/eplus_api_helpers/demos/04_dynamic_terminal_output_progress.py +++ b/energyplus_api_helpers/demos/04_dynamic_terminal_output_progress.py @@ -1,6 +1,6 @@ from pathlib import Path from sys import argv -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper eplus_path = '/eplus/installs/EnergyPlus-22-2-0' if len(argv) > 1: diff --git a/eplus_api_helpers/demos/05_dynamic_terminal_output.py b/energyplus_api_helpers/demos/05_dynamic_terminal_output.py similarity index 96% rename from eplus_api_helpers/demos/05_dynamic_terminal_output.py rename to energyplus_api_helpers/demos/05_dynamic_terminal_output.py index a3ff80b..849c0e4 100644 --- a/eplus_api_helpers/demos/05_dynamic_terminal_output.py +++ b/energyplus_api_helpers/demos/05_dynamic_terminal_output.py @@ -2,7 +2,7 @@ from pathlib import Path from sys import argv import sparkline -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper outdoor_db_handle = None plot_data = [] diff --git a/eplus_api_helpers/demos/06_plot_e_plus.py b/energyplus_api_helpers/demos/06_plot_e_plus.py similarity index 97% rename from eplus_api_helpers/demos/06_plot_e_plus.py rename to energyplus_api_helpers/demos/06_plot_e_plus.py index 0ba5418..bc6872d 100644 --- a/eplus_api_helpers/demos/06_plot_e_plus.py +++ b/energyplus_api_helpers/demos/06_plot_e_plus.py @@ -1,6 +1,6 @@ import matplotlib.pyplot as plt from pathlib import Path -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper class PlotManager: diff --git a/eplus_api_helpers/demos/07_server.py b/energyplus_api_helpers/demos/07_server.py similarity index 98% rename from eplus_api_helpers/demos/07_server.py rename to energyplus_api_helpers/demos/07_server.py index a841833..c37dd0f 100644 --- a/eplus_api_helpers/demos/07_server.py +++ b/energyplus_api_helpers/demos/07_server.py @@ -2,7 +2,7 @@ from pathlib import Path from threading import Thread from time import sleep -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper app = Flask("EnergyPlus API Server Demo") e = EPlusAPIHelper(Path('/eplus/installs/EnergyPlus-22-2-0')) diff --git a/eplus_api_helpers/demos/07_server_index.html b/energyplus_api_helpers/demos/07_server_index.html similarity index 100% rename from eplus_api_helpers/demos/07_server_index.html rename to energyplus_api_helpers/demos/07_server_index.html diff --git a/eplus_api_helpers/demos/08_server_advanced.py b/energyplus_api_helpers/demos/08_server_advanced.py similarity index 98% rename from eplus_api_helpers/demos/08_server_advanced.py rename to energyplus_api_helpers/demos/08_server_advanced.py index abfc61c..8eb9b7e 100644 --- a/eplus_api_helpers/demos/08_server_advanced.py +++ b/energyplus_api_helpers/demos/08_server_advanced.py @@ -2,7 +2,7 @@ from pathlib import Path from threading import Thread from time import sleep -from eplus_api_helpers.import_helper import EPlusAPIHelper +from energyplus_api_helpers.import_helper import EPlusAPIHelper class RunConfig: diff --git a/eplus_api_helpers/demos/08_server_advanced_index.html b/energyplus_api_helpers/demos/08_server_advanced_index.html similarity index 100% rename from eplus_api_helpers/demos/08_server_advanced_index.html rename to energyplus_api_helpers/demos/08_server_advanced_index.html diff --git a/eplus_api_helpers/demos/__init__.py b/energyplus_api_helpers/demos/__init__.py similarity index 100% rename from eplus_api_helpers/demos/__init__.py rename to energyplus_api_helpers/demos/__init__.py diff --git a/eplus_api_helpers/import_helper.py b/energyplus_api_helpers/import_helper.py similarity index 98% rename from eplus_api_helpers/import_helper.py rename to energyplus_api_helpers/import_helper.py index 3559342..d2a274f 100644 --- a/eplus_api_helpers/import_helper.py +++ b/energyplus_api_helpers/import_helper.py @@ -12,7 +12,7 @@ class _EPlusImporter: This class should be used as:: from pathlib import Path - from eplus_api_helpers import EPlusImporter + from energyplus_api_helpers import EPlusImporter p = Path('/path/to/energyplus/install') with _EplusImporter() as eplus_helper: from pyenergyplus.api import EnergyPlusAPI diff --git a/setup.py b/setup.py index 86d7ac9..b7d8364 100644 --- a/setup.py +++ b/setup.py @@ -6,19 +6,19 @@ setup( name="energyplus_api_helpers", - version="0.2", - packages=['eplus_api_helpers', 'eplus_api_helpers.demos'], + version="0.3", + packages=['energyplus_api_helpers', 'energyplus_api_helpers.demos'], description="A set of helper classes, functions and demos, for interacting with the EnergyPlus Python API", - package_data={"eplus_api_helpers.demos": ["*.html"]}, + package_data={"energyplus_api_helpers.demos": ["*.html"]}, include_package_data=True, long_description=readme_contents, long_description_content_type='text/markdown', author='Edwin Lee', author_email='a@a.a', - url='https://github.com/Myoldmopar/EnergyPlusAPIDemos', + url='https://github.com/Myoldmopar/EnergyPlusAPIHelper', license='UnlicensedForNow', install_requires=['matplotlib', 'flask', 'pysparklines', 'asciichartpy'], - entry_points={ - 'console_scripts': ['energyplus_pet_gui=energyplus_pet.runner:main_gui'] - } + # entry_points={ + # 'console_scripts': ['energyplus_api_helper=energyplus_api_helpers.runner:main_gui'] + # } )