diff --git a/tests/__pycache__/__init__.cpython-36.pyc b/tests/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 68c85b5..0000000 Binary files a/tests/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/tests/__pycache__/conftest.cpython-36.pyc b/tests/__pycache__/conftest.cpython-36.pyc deleted file mode 100644 index c98df06..0000000 Binary files a/tests/__pycache__/conftest.cpython-36.pyc and /dev/null differ diff --git a/tests/conftest.py b/tests/conftest.py index 54061c8..7298978 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import sys import pytest -import translater as tr +import translator as tr # Parametrization of the fixture scratch_then_cache. The following array diff --git a/tests/test_cli.py b/tests/test_cli.py index a083b46..11cad52 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,13 +4,13 @@ import pytest from click.testing import CliRunner from path import Path -from translater import settings, copy_file, log, load_idf -from translater.cli import cli +from translator import settings, copy_file, log, load_idf +from translator.cli import cli from tests.test_trnsys import get_platform class TestCli: - """Defines tests for usage of the translater Command Line Interface""" + """Defines tests for usage of the translator Command Line Interface""" @pytest.fixture( params=[ @@ -73,7 +73,7 @@ class TestCli: "--ep_version", "9-2-0", "--window_lib", - "translater/ressources/W74-lib.dat", + "translator/ressources/W74-lib.dat", "tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "--trnsidf_exe", @@ -95,7 +95,7 @@ class TestCli: "--ep_version", "9-2-0", "--template", - "translater/ressources/NewFileTemplate.d18", + "translator/ressources/NewFileTemplate.d18", "tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "--trnsidf_exe", diff --git a/tests/test_energyseries.py b/tests/test_energyseries.py index 1edd4c3..a1be1e6 100644 --- a/tests/test_energyseries.py +++ b/tests/test_energyseries.py @@ -1,12 +1,12 @@ import os -import translater as tr +import translator as tr import pandas as pd import pytest from path import Path -from translater import EnergySeries, get_eplus_dirs, settings +from translator import EnergySeries, get_eplus_dirs, settings import numpy as np @@ -22,7 +22,7 @@ import numpy as np ], ) def energy_series(config, request): - from translater import ReportData + from translator import ReportData outputs = { "ep_object": "Output:Variable".upper(), @@ -62,7 +62,7 @@ def energy_series(config, request): params=(["Water Heater Tank Temperature", "WaterSystems:EnergyTransfer"]) ) def rd(request): - from translater import ReportData + from translator import ReportData file = Path("tests/input_data/trnsys/HeatPumpWaterHeater.sqlite") @@ -73,7 +73,7 @@ def rd(request): def test_EnergySeries(rd): import matplotlib.pyplot as plt - from translater import EnergySeries + from translator import EnergySeries es = EnergySeries.from_sqlite(rd) es.plot() diff --git a/tests/test_idf.py b/tests/test_idf.py index 5ce67e0..ab56584 100644 --- a/tests/test_idf.py +++ b/tests/test_idf.py @@ -2,15 +2,15 @@ import os import random import subprocess -import translater as tr +import translator as tr import matplotlib as mpl # use agg backend so you don't need a display on travis-ci import pytest from path import Path -import translater.settings -from translater import EnergyPlusProcessError, get_eplus_dirs, settings, \ +import translator.settings +from translator import EnergyPlusProcessError, get_eplus_dirs, settings, \ parallel_process mpl.use("Agg") @@ -85,7 +85,7 @@ def test_load_old(config): @pytest.mark.parametrize( "ep_version", - [translater.settings.ep_version, None], + [translator.settings.ep_version, None], ids=["specific-ep-version", "no-specific-ep-version"], ) def test_run_olderv(clean_config, ep_version): @@ -175,7 +175,7 @@ def test_area(archetype, area): """Test the conditioned_area property against published values desired values taken from https://github.com/canmet-energy/btap""" import numpy as np - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob("*{}*.idf".format(archetype)) idf = load_idf(next(iter(idf_file))) @@ -183,7 +183,7 @@ def test_area(archetype, area): def test_wwr(): - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob( "*{}*.idf".format("FullServiceRestaurant") @@ -194,7 +194,7 @@ def test_wwr(): def test_partition_ratio(): - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob("*LargeOffice*.idf") idf = load_idf(next(iter(idf_file))) @@ -202,7 +202,7 @@ def test_partition_ratio(): def test_space_cooling_profile(config): - from translater import load_idf + from translator import load_idf file = ( get_eplus_dirs(settings.ep_version) @@ -218,7 +218,7 @@ def test_space_cooling_profile(config): def test_space_heating_profile(config): - from translater import load_idf + from translator import load_idf file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.idf" wf = "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -229,7 +229,7 @@ def test_space_heating_profile(config): def test_dhw_profile(config): - from translater import load_idf + from translator import load_idf file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.idf" wf = "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -243,7 +243,7 @@ def test_dhw_profile(config): def test_old_than_change_args(clean_config): """Should upgrade file only once even if run_eplus args are changed afterwards""" - from translater import run_eplus + from translator import run_eplus file = ( get_eplus_dirs(settings.ep_version) diff --git a/tests/test_schedules.py b/tests/test_schedules.py index 4834034..2dd7c2d 100644 --- a/tests/test_schedules.py +++ b/tests/test_schedules.py @@ -2,7 +2,7 @@ import os import pytest -from translater import ( +from translator import ( Schedule, load_idf, copy_file, diff --git a/tests/test_trnsys.py b/tests/test_trnsys.py index 85479c1..02430dc 100644 --- a/tests/test_trnsys.py +++ b/tests/test_trnsys.py @@ -5,7 +5,7 @@ import shutil import pytest -import translater as tr +import translator as tr import pandas as pd @@ -13,7 +13,7 @@ from path import Path from copy import deepcopy -from translater import ( +from translator import ( convert_idf_to_trnbuild, parallel_process, trnbuild_idf, @@ -27,7 +27,7 @@ from translater import ( ) # Function round to hundreds -from translater.trnsys import ( +from translator.trnsys import ( _assert_files, load_idf_file_and_clean_names, clear_name_idf_objects, @@ -72,7 +72,7 @@ from tests.conftest import get_platform def converttesteasy(request): file = request.param window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' @@ -770,7 +770,7 @@ def converttest(request): file = get_eplus_dirs(settings.ep_version) / "ExampleFiles" / request.param # file = request.param window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' @@ -1162,7 +1162,7 @@ class TestTrnBuild: def test_trnbuild_from_idf(self, config, trnbuild_file): # Gets file paths/names window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) weather_file = os.path.join( "tests", "input_data", "CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -1305,7 +1305,7 @@ class TestTrnBuild: def test_trnbuild_from_simple_idf(config): # Path to weather file, window library and T3D template window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) weather_file = os.path.join( "tests", "input_data", "CAN_QC_Montreal-McTavish.716120_CWEC2016.epw"