def cli( cli_config, data_folder, logs_folder, imgs_folder, cache_folder, use_cache, log_file, log_console, log_level, log_name, log_filename, trnsys_default_folder, ep_version, ): """archetypal: Retrieve, construct, simulate, convert and analyse building simulation templates Visit archetypal.readthedocs.io for the online documentation. """ cli_config.data_folder = data_folder cli_config.logs_folder = logs_folder cli_config.imgs_folder = imgs_folder cli_config.cache_folder = cache_folder cli_config.use_cache = use_cache cli_config.log_file = log_file cli_config.log_console = log_console cli_config.log_level = log_level cli_config.log_name = log_name cli_config.log_filename = log_filename cli_config.trnsys_default_folder = trnsys_default_folder cli_config.ep_version = ep_version # apply new config params config(**cli_config.__dict__)
def config(): ar.config(log_console=True, log_file=True, use_cache=True, data_folder='.temp/data', logs_folder='.temp/logs', imgs_folder='.temp/imgs', cache_folder='.temp/cache', umitemplate='../data/BostonTemplateLibrary.json')
def schedules_idf(): config(cache_folder="tests/.temp/cache") idf = load_idf( idf_file, include=[ get_eplus_dirs(settings.ep_version) / "DataSets" / "TDV" / "TDV_2008_kBtu_CTZ06.csv" ], ) return idf
def config(): ar.config( data_folder="tests/.temp/data", logs_folder="tests/.temp/logs", imgs_folder="tests/.temp/imgs", cache_folder="tests/.temp/cache", use_cache=True, log_file=True, log_console=True, umitemplate="tests/input_data/umi_samples/BostonTemplateLibrary_2.json", )
import pandas as pd from path import Path from archetypal import config, run_eplus, parallel_process config(cache_folder="../../tests/.temp/cache", use_cache=True, log_console=True) def main(): # setup directories and input files necb_basedir = Path("../../tests/input_data/trnsys") files = necb_basedir.glob("Ref*.idf") epw = Path("../../tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw") idfs = pd.DataFrame({"file": files, "name": [file.basename() for file in files]}) # setup the runner. We'll use the DataFrame index as keys (k). rundict = { k: dict( eplus_file=str(file), prep_outputs=True, weather_file=str(epw), expandobjects=True, verbose="v", design_day=True, output_report="sql_file", ) for k, file in idfs.file.to_dict().items() }
def test_load_umi_template_fail(): with pytest.raises(ValueError): pu.config(umitemplate='../data/noneexistingfile.json') data_json = pu.settings.umitemplate load_umi_template(data_json)