Rename package

This commit is contained in:
Unknown 2020-11-02 10:42:25 -05:00
parent 6106d06025
commit b9fd44affd
62 changed files with 254 additions and 353 deletions

View File

@ -1,7 +1,7 @@
language: python language: python
env: env:
global: global:
- TRANSLATER_INTEGRATION=True ENERGYPLUS_VERSION=9.2.0 ENERGYPLUS_SHA=921312fa1d - TRNSLATOR_INTEGRATION=True ENERGYPLUS_VERSION=9.2.0 ENERGYPLUS_SHA=921312fa1d
ENERGYPLUS_INSTALL_VERSION=9-2-0 MINICONDA_VERSION=latest ENERGYPLUS_INSTALL_VERSION=9-2-0 MINICONDA_VERSION=latest
addons: addons:
apt: apt:
@ -12,7 +12,7 @@ jobs:
include: include:
- name: Python 3.8 on Xenial Linux - name: Python 3.8 on Xenial Linux
python: 3.8 # this works for Linux but is ignored on macOS or Windows python: 3.8 # this works for Linux but is ignored on macOS or Windows
script: pytest --cov=translater --verbose tests/ script: pytest --cov=trnslator --verbose tests/
after_success: after_success:
- coverage report -m - coverage report -m
- coveralls - coveralls
@ -20,11 +20,11 @@ jobs:
os: osx os: osx
osx_image: xcode11.2 osx_image: xcode11.2
language: objective-c language: objective-c
script: pytest --cov=translater --verbose tests/ script: pytest --cov=trnslator --verbose tests/
- name: "Python 3.8 on Windows" - name: "Python 3.8 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134 os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows language: shell # 'language: python' is an error on Travis CI Windows
script: pytest --cov=translater --verbose tests/ script: pytest --cov=trnslator --verbose tests/
- stage: deploy - stage: deploy
script: echo "Deploying to PyPi and GitHub releases ..." script: echo "Deploying to PyPi and GitHub releases ..."
deploy: deploy:
@ -34,7 +34,7 @@ jobs:
secure: Ys6dmv5j3DG8jelwyqkczfnr87kihTgV0bnNVnGrag/7Pnobory1L0zh9pUc02gOiZzNrPFMb0hBQ/kEfYwKVFobRTwsbOpPAJQD+doIaf2KTQ42yUK2zPW0SqpwJMcGF1BfkgRh9J1omsWlfU+D7Xf5q47ksyQtO7A8GGFyc2mk2/4uqH4f8MQLWpU8zyUmgCTbI7RplCQsaa3tySwi7Y8bBEZwWV5jleohOz0tOPc74dWRJi4r0maeCbWa64hp1W7lQq2ZjIc//66a9RnauIdNd9Z10APbIcWQnyB30j6tZKIbkgouzxZ3IrBlby6raxXbpfviH1hyXII/Ppfv65jJX2VPX/VU0tPqto/DTR8YZ1IbUrAD+Zndxt/ZsvsxhHw610/GKDrQBJkcEiVsKhzptYWrElvNTd2enJkFbIrb2r1u2+YzktsHJd9sEMlAqP72JHRdrvT3cPD1VRmqr61xRJBvnB6rJwwctEHtVKwunhTWEW+NA0Sdp/Qa8Ak1vGl1LBlqAbcDNdizt4DC+x4N6BtjAtrNrcw3kj3m8fIhaXNQeUapwOHMRVSzAtkBDGbU6jbkgTVVMmXNEuoAvReXAIFJe+tn8kemRMlY94vpRotfBSUOQEVETL0luMgIL8Zyl2FHLFxruDm9Ea1wJAUOldStbdVr/AvfoAXjM9k= secure: Ys6dmv5j3DG8jelwyqkczfnr87kihTgV0bnNVnGrag/7Pnobory1L0zh9pUc02gOiZzNrPFMb0hBQ/kEfYwKVFobRTwsbOpPAJQD+doIaf2KTQ42yUK2zPW0SqpwJMcGF1BfkgRh9J1omsWlfU+D7Xf5q47ksyQtO7A8GGFyc2mk2/4uqH4f8MQLWpU8zyUmgCTbI7RplCQsaa3tySwi7Y8bBEZwWV5jleohOz0tOPc74dWRJi4r0maeCbWa64hp1W7lQq2ZjIc//66a9RnauIdNd9Z10APbIcWQnyB30j6tZKIbkgouzxZ3IrBlby6raxXbpfviH1hyXII/Ppfv65jJX2VPX/VU0tPqto/DTR8YZ1IbUrAD+Zndxt/ZsvsxhHw610/GKDrQBJkcEiVsKhzptYWrElvNTd2enJkFbIrb2r1u2+YzktsHJd9sEMlAqP72JHRdrvT3cPD1VRmqr61xRJBvnB6rJwwctEHtVKwunhTWEW+NA0Sdp/Qa8Ak1vGl1LBlqAbcDNdizt4DC+x4N6BtjAtrNrcw3kj3m8fIhaXNQeUapwOHMRVSzAtkBDGbU6jbkgTVVMmXNEuoAvReXAIFJe+tn8kemRMlY94vpRotfBSUOQEVETL0luMgIL8Zyl2FHLFxruDm9Ea1wJAUOldStbdVr/AvfoAXjM9k=
on: on:
distributions: sdist bdist_wheel distributions: sdist bdist_wheel
repo: louisleroy5/translater repo: louisleroy5/trnslator
branch: master branch: master
tags: true tags: true
before_install: before_install:

View File

@ -1,17 +1,17 @@
Thank you for using *translater* and for considering contributing to it! Thank you for using *trnslator* and for considering contributing to it!
#### For errors in the code: #### For errors in the code:
- read the error message and [documentation](https://translater.readthedocs.io/); - read the error message and [documentation](https://trnslator.readthedocs.io/);
- search through the [open issues](https://github.com/louisleroy5/translater/issues?q=is%3Aopen+is%3Aissue) and [closed issues](https://github.com/louisleroy5/translater/issues?q=is%3Aissue+is%3Aclosed) first; - search through the [open issues](https://github.com/louisleroy5/trnslator/issues?q=is%3Aopen+is%3Aissue) and [closed issues](https://github.com/louisleroy5/trnslator/issues?q=is%3Aissue+is%3Aclosed) first;
- if the problem is with a dependency of this project, open an issue on the dependency's repo; - if the problem is with a dependency of this project, open an issue on the dependency's repo;
- if the problem is with *translater* and you can fix it simply, please submit a [PR](https://github.com/louisleroy5/translater/pulls); - if the problem is with *trnslator* and you can fix it simply, please submit a [PR](https://github.com/louisleroy5/trnslator/pulls);
- if the problem persists, please open an issue in the [issue tracker](https://github.com/louisleroy5/translater/issues) including a minimal working example to reproduce the problem. - if the problem persists, please open an issue in the [issue tracker](https://github.com/louisleroy5/trnslator/issues) including a minimal working example to reproduce the problem.
#### If you have a feature proposal or want to contribute #### If you have a feature proposal or want to contribute
- post your proposal on the [issue tracker](https://github.com/louisleroy5/translater/issues) so we can review it together (some proposals may not be a good fit for the project); - post your proposal on the [issue tracker](https://github.com/louisleroy5/trnslator/issues) so we can review it together (some proposals may not be a good fit for the project);
- fork the repo, make your change (adhering to translater's existing coding format, commenting, and docstring styles); - fork the repo, make your change (adhering to trnslator's existing coding format, commenting, and docstring styles);
- [test it](https://github.com/louisleroy5/translater/tree/develop/tests); - [test it](https://github.com/louisleroy5/trnslator/tree/develop/tests);
- format your code using [black](https://black.readthedocs.io/en/stable/) and submit a [PR](https://github.com/louisleroy5/translater/pulls); - format your code using [black](https://black.readthedocs.io/en/stable/) and submit a [PR](https://github.com/louisleroy5/trnslator/pulls);
- respond to code review. - respond to code review.

View File

@ -1,6 +1,6 @@
# package_data is a low-down, dirty lie. It is only used when building binary packages (python setup.py bdist ...) but # package_data is a low-down, dirty lie. It is only used when building binary packages (python setup.py bdist ...) but
# not when building source packages (python setup.py sdist ...) # not when building source packages (python setup.py sdist ...)
include translater/ressources/* include trnslator/ressources/*
include requirements.txt include requirements.txt
include requirements-dev.txt include requirements-dev.txt

View File

@ -4,7 +4,7 @@
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXOPTS = SPHINXOPTS =
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
SPHINXPROJ = translater SPHINXPROJ = trnslator
SOURCEDIR = ./docs SOURCEDIR = ./docs
BUILDDIR = _build BUILDDIR = _build

View File

@ -1,9 +1,9 @@
[![Build Status](https://travis-ci.com/louisleroy5/translater.svg?token=qpRnYhTVUeLJ5WM1w9Wx&branch=master)](https://travis-ci.com/louisleroy5/translater) [![Build Status](https://travis-ci.com/louisleroy5/trnslator.svg?token=qpRnYhTVUeLJ5WM1w9Wx&branch=master)](https://travis-ci.com/louisleroy5/trnslator)
[![Coverage Status](https://coveralls.io/repos/github/louisleroy5/translater/badge.svg?branch=develop&t=PLPFwA)](https://coveralls.io/github/louisleroy5/translater?branch=develop) [![Coverage Status](https://coveralls.io/repos/github/louisleroy5/trnslator/badge.svg?branch=develop&t=PLPFwA)](https://coveralls.io/github/louisleroy5/trnslator?branch=develop)
[![Documentation Status](https://readthedocs.org/projects/translater/badge/?version=latest)](https://translater.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/trnslator/badge/?version=latest)](https://trnslator.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
# Translater # Trnslator
**python for converting building simulation archetypes** **python for converting building simulation archetypes**
@ -11,7 +11,7 @@ Convert IDF file (EnergyPlus) to BUI file (TRNBuild)
## Overview ## Overview
** Translater** is a Python package that helps converting building archetypes. The public feature released in this ** Trnslator** is a Python package that helps converting building archetypes. The public feature released in this
version is the conversion of [EnergyPlus](https://energyplus.net) IDF models to Trnsys [TrnBuild](http://www.trnsys.com/features/suite-of-tools.php.html) Models (compatible with the multizone building model). For a list of features version is the conversion of [EnergyPlus](https://energyplus.net) IDF models to Trnsys [TrnBuild](http://www.trnsys.com/features/suite-of-tools.php.html) Models (compatible with the multizone building model). For a list of features
currently in development see the [In development](#in-development) section. currently in development see the [In development](#in-development) section.

View File

@ -1,5 +1,5 @@
*********************************************************** ***********************************************************
* TRNsIDF.EXE - translater from IDF created by Trnsys3d to B18 * TRNsIDF.EXE - trnslator from IDF created by Trnsys3d to B18
*********************************************************** ***********************************************************
This program sorts and renumbers the IDF file and writes This program sorts and renumbers the IDF file and writes
a B18 file based on the geometric information of the IDF file and a B18 file based on the geometric information of the IDF file and

View File

@ -1,15 +1,15 @@
Caching Caching
======= =======
Translater features a caching api aimed at accelerating reproducible workflows using EnergyPlus simulations by reducing Trnslator features a caching api aimed at accelerating reproducible workflows using EnergyPlus simulations by reducing
unnecessary calls to the EnergyPlus executable or transitioning programs. Concretely, caching an IDF model means that, unnecessary calls to the EnergyPlus executable or transitioning programs. Concretely, caching an IDF model means that,
for instance, if an older version model (less than 9.2) is ran, translater will transition a copy of that file to for instance, if an older version model (less than 9.2) is ran, trnslator will transition a copy of that file to
version 9.2 (making a copy beforehand) and run the simulation with the matching EnergyPlus executable. The next time the version 9.2 (making a copy beforehand) and run the simulation with the matching EnergyPlus executable. The next time the
:func:`translater.idfclass.run_eplus` or the :func:`translater.idfclass.load_idf` method is called, the cached :func:`trnslator.idfclass.run_eplus` or the :func:`trnslator.idfclass.load_idf` method is called, the cached
(transitioned) file will be readily available and used; This helps to save time especially with reproducible workflows (transitioned) file will be readily available and used; This helps to save time especially with reproducible workflows
since transitioning files can take a while to complete. since transitioning files can take a while to complete.
As for simulation results, after :func:`translater.idfclass run_eplus` is called, the EnergyPlus outputs (.csv, sqlite, As for simulation results, after :func:`trnslator.idfclass run_eplus` is called, the EnergyPlus outputs (.csv, sqlite,
mtd, .mdd, etc.) are cached in a folder structure than is identified according to the simulation parameters; those mtd, .mdd, etc.) are cached in a folder structure than is identified according to the simulation parameters; those
parameters include the content of the IDF file itself (if the file has changed, a new simulation is required), whether parameters include the content of the IDF file itself (if the file has changed, a new simulation is required), whether
an annual or design day simulation is executed, etc. This means that if run_eplus is called a second time (let us say an annual or design day simulation is executed, etc. This means that if run_eplus is called a second time (let us say
@ -21,14 +21,14 @@ example. First, caching is enabled using the `config` method:
Enabling caching Enabling caching
---------------- ----------------
Caching is enabled by passing the `use_cache=True` attribute to the :func:`translater.utils.config` method. The Caching is enabled by passing the `use_cache=True` attribute to the :func:`trnslator.utils.config` method. The
configuration of translater settings are not persistent and must be called whenever a python session is started. It is configuration of trnslator settings are not persistent and must be called whenever a python session is started. It is
recommended to put the `config` method at the beginning of a script or in the first cells of a Jupyter Notebook recommended to put the `config` method at the beginning of a script or in the first cells of a Jupyter Notebook
(after the import statements). (after the import statements).
.. code-block:: python .. code-block:: python
import translater as tr import trnslator as tr
tr.config(use_cache=True, log_console=True) tr.config(use_cache=True, log_console=True)
Example Example
@ -49,7 +49,7 @@ In a Jupyter Notebook, one would typically do the following:
prep_outputs=True, prep_outputs=True,
) )
Since the file is a version 8.0 IDF file, translater is going to transition the file to EnergyPlus 9.2 (or any other Since the file is a version 8.0 IDF file, trnslator is going to transition the file to EnergyPlus 9.2 (or any other
version specified with the ep_version parameter) and execute EnergyPlus for the `design_day` only. version specified with the ep_version parameter) and execute EnergyPlus for the `design_day` only.
The command above yields a list of output files thanks to the `return_files=True` parameter. These will be located The command above yields a list of output files thanks to the `return_files=True` parameter. These will be located
@ -58,7 +58,7 @@ method).
.. code-block:: python .. code-block:: python
[None, <translater.idfclass.IDF at 0x10fb9f4a8>, [None, <trnslator.idfclass.IDF at 0x10fb9f4a8>,
[Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/d04795a50b4ff172da72fec54c6991e4tbl.csv'), [Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/d04795a50b4ff172da72fec54c6991e4tbl.csv'),
Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/d04795a50b4ff172da72fec54c6991e4out.end'), Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/d04795a50b4ff172da72fec54c6991e4out.end'),
Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/AdultEducationCenter.idf'), Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/d04795a50b4ff172da72fec54c6991e4/AdultEducationCenter.idf'),
@ -96,7 +96,7 @@ annual simulation results (which do not exist yet).
prep_outputs=True, prep_outputs=True,
) )
Now, since the original IDF file (the version 8.9 one) has not changed, translater is going to look for the transitioned Now, since the original IDF file (the version 8.9 one) has not changed, trnslator is going to look for the transitioned
file that resides in the cache folder and use that one instead of retransitioning the original file a second time. On file that resides in the cache folder and use that one instead of retransitioning the original file a second time. On
the other hand, since the parameters of run_eplus have changed (annual instead of design_day), it is going to execute the other hand, since the parameters of run_eplus have changed (annual instead of design_day), it is going to execute
EnergyPlus using the annual method and return the annual results (see that the second-level folder id has changed from EnergyPlus using the annual method and return the annual results (see that the second-level folder id has changed from
@ -104,7 +104,7 @@ d04795a50b4ff172da72fec54c6991e4 to 9efc05f6e6cde990685b8ef61e326d94; *these ids
.. code-block:: python .. code-block:: python
[None, <translater.idfclass.IDF at 0x1a2c7e0128>, [None, <trnslator.idfclass.IDF at 0x1a2c7e0128>,
[Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/AdultEducationCenter.idf'), [Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/AdultEducationCenter.idf'),
Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/9efc05f6e6cde990685b8ef61e326d94out.mdd'), Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/9efc05f6e6cde990685b8ef61e326d94out.mdd'),
Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/9efc05f6e6cde990685b8ef61e326d94out.shd'), Path('cache/e8f4fb7e50ecaaf2cf2c9d4e4d159605/9efc05f6e6cde990685b8ef61e326d94/9efc05f6e6cde990685b8ef61e326d94out.shd'),

View File

@ -2,14 +2,14 @@
Command reference Command reference
================= =================
Translater provides many commands for managing packages and environments. Trnslator provides many commands for managing packages and environments.
The links on this page provide help for each command. The links on this page provide help for each command.
You can also access help from the command line with the You can also access help from the command line with the
``--help`` flag: ``--help`` flag:
.. code-block:: bash .. code-block:: bash
translater --help trnslator --help
.. include:: commands/convert.rst .. include:: commands/convert.rst

View File

@ -1,5 +1,5 @@
.. click:: translater:convert .. click:: trnslator:convert
:prog: translater convert :prog: trnslator convert
:show-nested: :show-nested:

View File

@ -1,5 +1,5 @@
.. click:: translater:transition .. click:: trnslator:transition
:prog: translater transition :prog: trnslator transition
:show-nested: :show-nested:

View File

@ -17,18 +17,18 @@ import sys
import datetime import datetime
sys.path.insert(0, os.path.abspath(".")) sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("translater")) sys.path.insert(0, os.path.abspath("trnslator"))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = "translater" project = "trnslator"
copyright = "{}, Samuel Letellier-Duchesne & Louis Leroy".format(datetime.datetime.now().year) copyright = "{}, Samuel Letellier-Duchesne & Louis Leroy".format(datetime.datetime.now().year)
author = "Samuel Letellier-Duchesne & Louis Leroy" author = "Samuel Letellier-Duchesne & Louis Leroy"
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
import translater import trnslator
version = release = translater.__version__ version = release = trnslator.__version__
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
@ -125,7 +125,7 @@ def setup(app):
# -- Options for HTMLHelp output --------------------------------------------- # -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = "translaterdoc" htmlhelp_basename = "trnslatordoc"
# -- Options for LaTeX output ------------------------------------------------ # -- Options for LaTeX output ------------------------------------------------
@ -150,8 +150,8 @@ latex_elements = {
latex_documents = [ latex_documents = [
( (
master_doc, master_doc,
"translater.tex", "trnslator.tex",
"translater Documentation", "trnslator Documentation",
"Samuel Letellier-Duchesne & Louis Leroy", "Samuel Letellier-Duchesne & Louis Leroy",
"manual", "manual",
) )
@ -161,7 +161,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "translater", "translater Documentation", [author], 1)] man_pages = [(master_doc, "trnslator", "trnslator Documentation", [author], 1)]
# -- Options for Texinfo output ---------------------------------------------- # -- Options for Texinfo output ----------------------------------------------
@ -171,10 +171,10 @@ man_pages = [(master_doc, "translater", "translater Documentation", [author], 1)
texinfo_documents = [ texinfo_documents = [
( (
master_doc, master_doc,
"translater", "trnslator",
"translater Documentation", "trnslator Documentation",
author, author,
"translater", "trnslator",
"One line description of project.", "One line description of project.",
"Miscellaneous", "Miscellaneous",
) )

View File

@ -70,7 +70,7 @@ Then simply run the following command:
.. code-block:: python .. code-block:: python
translater convert [OPTIONS] IDF_FILE WEATHER_FILE OUTPUT_FOLDER trnslator convert [OPTIONS] IDF_FILE WEATHER_FILE OUTPUT_FOLDER
1. ``IDF_FILE`` is the file path of the IDF file to convert. If there are space characters in the path, it should be 1. ``IDF_FILE`` is the file path of the IDF file to convert. If there are space characters in the path, it should be
enclosed in quotation marks. enclosed in quotation marks.
@ -87,7 +87,7 @@ respectively.
.. code-block:: python .. code-block:: python
translater convert "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
4. `OPTIONS`: There are different options to the `convert` command. The first 3 manage the requested output files. 4. `OPTIONS`: There are different options to the `convert` command. The first 3 manage the requested output files.
Users can chose to return a combination of flags Users can chose to return a combination of flags
@ -99,7 +99,7 @@ Users can chose to return a combination of flags
.. code-block:: python .. code-block:: python
translater convert -i -t -d "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert -i -t -d "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--window_lib`` is the path of the window library (W74-lib.dat). This library must be in the same format as the - ``--window_lib`` is the path of the window library (W74-lib.dat). This library must be in the same format as the
Berkeley Lab library used by default in TRNBuild. If nothing is passed, the "W74-lib.dat" file available in the Berkeley Lab library used by default in TRNBuild. If nothing is passed, the "W74-lib.dat" file available in the
@ -107,7 +107,7 @@ Users can chose to return a combination of flags
.. code-block:: python .. code-block:: python
translater convert --window_lib "/Users/Documents/W74-lib.dat" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --window_lib "/Users/Documents/W74-lib.dat" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--trnsidf_exe`` is the path of the trnsidf.exe executable. Usually located in the TRNSYS18 folder under - ``--trnsidf_exe`` is the path of the trnsidf.exe executable. Usually located in the TRNSYS18 folder under
"Building/trnsIDF/trnsidf.exe". "Building/trnsIDF/trnsidf.exe".
@ -115,34 +115,34 @@ Users can chose to return a combination of flags
.. code-block:: python .. code-block:: python
translater convert --trnsidf_exe "C:TRNSYS18\\Building\\trnsIDF\\trnsidf.exe" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --trnsidf_exe "C:TRNSYS18\\Building\\trnsIDF\\trnsidf.exe" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--template`` is the path of the .d18 template file (usually in the same directory as the `trnsidf.exe` executable). - ``--template`` is the path of the .d18 template file (usually in the same directory as the `trnsidf.exe` executable).
If nothing is passed, the following path will be used : "C:TRNSYS18\\Building\\trnsIDF\\NewFileTemplate.d18". If nothing is passed, the following path will be used : "C:TRNSYS18\\Building\\trnsIDF\\NewFileTemplate.d18".
.. code-block:: python .. code-block:: python
translater convert --template "C:TRNSYS18\\Building\\trnsIDF\\NewFileTemplate.d18" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --template "C:TRNSYS18\\Building\\trnsIDF\\NewFileTemplate.d18" "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--log_clear_names`` if added, do not print log of "clear_names" (equivalence between old and new names) in - ``--log_clear_names`` if added, do not print log of "clear_names" (equivalence between old and new names) in
the console. the console.
.. code-block:: python .. code-block:: python
translater convert --log_clear_names "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --log_clear_names "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--window`` specifies the window properties <u_value (W/m²-K)> <shgc (-)> <t_vis (-)> <tolerance (-)> <fframe (-)> <uframe (kJ/m²-K-h)>. - ``--window`` specifies the window properties <u_value (W/m²-K)> <shgc (-)> <t_vis (-)> <tolerance (-)> <fframe (-)> <uframe (kJ/m²-K-h)>.
If nothing is passed, the following values will be used : 2.2 0.65 0.8 0.05 0.15 8.17 If nothing is passed, the following values will be used : 2.2 0.65 0.8 0.05 0.15 8.17
.. code-block:: python .. code-block:: python
translater convert --window 2.2 0.65 0.8 0.05 0.15 8.17 "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --window 2.2 0.65 0.8 0.05 0.15 8.17 "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``--ordered`` sorts the idf object names - ``--ordered`` sorts the idf object names
.. code-block:: python .. code-block:: python
translater convert --ordered "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --ordered "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- If ``--nonum`` is added, do not renumber surfaces in BUI. If ``--batchjob`` or ``-N`` is added, does BatchJob Modus when running trnsidf.exe. - If ``--nonum`` is added, do not renumber surfaces in BUI. If ``--batchjob`` or ``-N`` is added, does BatchJob Modus when running trnsidf.exe.
``--geofloor`` must be followed by a float between 0 and 1, and generates GEOSURF values for distributing direct solar radiation where `geo_floor` % is directed to the floor, ``--geofloor`` must be followed by a float between 0 and 1, and generates GEOSURF values for distributing direct solar radiation where `geo_floor` % is directed to the floor,
@ -151,13 +151,13 @@ Users can chose to return a combination of flags
.. code-block:: python .. code-block:: python
translater convert --nonum -N --geofloor 0.6 --refarea --volume --capacitance "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP" trnslator convert --nonum -N --geofloor 0.6 --refarea --volume --capacitance "/Users/Documents/NECB 2011 - Warehouse.idf" "/Users/Documents/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "/Users/Documents/WIP"
- ``-h`` Shows the "help" message - ``-h`` Shows the "help" message
.. code-block:: python .. code-block:: python
translater convert -h trnslator convert -h
.. [#] Archetype: building model representing a type of building based on its geometry, thermal properties and its .. [#] Archetype: building model representing a type of building based on its geometry, thermal properties and its
usage. Usually used to create urban building model by assigning different archetypes to represent at best the usage. Usually used to create urban building model by assigning different archetypes to represent at best the

View File

@ -1,7 +1,7 @@
Converting IDF models Converting IDF models
===================== =====================
EnergyPlus models can be converted to two different other formats using `translater`. TRNSYS users can convert IDF EnergyPlus models can be converted to two different other formats using `trnslator`. TRNSYS users can convert IDF
files to TRNBuild/Type56 files. files to TRNBuild/Type56 files.
.. include:: converter_bui.rst .. include:: converter_bui.rst

View File

@ -1,7 +1,7 @@
import pandas as pd import pandas as pd
from path import Path from path import Path
from translater import config, run_eplus, parallel_process from trnslator import config, run_eplus, parallel_process
config(cache_folder="../../tests/.temp/cache", use_cache=True, log_console=True) config(cache_folder="../../tests/.temp/cache", use_cache=True, log_console=True)

View File

@ -3,11 +3,11 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
translater |version| trnslator |version|
==================== ====================
`translater` is a Python package designed with the objective of helping building energy modelers and researchers `trnslator` is a Python package designed with the objective of helping building energy modelers and researchers
maintain collections of building archetypes. `translater` depends on `eppy`_ for EnergyPlus models and makes use of maintain collections of building archetypes. `trnslator` depends on `eppy`_ for EnergyPlus models and makes use of
great packages such as `pandas`_ for data structure processing and `tsam`_ for time series aggregation. great packages such as `pandas`_ for data structure processing and `tsam`_ for time series aggregation.
.. _eppy: https://eppy.readthedocs.io/ .. _eppy: https://eppy.readthedocs.io/
@ -18,10 +18,10 @@ Description
=========== ===========
As building energy modelers ourselves, we found it was sometimes difficult to use scripting language to retrieve, As building energy modelers ourselves, we found it was sometimes difficult to use scripting language to retrieve,
modify, simulate and analyze Building Energy Models (BEM). This is why `translater` was created. We built a package modify, simulate and analyze Building Energy Models (BEM). This is why `trnslator` was created. We built a package
able to an EnergyPlus file to `TRNBuild <http://sel.me.wisc.edu/trnsys/index.html>`_ models (shout out to TRNSYS users!) able to an EnergyPlus file to `TRNBuild <http://sel.me.wisc.edu/trnsys/index.html>`_ models (shout out to TRNSYS users!)
`translater` also features a :ref:`Command Line Interface (CLI)<Command reference>` which means that users can execute `trnslator` also features a :ref:`Command Line Interface (CLI)<Command reference>` which means that users can execute
commands in the terminal instead of writing a python script. In addition, we believe reproducible research through commands in the terminal instead of writing a python script. In addition, we believe reproducible research through
Jupyter Notebooks, for instance, is the way foreword. Therefore, all the modules are discoverable and can be imported Jupyter Notebooks, for instance, is the way foreword. Therefore, all the modules are discoverable and can be imported
independently. independently.

View File

@ -42,7 +42,7 @@ in case). You should see something like this:
.. code-block:: doscon .. code-block:: doscon
C:\Users\translater>conda list C:\Users\trnslator>conda list
# packages in environment at C:\ProgramData\Miniconda3: # packages in environment at C:\ProgramData\Miniconda3:
# #
# Name Version Build Channel # Name Version Build Channel
@ -57,7 +57,7 @@ in case). You should see something like this:
Install EnergyPlus & Conversion Programs Install EnergyPlus & Conversion Programs
........................................ ........................................
EnergyPlus is a prerequisite of translater. It must be installed beforehand. Moreover, translater contains routines that EnergyPlus is a prerequisite of trnslator. It must be installed beforehand. Moreover, trnslator contains routines that
may download IDF components that are coded in earlier versions of EnergyPlus (e.g., 7.1). For this reason, users should may download IDF components that are coded in earlier versions of EnergyPlus (e.g., 7.1). For this reason, users should
also download the `supplementary conversion programs`_, and install the content in the EnergyPlus installation folder: also download the `supplementary conversion programs`_, and install the content in the EnergyPlus installation folder:
@ -79,7 +79,7 @@ Copy the whole code block below in Command Prompt and Hit :guilabel:`&Enter:⏎`
cd aef233396167e0f961df3d62a193573e cd aef233396167e0f961df3d62a193573e
install_eplus_script.cmd install_eplus_script.cmd
To install *translater*, follow the steps detailed below in `Installing using pip`_ To install *trnslator*, follow the steps detailed below in `Installing using pip`_
Installing using ``pip`` Installing using ``pip``
------------------------ ------------------------
@ -89,25 +89,25 @@ highly recommended), then simply install using the following command in the term
.. code-block:: shell .. code-block:: shell
pip install translater pip install trnslator
.. hint:: .. hint::
If you encounter an issue during the installation of translater using ``pip``, you can try If you encounter an issue during the installation of trnslator using ``pip``, you can try
out `Installing using conda (Anaconda)`_ instead. out `Installing using conda (Anaconda)`_ instead.
Installation within a Virtual Environment Installation within a Virtual Environment
----------------------------------------- -----------------------------------------
It is highly recommended to use/install *translater* on a fresh python virtual environment. If you have any trouble It is highly recommended to use/install *trnslator* on a fresh python virtual environment. If you have any trouble
with the installation above, try installing translater in a new, clean `virtual environment`_ using venv or conda. Note with the installation above, try installing trnslator in a new, clean `virtual environment`_ using venv or conda. Note
that this pacakge was tested with python 3.6: that this pacakge was tested with python 3.6:
.. code-block:: shell .. code-block:: shell
python3 -m venv translater python3 -m venv trnslator
source translater/bin/activate source trnslator/bin/activate
Activating the virtual environment will change your shells prompt to show what virtual environment youre using, and Activating the virtual environment will change your shells prompt to show what virtual environment youre using, and
modify the environment so that running python will get you that particular version and installation of Python. For modify the environment so that running python will get you that particular version and installation of Python. For
@ -115,33 +115,33 @@ example:
.. code-block:: shell .. code-block:: shell
$ source translater/bin/activate $ source trnslator/bin/activate
(translater) $ python (trnslator) $ python
Python 3.5.1 (default, May 6 2016, 10:59:36) Python 3.5.1 (default, May 6 2016, 10:59:36)
... ...
>>> import sys >>> import sys
>>> sys.path >>> sys.path
['', '/usr/local/lib/python35.zip', ..., ['', '/usr/local/lib/python35.zip', ...,
'~/envs/translater/lib/python3.5/site-packages'] '~/envs/trnslator/lib/python3.5/site-packages']
>>> >>>
Then you can install translater in this freshly created environment: Then you can install trnslator in this freshly created environment:
.. code-block:: shell .. code-block:: shell
pip install translater pip install trnslator
To use the new environment inside a `jupyter notebook`_, we recommend using the steps described by `Angelo To use the new environment inside a `jupyter notebook`_, we recommend using the steps described by `Angelo
Basile`_: Basile`_:
.. code-block:: shell .. code-block:: shell
source translater/bin/activate source trnslator/bin/activate
pip install ipykernel pip install ipykernel
ipython kernel install --user --name=translater ipython kernel install --user --name=trnslator
Next time you `start a jupyter notebook`_, you will have the option to choose the *kernel* corresponding to your Next time you `start a jupyter notebook`_, you will have the option to choose the *kernel* corresponding to your
project, *translater* in this case. project, *trnslator* in this case.
.. figure:: images/20181211121922.png .. figure:: images/20181211121922.png
:alt: choosing the correct kernel in a jupyter notebook :alt: choosing the correct kernel in a jupyter notebook
@ -150,7 +150,7 @@ project, *translater* in this case.
choosing the correct kernel in a jupyter notebook. choosing the correct kernel in a jupyter notebook.
In the *kernel* menu, select *Change Kernel* In the *kernel* menu, select *Change Kernel*
and select the appropriate virtual env created earlier (*translater* in this case). and select the appropriate virtual env created earlier (*trnslator* in this case).
Installing using ``conda`` (Anaconda) Installing using ``conda`` (Anaconda)
@ -158,9 +158,9 @@ Installing using ``conda`` (Anaconda)
.. hint:: .. hint::
If you encounter package dependency errors while installing `translater` using pip, you can use conda instead. If you encounter package dependency errors while installing `trnslator` using pip, you can use conda instead.
Installing with conda is similar to pip. The following workflow creates a new virtual environment (named translater) Installing with conda is similar to pip. The following workflow creates a new virtual environment (named trnslator)
which contains the required dependencies. It then installs the package using pip. You will need to download the which contains the required dependencies. It then installs the package using pip. You will need to download the
`environment.yml`_ file from the github repository. For the following code to work, first change the working `environment.yml`_ file from the github repository. For the following code to work, first change the working
directory to the location of the downloaded `environment.yml` file. Here we use the `conda env update` method which directory to the location of the downloaded `environment.yml` file. Here we use the `conda env update` method which
@ -169,9 +169,9 @@ will work well to create a new environment using a specific dependency file in o
.. code-block:: shell .. code-block:: shell
conda update -n base conda conda update -n base conda
conda env update -n translater -f environment.yml conda env update -n trnslator -f environment.yml
conda activate translater conda activate trnslator
pip install translater pip install trnslator
.. _start a jupyter notebook: https://jupyter.readthedocs.io/en/latest/running.html#starting-the-notebook-server .. _start a jupyter notebook: https://jupyter.readthedocs.io/en/latest/running.html#starting-the-notebook-server
.. _jupyter notebook: https://jupyter-notebook.readthedocs.io/en/stable/# .. _jupyter notebook: https://jupyter-notebook.readthedocs.io/en/stable/#
@ -182,4 +182,4 @@ will work well to create a new environment using a specific dependency file in o
.. _download: https://github.com/NREL/EnergyPlus/releases/tag/v9.2.0 .. _download: https://github.com/NREL/EnergyPlus/releases/tag/v9.2.0
.. _supplementary conversion programs: http://energyplus.helpserve.com/Knowledgebase/List/Index/46/converting-older-version-files .. _supplementary conversion programs: http://energyplus.helpserve.com/Knowledgebase/List/Index/46/converting-older-version-files
.. _script: https://gist.github.com/samuelduchesne/aef233396167e0f961df3d62a193573e .. _script: https://gist.github.com/samuelduchesne/aef233396167e0f961df3d62a193573e
.. _environment.yml: https://github.com/louisleroy5/translater/blob/master/environment.yml .. _environment.yml: https://github.com/louisleroy5/trnslator/blob/master/environment.yml

View File

@ -4,7 +4,7 @@ Modules
IDF Class IDF Class
--------- ---------
.. currentmodule:: translater.idfclass .. currentmodule:: trnslator.idfclass
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -22,7 +22,7 @@ IDF Class
Schedule Module Schedule Module
--------------- ---------------
.. currentmodule:: translater.schedule .. currentmodule:: trnslator.schedule
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -35,7 +35,7 @@ Schedule Module
EnergyDataFrame EnergyDataFrame
--------------- ---------------
.. currentmodule:: translater.energydataframe .. currentmodule:: trnslator.energydataframe
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -50,7 +50,7 @@ EnergyDataFrame
EnergySeries EnergySeries
------------ ------------
.. currentmodule:: translater.energyseries .. currentmodule:: trnslator.energyseries
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -85,7 +85,7 @@ EnergySeries
Report Data Report Data
----------- -----------
.. currentmodule:: translater.reportdata .. currentmodule:: trnslator.reportdata
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -103,7 +103,7 @@ Report Data
IDF to BUI module IDF to BUI module
----------------- -----------------
.. currentmodule:: translater.trnsys .. currentmodule:: trnslator.trnsys
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst
@ -124,7 +124,7 @@ IDF to BUI module
Utils Utils
----- -----
.. currentmodule:: translater.utils .. currentmodule:: trnslator.utils
.. autosummary:: .. autosummary::
:template: autosummary.rst :template: autosummary.rst

View File

@ -1,16 +1,16 @@
Reading and running IDF files Reading and running IDF files
============================= =============================
`translater` is packed up with some built-in workflows to read, edit and run EnergyPlus files. `trnslator` is packed up with some built-in workflows to read, edit and run EnergyPlus files.
Reading Reading
------- -------
To read an IDF file, simply call :meth:`~translater.idfclass.load_idf` with the path name. For example: To read an IDF file, simply call :meth:`~trnslator.idfclass.load_idf` with the path name. For example:
.. code-block:: python .. code-block:: python
>>> from translater import get_eplus_dirs, load_idf >>> from trnslator import get_eplus_dirs, load_idf
>>> eplus_dir = get_eplus_dirs("9-2-0") # Getting EnergyPlus install path >>> eplus_dir = get_eplus_dirs("9-2-0") # Getting EnergyPlus install path
>>> eplus_file = eplus_dir / "ExampleFiles" / "BasicsFiles" / "AdultEducationCenter.idf" # Model path >>> eplus_file = eplus_dir / "ExampleFiles" / "BasicsFiles" / "AdultEducationCenter.idf" # Model path
>>> idf = load_idf(eplus_file) # IDF load >>> idf = load_idf(eplus_file) # IDF load
@ -25,35 +25,35 @@ You can optionally pass the weather file path as well:
Editing Editing
------- -------
Editing IDF files is based on the :ref:`eppy` package. The :class:`~translater.idfclass.IDF` object returned by Editing IDF files is based on the :ref:`eppy` package. The :class:`~trnslator.idfclass.IDF` object returned by
:meth:`~translater.idfclass.load_idf` exposes the EnergyPlus objects that make up the IDF file. These objects can be :meth:`~trnslator.idfclass.load_idf` exposes the EnergyPlus objects that make up the IDF file. These objects can be
edited and new objects can be created. See the `eppy documentation <https://eppy.readthedocs.io/en/latest/>`_ for edited and new objects can be created. See the `eppy documentation <https://eppy.readthedocs.io/en/latest/>`_ for
more information on how to edit IDF files. more information on how to edit IDF files.
.. hint:: Pre-sets .. hint:: Pre-sets
EnergyPlus outputs can be quickly defined using the :class:`translater.idfclass.OutputPrep` class. This class EnergyPlus outputs can be quickly defined using the :class:`trnslator.idfclass.OutputPrep` class. This class
and its methods handle adding predefined or custom outputs to an IDF object. For example, the and its methods handle adding predefined or custom outputs to an IDF object. For example, the
idf object created above can be modified by adding a basic set of outputs: idf object created above can be modified by adding a basic set of outputs:
.. code-block:: python .. code-block:: python
>>> from translater import OutputPrep >>> from trnslator import OutputPrep
>>> OutputPrep(idf=idf, save=True).add_basics() >>> OutputPrep(idf=idf, save=True).add_basics()
See :class:`~translater.idfclass.OutputPrep` for more details on all possible methods. See :class:`~trnslator.idfclass.OutputPrep` for more details on all possible methods.
Running Running
------- -------
Running an EnerguPlus file can be done in two ways. The first way is to call the :meth:`translater.idfclass.run_eplus` Running an EnerguPlus file can be done in two ways. The first way is to call the :meth:`trnslator.idfclass.run_eplus`
function with the path of the IDF file and the path of the weather file. The second method is to call the function with the path of the IDF file and the path of the weather file. The second method is to call the
:meth:`~translater.idfclass.IDF.run_eplus` method on an :class:`~translater.idfclass.IDF` object that has been :meth:`~trnslator.idfclass.IDF.run_eplus` method on an :class:`~trnslator.idfclass.IDF` object that has been
previously read. In both cases, users can also specify run options as well as output options. For example, instead of previously read. In both cases, users can also specify run options as well as output options. For example, instead of
creating an OutputPrep object, one can specify custom outputs in the creating an OutputPrep object, one can specify custom outputs in the
:py:attr:`translater.idfclass.run_eplus.prep_outputs` attribute. These outputs will be appended to the IDF file before :py:attr:`trnslator.idfclass.run_eplus.prep_outputs` attribute. These outputs will be appended to the IDF file before
the simulation is run. See :meth:`~translater.idfclass.run_eplus` for other parameters to pass to `run_eplus`. the simulation is run. See :meth:`~trnslator.idfclass.run_eplus` for other parameters to pass to `run_eplus`.
For the same IDF object above, the following: For the same IDF object above, the following:
@ -65,21 +65,21 @@ is equivalent to:
.. code-block:: python .. code-block:: python
>>> from translater import run_eplus >>> from trnslator import run_eplus
>>> run_eplus(eplus_file, weather) >>> run_eplus(eplus_file, weather)
.. hint:: Caching system. .. hint:: Caching system.
When running EnergyPlus simulations, a caching system can be activated to reduce the number of calls to the When running EnergyPlus simulations, a caching system can be activated to reduce the number of calls to the
EnergyPlus executable. This can be helpful when `translater` is called many times. This caching system will save EnergyPlus executable. This can be helpful when `trnslator` is called many times. This caching system will save
simulation results in a folder identified by a unique identifier. This identifier is based on the content of the IDF simulation results in a folder identified by a unique identifier. This identifier is based on the content of the IDF
file, as well as the various :meth:`~translater.idfclass.run_eplus` options. If caching is activated, then file, as well as the various :meth:`~trnslator.idfclass.run_eplus` options. If caching is activated, then
subsequent calls to the :meth:`~translater.idfclass.run_eplus` method will return the cached results. subsequent calls to the :meth:`~trnslator.idfclass.run_eplus` method will return the cached results.
The caching system is activated by calling the :meth:`translater.utils.config` method, which can also be used to The caching system is activated by calling the :meth:`trnslator.utils.config` method, which can also be used to
set a series of package-wide options. ``config`` would typically be put at the top of a python script: set a series of package-wide options. ``config`` would typically be put at the top of a python script:
.. code-block:: python .. code-block:: python
>>> from translater import config >>> from trnslator import config
>>> config(use_cache=True) >>> config(use_cache=True)

View File

@ -6,7 +6,7 @@ MacOs Catalina Compatibility
With the release of MacOs Catalina, Apple requires apps to be signed and/or notarized. This helps users make sure they With the release of MacOs Catalina, Apple requires apps to be signed and/or notarized. This helps users make sure they
open apps from trusted developers. It appears that the transition files that are needed to upgrade older IDF files to open apps from trusted developers. It appears that the transition files that are needed to upgrade older IDF files to
the latest version of EnergyPlus are not signed. Thus, users using translater on the MacOs platform might encounter an the latest version of EnergyPlus are not signed. Thus, users using trnslator on the MacOs platform might encounter an
error of this type: "Transition cannot be opened because the developer cannot be verified". (see `Missing transition error of this type: "Transition cannot be opened because the developer cannot be verified". (see `Missing transition
programs`_ for more details on downloading and installing older transition programs). programs`_ for more details on downloading and installing older transition programs).

View File

@ -1,20 +1,20 @@
Running multiple files Running multiple files
====================== ======================
Running multiple IDF files is easily achieved by using the :meth:`~translater.utils.parallel_process` method. Running multiple IDF files is easily achieved by using the :meth:`~trnslator.utils.parallel_process` method.
.. hint:: .. hint::
The :meth:`~translater.utils.parallel_process` method works with any method. You can use it to parallelize The :meth:`~trnslator.utils.parallel_process` method works with any method. You can use it to parallelize
other functions in your script. other functions in your script.
To create a parallel run, first import the usual pacakge methods and configure `translater` to use caching and to To create a parallel run, first import the usual pacakge methods and configure `trnslator` to use caching and to
show logs in the console. show logs in the console.
.. code-block:: python .. code-block:: python
>>> from path import Path >>> from path import Path
>>> from translater import load_idf, config, run_eplus, settings, parallel_process >>> from trnslator import load_idf, config, run_eplus, settings, parallel_process
>>> import pandas as pd >>> import pandas as pd
>>> config(use_cache=True, log_console=True) >>> config(use_cache=True, log_console=True)
@ -22,8 +22,8 @@ Then, use
.. code-block:: python .. code-block:: python
>>> from translater import load_idf, config, run_eplus, settings >>> from trnslator import load_idf, config, run_eplus, settings
>>> from translater import parallel_process >>> from trnslator import parallel_process
>>> import pandas as pd >>> import pandas as pd
>>> config(use_cache=True, log_console=True) >>> config(use_cache=True, log_console=True)
@ -42,8 +42,8 @@ For good measure, load the files in a DataFrame, which we will use to create the
>>> idfs = pd.DataFrame({"file": files, "name": [file.basename() for file in files]}) >>> idfs = pd.DataFrame({"file": files, "name": [file.basename() for file in files]})
The rundict, is the list of tasks we wish to do in parallel. This dictionary is passed to :meth:`~translater.idfclass The rundict, is the list of tasks we wish to do in parallel. This dictionary is passed to :meth:`~trnslator.idfclass
.parallel_process`. Here, we want to execute :meth:`~translater.idfclass.run_eplus` with the following parameters: .parallel_process`. Here, we want to execute :meth:`~trnslator.idfclass.run_eplus` with the following parameters:
.. code-block:: python .. code-block:: python
@ -60,8 +60,8 @@ The rundict, is the list of tasks we wish to do in parallel. This dictionary is
for k, file in idfs.file.to_dict().items() for k, file in idfs.file.to_dict().items()
} }
Finally, execute :meth:`~translater.utils.parallel_process`. The resulting sql_file paths, which we defined as the Finally, execute :meth:`~trnslator.utils.parallel_process`. The resulting sql_file paths, which we defined as the
type of output_report attribute for :meth:`~translater.idfclass.run_eplus` is returned as a dictionary with the same type of output_report attribute for :meth:`~trnslator.idfclass.run_eplus` is returned as a dictionary with the same
keys as the index of the DataFrame. keys as the index of the DataFrame.
.. code-block:: python .. code-block:: python

View File

@ -1,17 +1,17 @@
Schedules Schedules
========= =========
`translater` can parse EnergyPlus schedules. In EnergyPlus, there are many ways to define schedules in an IDF file. The `trnslator` can parse EnergyPlus schedules. In EnergyPlus, there are many ways to define schedules in an IDF file. The
Schedule module defines a class that handles parsing, plotting converting schedules. Schedule module defines a class that handles parsing, plotting converting schedules.
Reading Schedules Reading Schedules
----------------- -----------------
*translater* can read almost any schedules defined in an IDF file using a few commands. First, *trnslator* can read almost any schedules defined in an IDF file using a few commands. First,
.. code-block:: python .. code-block:: python
>>> import translater as tr >>> import trnslator as tr
>>> idf = tr.load_idf(<idf-file-path>) >>> idf = tr.load_idf(<idf-file-path>)
>>> this_schedule = Schedule(Name='name', idf=idf) >>> this_schedule = Schedule(Name='name', idf=idf)
@ -20,10 +20,10 @@ Converting Schedules
-------------------- --------------------
Some tools typically rely on a group of 3 schedules; defined as a Yearly, Weekly, Daily schedule object. This is the Some tools typically rely on a group of 3 schedules; defined as a Yearly, Weekly, Daily schedule object. This is the
case for the :ref:`IDF to TRNSYS <Converting IDF to BUI>` converter. The Schedule module of *translater* can handle this conversion. case for the :ref:`IDF to TRNSYS <Converting IDF to BUI>` converter. The Schedule module of *trnslator* can handle this conversion.
The `year-week-day` representation for any schedule object is invoked with The `year-week-day` representation for any schedule object is invoked with
the :py:meth:`~translater.schedule.Schedule.to_year_week_day` method: the :py:meth:`~trnslator.schedule.Schedule.to_year_week_day` method:
.. code-block:: python .. code-block:: python
@ -34,7 +34,7 @@ Plotting Schedules
Schedules can be parsed as :class:`pandas.Series` objects (call the `series` property on a Schedule object) which then Schedules can be parsed as :class:`pandas.Series` objects (call the `series` property on a Schedule object) which then
exposes useful methods from the pandas package. For convenience, a wrapper for the plotting method is built-in the exposes useful methods from the pandas package. For convenience, a wrapper for the plotting method is built-in the
Schedule class. To plot the full annual schedule (or a specific range), simply call the :meth:`translater.schedule.Schedule.plot` Schedule class. To plot the full annual schedule (or a specific range), simply call the :meth:`trnslator.schedule.Schedule.plot`
method. For example, method. For example,
.. code-block:: python .. code-block:: python

View File

@ -1,7 +1,7 @@
For MacOS/Linux users For MacOS/Linux users
===================== =====================
MacOS or Linux users must install Wine_ before running translater. This software MacOS or Linux users must install Wine_ before running trnslator. This software
will allow MacOS/Linux users to run Windows application (e.g. `trnsidf.exe`). will allow MacOS/Linux users to run Windows application (e.g. `trnsidf.exe`).
Wine installation Wine installation
@ -40,18 +40,18 @@ This action will make Homebrew inspected your system to make sure the installati
For more information about Wine installation, you can visit the following website: https://www.davidbaumgold.com/tutorials/wine-mac/ For more information about Wine installation, you can visit the following website: https://www.davidbaumgold.com/tutorials/wine-mac/
Using WINE with ``translater convert`` command Using WINE with ``trnslator convert`` command
---------------------------------------------- ----------------------------------------------
The IDF to BUI converter uses an executable installed with TRNSYS (which is Windows only). Users that have bought The IDF to BUI converter uses an executable installed with TRNSYS (which is Windows only). Users that have bought
TRNSYS can copy the trnsidf.exe executable to their UNIX machine (MacOs or Linux) and invoke the `translater convert` TRNSYS can copy the trnsidf.exe executable to their UNIX machine (MacOs or Linux) and invoke the `trnslator convert`
command with the :option:`--trnsidf_exe` option. command with the :option:`--trnsidf_exe` option.
Example: Example:
.. code-block:: python .. code-block:: python
translater convert --trnsidf-exe "<path to executable on UNIX machine>" "<path to IDF file>" trnslator convert --trnsidf-exe "<path to executable on UNIX machine>" "<path to IDF file>"
You can find the executable trnsidf.exe in the TRNSYS default installation folder: You can find the executable trnsidf.exe in the TRNSYS default installation folder:
`C:\\TRNSYS18\\Building\\trnsIDF` `C:\\TRNSYS18\\Building\\trnsIDF`

View File

@ -1,4 +1,4 @@
name: translater name: trnslator
channels: channels:
- defaults - defaults
- conda-forge - conda-forge

View File

@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
) )
set SOURCEDIR=./docs set SOURCEDIR=./docs
set BUILDDIR=_build set BUILDDIR=_build
set SPHINXPROJ=translater set SPHINXPROJ=trnslator
if "%1" == "" goto help if "%1" == "" goto help

View File

@ -1,4 +1,4 @@
{% set name = "translater" %} {% set name = "trnslator" %}
{% set version = "1.0.1" %} {% set version = "1.0.1" %}
{% set sha256 = "3e97f799769469412b12b8d71cc2342d0c93c9f6ea4ca36366c415eef9fbe344" %} {% set sha256 = "3e97f799769469412b12b8d71cc2342d0c93c9f6ea4ca36366c415eef9fbe344" %}
@ -34,18 +34,18 @@ requirements:
test: test:
imports: imports:
- translater - trnslator
about: about:
home: https://github.com/louisleroy5/translater home: https://github.com/louisleroy5/trnslator
license: MIT license: MIT
license_family: MIT license_family: MIT
license_file: LICENSE.txt license_file: LICENSE.txt
summary: 'Convert IDF file (EnergyPlus) to BUI file (TRNBuild)' summary: 'Convert IDF file (EnergyPlus) to BUI file (TRNBuild)'
description: | description: |
translater is a Python package. trnslator is a Python package.
doc_url: https://translater.readthedocs.io doc_url: https://trnslator.readthedocs.io
dev_url: https://github.com/louisleroy5/translater dev_url: https://github.com/louisleroy5/trnslator
extra: extra:
recipe-maintainers: recipe-maintainers:

View File

@ -14,7 +14,7 @@ here = os.getcwd()
# the minimum Python requirement in the metadata. # the minimum Python requirement in the metadata.
if sys.version_info < (3, 6): if sys.version_info < (3, 6):
error = """ error = """
translater 1.0+ does not support Python 2.x, 3.0, 3.1, 3.2, or 3.3. trnslator 1.0+ does not support Python 2.x, 3.0, 3.1, 3.2, or 3.3.
Python 3.6 and above is required. This may be due to an out of date pip. Python 3.6 and above is required. This may be due to an out of date pip.
Make sure you have pip >= 9.0.1. Make sure you have pip >= 9.0.1.
""" """
@ -47,18 +47,18 @@ with open(path.join(here, "requirements-dev.txt")) as f:
dev_requires = [r.strip() for r in requirements_lines] dev_requires = [r.strip() for r in requirements_lines]
setup( setup(
name="translater", name="trnslator",
version=find_version("translater", "__init__.py"), version=find_version("trnslator", "__init__.py"),
packages=["translater"], packages=["trnslator"],
package_data={ package_data={
"translater": [ "trnslator": [
"translater/ressources/originBUISketchUp.idf", "trnslator/ressources/originBUISketchUp.idf",
"translater/ressources/W74-lib.dat", "trnslator/ressources/W74-lib.dat",
"translater/ressources/NewFileTemplate.d18", "trnslator/ressources/NewFileTemplate.d18",
] ]
}, },
include_package_data=True, include_package_data=True,
url="https://github.com/louisleroy5/translater", url="https://github.com/louisleroy5/trnslator",
license="-", license="-",
author="Louis Leroy", author="Louis Leroy",
author_email="louis.leroy@polymtl.ca", author_email="louis.leroy@polymtl.ca",
@ -71,6 +71,6 @@ setup(
test_suite="tests", test_suite="tests",
entry_points=""" entry_points="""
[console_scripts] [console_scripts]
translater=translater.cli:cli trnslator=trnslator.cli:cli
""", """,
) )

View File

@ -5,7 +5,7 @@ import sys
import pytest import pytest
import translater as tr import trnslator as tr
# Parametrization of the fixture scratch_then_cache. The following array # Parametrization of the fixture scratch_then_cache. The following array

View File

@ -4,13 +4,13 @@ import pytest
from click.testing import CliRunner from click.testing import CliRunner
from path import Path from path import Path
from translater import settings, copy_file, log, load_idf from trnslator import settings, copy_file, log, load_idf
from translater.cli import cli from trnslator.cli import cli
from tests.test_trnsys import get_platform from tests.test_trnsys import get_platform
class TestCli: class TestCli:
"""Defines tests for usage of the translater Command Line Interface""" """Defines tests for usage of the trnslator Command Line Interface"""
@pytest.fixture( @pytest.fixture(
params=[ params=[
@ -73,7 +73,7 @@ class TestCli:
"--ep_version", "--ep_version",
"9-2-0", "9-2-0",
"--window_lib", "--window_lib",
"translater/ressources/W74-lib.dat", "trnslator/ressources/W74-lib.dat",
"tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/trnsys/simple_2_zone.idf",
"tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw",
"--trnsidf_exe", "--trnsidf_exe",
@ -95,7 +95,7 @@ class TestCli:
"--ep_version", "--ep_version",
"9-2-0", "9-2-0",
"--template", "--template",
"translater/ressources/NewFileTemplate.d18", "trnslator/ressources/NewFileTemplate.d18",
"tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/trnsys/simple_2_zone.idf",
"tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw",
"--trnsidf_exe", "--trnsidf_exe",

View File

@ -1,12 +1,12 @@
import os import os
import translater as tr import trnslator as tr
import pandas as pd import pandas as pd
import pytest import pytest
from path import Path from path import Path
from translater import EnergySeries, get_eplus_dirs, settings from trnslator import EnergySeries, get_eplus_dirs, settings
import numpy as np import numpy as np
@ -22,7 +22,7 @@ import numpy as np
], ],
) )
def energy_series(config, request): def energy_series(config, request):
from translater import ReportData from trnslator import ReportData
outputs = { outputs = {
"ep_object": "Output:Variable".upper(), "ep_object": "Output:Variable".upper(),
@ -62,7 +62,7 @@ def energy_series(config, request):
params=(["Water Heater Tank Temperature", "WaterSystems:EnergyTransfer"]) params=(["Water Heater Tank Temperature", "WaterSystems:EnergyTransfer"])
) )
def rd(request): def rd(request):
from translater import ReportData from trnslator import ReportData
file = Path("tests/input_data/trnsys/HeatPumpWaterHeater.sqlite") file = Path("tests/input_data/trnsys/HeatPumpWaterHeater.sqlite")
@ -73,7 +73,7 @@ def rd(request):
def test_EnergySeries(rd): def test_EnergySeries(rd):
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from translater import EnergySeries from trnslator import EnergySeries
es = EnergySeries.from_sqlite(rd) es = EnergySeries.from_sqlite(rd)
es.plot() es.plot()

View File

@ -2,15 +2,15 @@ import os
import random import random
import subprocess import subprocess
import translater as tr import trnslator as tr
import matplotlib as mpl import matplotlib as mpl
# use agg backend so you don't need a display on travis-ci # use agg backend so you don't need a display on travis-ci
import pytest import pytest
from path import Path from path import Path
import translater.settings import trnslator.settings
from translater import EnergyPlusProcessError, get_eplus_dirs, settings, \ from trnslator import EnergyPlusProcessError, get_eplus_dirs, settings, \
parallel_process parallel_process
mpl.use("Agg") mpl.use("Agg")
@ -85,7 +85,7 @@ def test_load_old(config):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"ep_version", "ep_version",
[translater.settings.ep_version, None], [trnslator.settings.ep_version, None],
ids=["specific-ep-version", "no-specific-ep-version"], ids=["specific-ep-version", "no-specific-ep-version"],
) )
def test_run_olderv(clean_config, 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 """Test the conditioned_area property against published values
desired values taken from https://github.com/canmet-energy/btap""" desired values taken from https://github.com/canmet-energy/btap"""
import numpy as np import numpy as np
from translater import load_idf from trnslator import load_idf
idf_file = Path("tests/input_data/necb/").glob("*{}*.idf".format(archetype)) idf_file = Path("tests/input_data/necb/").glob("*{}*.idf".format(archetype))
idf = load_idf(next(iter(idf_file))) idf = load_idf(next(iter(idf_file)))
@ -183,7 +183,7 @@ def test_area(archetype, area):
def test_wwr(): def test_wwr():
from translater import load_idf from trnslator import load_idf
idf_file = Path("tests/input_data/necb/").glob( idf_file = Path("tests/input_data/necb/").glob(
"*{}*.idf".format("FullServiceRestaurant") "*{}*.idf".format("FullServiceRestaurant")
@ -194,7 +194,7 @@ def test_wwr():
def test_partition_ratio(): def test_partition_ratio():
from translater import load_idf from trnslator import load_idf
idf_file = Path("tests/input_data/necb/").glob("*LargeOffice*.idf") idf_file = Path("tests/input_data/necb/").glob("*LargeOffice*.idf")
idf = load_idf(next(iter(idf_file))) idf = load_idf(next(iter(idf_file)))
@ -202,7 +202,7 @@ def test_partition_ratio():
def test_space_cooling_profile(config): def test_space_cooling_profile(config):
from translater import load_idf from trnslator import load_idf
file = ( file = (
get_eplus_dirs(settings.ep_version) get_eplus_dirs(settings.ep_version)
@ -218,7 +218,7 @@ def test_space_cooling_profile(config):
def test_space_heating_profile(config): def test_space_heating_profile(config):
from translater import load_idf from trnslator import load_idf
file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.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" 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): def test_dhw_profile(config):
from translater import load_idf from trnslator import load_idf
file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.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" 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): def test_old_than_change_args(clean_config):
"""Should upgrade file only once even if run_eplus args are changed afterwards""" """Should upgrade file only once even if run_eplus args are changed afterwards"""
from translater import run_eplus from trnslator import run_eplus
file = ( file = (
get_eplus_dirs(settings.ep_version) get_eplus_dirs(settings.ep_version)

View File

@ -2,7 +2,7 @@ import os
import pytest import pytest
from translater import ( from trnslator import (
Schedule, Schedule,
load_idf, load_idf,
copy_file, copy_file,

View File

@ -5,7 +5,7 @@ import shutil
import pytest import pytest
import translater as tr import trnslator as tr
import pandas as pd import pandas as pd
@ -13,7 +13,7 @@ from path import Path
from copy import deepcopy from copy import deepcopy
from translater import ( from trnslator import (
convert_idf_to_trnbuild, convert_idf_to_trnbuild,
parallel_process, parallel_process,
trnbuild_idf, trnbuild_idf,
@ -27,7 +27,7 @@ from translater import (
) )
# Function round to hundreds # Function round to hundreds
from translater.trnsys import ( from trnslator.trnsys import (
_assert_files, _assert_files,
load_idf_file_and_clean_names, load_idf_file_and_clean_names,
clear_name_idf_objects, clear_name_idf_objects,
@ -72,7 +72,7 @@ from tests.conftest import get_platform
def converttesteasy(request): def converttesteasy(request):
file = request.param file = request.param
window_file = "W74-lib.dat" window_file = "W74-lib.dat"
template_dir = os.path.join("translater", "ressources") template_dir = os.path.join("trnslator", "ressources")
window_filepath = os.path.join(template_dir, window_file) window_filepath = os.path.join(template_dir, window_file)
template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18"
trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' 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 = get_eplus_dirs(settings.ep_version) / "ExampleFiles" / request.param
# file = request.param # file = request.param
window_file = "W74-lib.dat" window_file = "W74-lib.dat"
template_dir = os.path.join("translater", "ressources") template_dir = os.path.join("trnslator", "ressources")
window_filepath = os.path.join(template_dir, window_file) window_filepath = os.path.join(template_dir, window_file)
template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18"
trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' 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): def test_trnbuild_from_idf(self, config, trnbuild_file):
# Gets file paths/names # Gets file paths/names
window_file = "W74-lib.dat" window_file = "W74-lib.dat"
template_dir = os.path.join("translater", "ressources") template_dir = os.path.join("trnslator", "ressources")
window_filepath = os.path.join(template_dir, window_file) window_filepath = os.path.join(template_dir, window_file)
weather_file = os.path.join( weather_file = os.path.join(
"tests", "input_data", "CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" "tests", "input_data", "CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw"
@ -1305,7 +1305,7 @@ class TestTrnBuild:
def test_trnbuild_from_simple_idf(config): def test_trnbuild_from_simple_idf(config):
# Path to weather file, window library and T3D template # Path to weather file, window library and T3D template
window_file = "W74-lib.dat" window_file = "W74-lib.dat"
template_dir = os.path.join("translater", "ressources") template_dir = os.path.join("trnslator", "ressources")
window_filepath = os.path.join(template_dir, window_file) window_filepath = os.path.join(template_dir, window_file)
# weather_file = os.path.join( # weather_file = os.path.join(
# "tests", "input_data", "CAN_QC_Montreal-McTavish.716120_CWEC2016.epw" # "tests", "input_data", "CAN_QC_Montreal-McTavish.716120_CWEC2016.epw"

View File

@ -3,7 +3,7 @@ import os
import numpy as np import numpy as np
from translater import utils, timeit, settings from trnslator import utils, timeit, settings
from geomeppy.geom.polygons import Polygon3D from geomeppy.geom.polygons import Polygon3D
from datetime import datetime from datetime import datetime

View File

@ -1,32 +0,0 @@
Metadata-Version: 2.1
Name: translater
Version: 1.0.0
Summary: Convert IDF file (EnergyPlus) to BUI file (TRNBuild)
Home-page: https://github.com/louisleroy5/translater
Author: Louis Leroy
Author-email: louis.leroy@polymtl.ca
License: Polytechnique Montréal
Description:
# Translater
**python for converting building simulation archetypes**
Convert IDF file (EnergyPlus) to BUI file (TRNBuild)
## Overview
** Translater** is a Python package that helps converting building archetypes. The public feature released in this
version is the conversion of [EnergyPlus](https://energyplus.net) IDF models to Trnsys [TrnBuild](http://www.trnsys.com/features/suite-of-tools.php.html) Models (compatible with the multizone building model). For a list of features
currently in development see the [In development](#in-development) section.
## Authors
This work is developed by a small team of building energy simulation enthusiasts
- Louis Leroy, Master Student at Polytechnique Montréal (Corresponding Author)
- Samuel Letellier-Duchesne, PhD Candidate at Polytechnique Montréal
Keywords: Building archetypes
Platform: UNKNOWN
Requires-Python: >=3.6
Provides-Extra: dev

View File

@ -1,29 +0,0 @@
MANIFEST.in
README.md
requirements-dev.txt
requirements.txt
setup.cfg
setup.py
translater/__init__.py
translater/cli.py
translater/energydataframe.py
translater/energyseries.py
translater/idfclass.py
translater/plot.py
translater/reportdata.py
translater/schedule.py
translater/settings.py
translater/simple_glazing.py
translater/tabulardata.py
translater/trnsys.py
translater/umi_template.py
translater/utils.py
translater.egg-info/PKG-INFO
translater.egg-info/SOURCES.txt
translater.egg-info/dependency_links.txt
translater.egg-info/entry_points.txt
translater.egg-info/requires.txt
translater.egg-info/top_level.txt
translater/ressources/NewFileTemplate.d18
translater/ressources/W74-lib.dat
translater/ressources/originBUISketchUp.idf

View File

@ -1 +0,0 @@

View File

@ -1,4 +0,0 @@
[console_scripts]
translater= translater.cli:cli

View File

@ -1,32 +0,0 @@
networkx
shapely
geomeppy
matplotlib>=2.1
six
eppy
requests>=2.18
pycountry
scikit-learn
scipy
pandas>=0.24
pyomo
numpy>=1.17
tqdm
tabulate
path.py
tsam
pint
click
outdated
[dev]
coverage
coveralls
pytest
pytest-cov
scikit-learn
scipy
sphinx
sphinx_rtd_theme
recommonmark
sphinx-click

View File

@ -1 +0,0 @@
translater

View File

@ -1,18 +1,18 @@
################################################################################ ################################################################################
# Module: __init__.py # Module: __init__.py
# Description: translater: Convert IDF file (EnergyPlus) to BUI file (TRNBuild) # Description: trnslator: Convert IDF file (EnergyPlus) to BUI file (TRNBuild)
# License: - # License: -
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
# Version of the package # Version of the package
__version__ = "1.0.5" __version__ = "1.0.5"
# warn if a newer version of translater is available # warn if a newer version of trnslator is available
from outdated import warn_if_outdated from outdated import warn_if_outdated
from .utils import warn_if_not_compatible from .utils import warn_if_not_compatible
warn_if_outdated("translater", __version__) warn_if_outdated("trnslator", __version__)
warn_if_not_compatible() warn_if_not_compatible()
from .utils import * from .utils import *

View File

@ -1,8 +1,8 @@
################################################################################ ################################################################################
# Module: cli.py # Module: cli.py
# Description: Implements translater functions as Command Line Interfaces # Description: Implements trnslator functions as Command Line Interfaces
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
import os import os
import time import time
@ -14,7 +14,7 @@ from path import Path
import click import click
from tabulate import tabulate from tabulate import tabulate
from translater import ( from trnslator import (
settings, settings,
cd, cd,
load_idf, load_idf,
@ -83,7 +83,7 @@ pass_config = click.make_pass_decorator(CliConfig, ensure=True)
"-c/-nc", "-c/-nc",
"--use-cache/--no-cache", "--use-cache/--no-cache",
help="Use a local cache to save/retrieve many of " help="Use a local cache to save/retrieve many of "
"translater outputs such as EnergyPlus simulation results", "trnslator outputs such as EnergyPlus simulation results",
default=True, default=True,
) )
@click.option( @click.option(
@ -138,10 +138,10 @@ def cli(
trnsys_default_folder, trnsys_default_folder,
ep_version, ep_version,
): ):
"""translater: Retrieve, construct, simulate, convert and analyse building """trnslator: Retrieve, construct, simulate, convert and analyse building
simulation templates simulation templates
Visit translater.readthedocs.io for the online documentation. Visit trnslator.readthedocs.io for the online documentation.
""" """
cli_config.data_folder = data_folder cli_config.data_folder = data_folder
cli_config.logs_folder = logs_folder cli_config.logs_folder = logs_folder

View File

@ -1,8 +1,8 @@
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from pandas import DataFrame, Series, DatetimeIndex from pandas import DataFrame, Series, DatetimeIndex
from translater import EnergySeries, settings from trnslator import EnergySeries, settings
from translater.energyseries import plot_energyseries_map, save_and_show from trnslator.energyseries import plot_energyseries_map, save_and_show
class EnergyDataFrame(DataFrame): class EnergyDataFrame(DataFrame):

View File

@ -13,8 +13,8 @@ from matplotlib.colors import LightSource
from pandas import Series, DataFrame, concat, MultiIndex, date_range from pandas import Series, DataFrame, concat, MultiIndex, date_range
from sklearn import preprocessing from sklearn import preprocessing
import translater import trnslator
from translater import log, rmse, piecewise, settings from trnslator import log, rmse, piecewise, settings
class EnergySeries(Series): class EnergySeries(Series):
@ -550,7 +550,7 @@ class EnergySeries(Series):
from pandas.core.reshape.reshape import unstack from pandas.core.reshape.reshape import unstack
result = unstack(self, level, fill_value) result = unstack(self, level, fill_value)
result.__class__ = translater.EnergyDataFrame result.__class__ = trnslator.EnergyDataFrame
return result.__finalize__(self) return result.__finalize__(self)
def stack(self, level=-1, dropna=True): def stack(self, level=-1, dropna=True):

View File

@ -3,7 +3,7 @@
# Description: Various functions for processing of EnergyPlus models and # Description: Various functions for processing of EnergyPlus models and
# retrieving results in different forms # retrieving results in different forms
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
import datetime import datetime
import glob import glob
@ -31,9 +31,9 @@ from eppy.bunch_subclass import EpBunch
from eppy.easyopen import getiddfile from eppy.easyopen import getiddfile
from path import Path, TempDir from path import Path, TempDir
import translater import trnslator
import translater.settings import trnslator.settings
from translater import ( from trnslator import (
log, log,
settings, settings,
EnergyPlusProcessError, EnergyPlusProcessError,
@ -44,7 +44,7 @@ from translater import (
EnergyPlusVersionError, EnergyPlusVersionError,
get_eplus_dirs, get_eplus_dirs,
) )
from translater.utils import _unpack_tuple from trnslator.utils import _unpack_tuple
class IDF(geomeppy.IDF): class IDF(geomeppy.IDF):
@ -397,7 +397,7 @@ class IDF(geomeppy.IDF):
return profile return profile
def run_eplus(self, **kwargs): def run_eplus(self, **kwargs):
"""wrapper around the :meth:`translater.idfclass.run_eplus` method. """wrapper around the :meth:`trnslator.idfclass.run_eplus` method.
If weather file is defined in the IDF object, then this field is If weather file is defined in the IDF object, then this field is
optional. By default, will load the sql in self.sql. optional. By default, will load the sql in self.sql.
@ -746,7 +746,7 @@ def load_idf(
weather_file=None, weather_file=None,
ep_version=None, ep_version=None,
): ):
"""Returns a parsed IDF object from file. If *translater.settings.use_cache* """Returns a parsed IDF object from file. If *trnslator.settings.use_cache*
is true, then the idf object is loaded from cache. is true, then the idf object is loaded from cache.
Args: Args:
@ -756,7 +756,7 @@ def load_idf(
the default EnergyPlus install location. the default EnergyPlus install location.
output_folder (Path, optional): Either the absolute or relative path of output_folder (Path, optional): Either the absolute or relative path of
the output folder. Specify if the cache location is different than the output folder. Specify if the cache location is different than
translater.settings.cache_folder. trnslator.settings.cache_folder.
include (str, optional): List input files that need to be copied to the include (str, optional): List input files that need to be copied to the
simulation directory. Those can be, for example, schedule files read simulation directory. Those can be, for example, schedule files read
by the idf file. If a string is provided, it should be in a glob by the idf file. If a string is provided, it should be in a glob
@ -1708,7 +1708,7 @@ def run_eplus(
ep_version = ep_version.replace(".", "-") ep_version = ep_version.replace(".", "-")
else: else:
# if no version is specified, take the package default version # if no version is specified, take the package default version
ep_version = translater.settings.ep_version ep_version = trnslator.settings.ep_version
eplus_file = idf_version_updater( eplus_file = idf_version_updater(
upgraded_file(eplus_file, output_directory), upgraded_file(eplus_file, output_directory),
to_version=ep_version, to_version=ep_version,
@ -2438,7 +2438,7 @@ def idf_version_updater(idf_file, to_version=None, out_dir=None, simulname=None)
stderr="The specified EnergyPlus version (v{}) does not have" stderr="The specified EnergyPlus version (v{}) does not have"
" the required transition program '{}' in the " " the required transition program '{}' in the "
"PreProcess folder. See the documentation " "PreProcess folder. See the documentation "
"(translater.readthedocs.io/troubleshooting.html#missing-transition-programs) " "(trnslator.readthedocs.io/troubleshooting.html#missing-transition-programs) "
"to solve this issue".format(to_version, trans_exec[trans]), "to solve this issue".format(to_version, trans_exec[trans]),
idf=idf_file.basename(), idf=idf_file.basename(),
) )

View File

@ -7,7 +7,7 @@ import numpy as np
import pandas as pd import pandas as pd
from path import Path from path import Path
from translater import log, EnergySeries from trnslator import log, EnergySeries
class ReportData(pd.DataFrame): class ReportData(pd.DataFrame):

View File

@ -2,7 +2,7 @@
# Module: schedule.py # Module: schedule.py
# Description: Functions for handling conversion of EnergyPlus schedule objects # Description: Functions for handling conversion of EnergyPlus schedule objects
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
import functools import functools
@ -16,8 +16,8 @@ import pandas as pd
from eppy.bunch_subclass import EpBunch from eppy.bunch_subclass import EpBunch
from path import Path from path import Path
import translater import trnslator
from translater import log, settings from trnslator import log, settings
class Schedule(object): class Schedule(object):
@ -131,7 +131,7 @@ class Schedule(object):
from eppy.easyopen import easyopen from eppy.easyopen import easyopen
idf_scratch = easyopen(file.name) idf_scratch = easyopen(file.name)
idf_scratch.__class__ = translater.IDF idf_scratch.__class__ = trnslator.IDF
idf_scratch.add_object( idf_scratch.add_object(
ep_object="Schedule:Constant".upper(), ep_object="Schedule:Constant".upper(),
@ -833,7 +833,7 @@ class Schedule(object):
hourly_values = self.get_file_ep_schedule_values(sched_epbunch) hourly_values = self.get_file_ep_schedule_values(sched_epbunch)
else: else:
log( log(
"translater does not currently support schedules of type " "trnslator does not currently support schedules of type "
'"{}"'.format(sch_type), '"{}"'.format(sch_type),
lg.WARNING, lg.WARNING,
) )
@ -871,12 +871,12 @@ class Schedule(object):
count_day = 0 count_day = 0
for unique_day in unique_days: for unique_day in unique_days:
name = "d_" + self.Name + "_" + "%03d" % count_day name = "d_" + self.Name + "_" + "%03d" % count_day
name, count_day = translater.check_unique_name( name, count_day = trnslator.check_unique_name(
"d", count_day, name, translater.settings.unique_schedules, suffix=True "d", count_day, name, trnslator.settings.unique_schedules, suffix=True
) )
dict_day[name] = unique_day dict_day[name] = unique_day
translater.settings.unique_schedules.append(name) trnslator.settings.unique_schedules.append(name)
# Create idf_objects for schedule:day:hourly # Create idf_objects for schedule:day:hourly
ep_day = self.idf.add_object( ep_day = self.idf.add_object(
@ -906,14 +906,14 @@ class Schedule(object):
count_week = 0 count_week = 0
for unique_week in unique_weeks: for unique_week in unique_weeks:
week_id = "w_" + self.Name + "_" + "%03d" % count_week week_id = "w_" + self.Name + "_" + "%03d" % count_week
week_id, count_week = translater.check_unique_name( week_id, count_week = trnslator.check_unique_name(
"w", "w",
count_week, count_week,
week_id, week_id,
translater.settings.unique_schedules, trnslator.settings.unique_schedules,
suffix=True, suffix=True,
) )
translater.settings.unique_schedules.append(week_id) trnslator.settings.unique_schedules.append(week_id)
dict_week[week_id] = {} dict_week[week_id] = {}
for i in list(range(0, 7)): for i in list(range(0, 7)):
@ -1165,7 +1165,7 @@ class Schedule(object):
return None return None
else: else:
raise NotImplementedError( raise NotImplementedError(
"translater does not yet support The " 'Field_set "{}"'.format(field) "trnslator does not yet support The " 'Field_set "{}"'.format(field)
) )
def __len__(self): def __len__(self):

View File

@ -2,7 +2,7 @@
# Module: settings.py # Module: settings.py
# Description: Various settings used across the package # Description: Various settings used across the package
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
import logging as lg import logging as lg
@ -11,7 +11,7 @@ import pint
from path import Path from path import Path
# locations to save data, logs, images, and cache # locations to save data, logs, images, and cache
import translater import trnslator
data_folder = Path("data") data_folder = Path("data")
logs_folder = Path("logs") logs_folder = Path("logs")
@ -27,8 +27,8 @@ log_file = False
log_console = False log_console = False
log_notebook = False log_notebook = False
log_level = lg.INFO log_level = lg.INFO
log_name = "translater" log_name = "trnslator"
log_filename = "translater" log_filename = "trnslator"
# usual idfobjects # usual idfobjects
useful_idf_objects = [ useful_idf_objects = [
@ -125,7 +125,7 @@ trnsys_default_folder = Path(r"C:\TRNSYS18")
# region read template - use io.BytesIO(settings.template) in code # region read template - use io.BytesIO(settings.template) in code
import pkg_resources import pkg_resources
resource_package = translater.__name__ # Could be any module/package name resource_package = trnslator.__name__ # Could be any module/package name
# originBUISketchUp.idf template # originBUISketchUp.idf template
resource_path = "/".join(("ressources", "originBUISketchUp.idf")) resource_path = "/".join(("ressources", "originBUISketchUp.idf"))
@ -171,5 +171,5 @@ class ZoneWeight(object):
zone_weight = ZoneWeight(n=0) zone_weight = ZoneWeight(n=0)
# Latest version of EnergyPlus compatible with translater # Latest version of EnergyPlus compatible with trnslator
ep_version = "9-2-0" ep_version = "9-2-0"

View File

@ -2,7 +2,7 @@
# Module: trnsys.py # Module: trnsys.py
# Description: Convert EnergyPlus models to TrnBuild models # Description: Convert EnergyPlus models to TrnBuild models
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
import io import io
@ -21,7 +21,7 @@ from geomeppy.geom.polygons import Polygon3D
from path import Path from path import Path
from tqdm import tqdm from tqdm import tqdm
from translater import ( from trnslator import (
log, log,
settings, settings,
Schedule, Schedule,
@ -788,7 +788,7 @@ def _remove_low_conductivity(constructions, idf, materials):
Args: Args:
constructions (Idf_MSequence): CONSTRUCTION object from the IDF constructions (Idf_MSequence): CONSTRUCTION object from the IDF
idf (translater.idfclass.IDF object at 0x11e3d3208): the IDf object idf (trnslator.idfclass.IDF object at 0x11e3d3208): the IDf object
materials (Idf_MSequence): MATERIAL object from the IDF materials (Idf_MSequence): MATERIAL object from the IDF
Returns: Returns:
@ -901,7 +901,7 @@ def get_idf_objects(idf):
"""Gets idf objects """Gets idf objects
Args: Args:
idf (translater.idfclass.IDF object at 0x11e3d3208): the IDf object idf (trnslator.idfclass.IDF object at 0x11e3d3208): the IDf object
Returns: Returns:
materials (Idf_MSequence): MATERIAL object from the IDF materials (Idf_MSequence): MATERIAL object from the IDF
@ -967,7 +967,7 @@ def load_idf_file_and_clean_names(idf_file, log_clear_names):
the old and new names in the console. the old and new names in the console.
Returns: Returns:
idf (translater.idfclass.IDF object at 0x11e3d3208): the IDf object idf (trnslator.idfclass.IDF object at 0x11e3d3208): the IDf object
""" """
log("Loading IDF file...", lg.INFO) log("Loading IDF file...", lg.INFO)
@ -1062,7 +1062,7 @@ def _add_change_adj_surf(buildingSurfs, idf):
building surfaces ("BUILDINGSURFACE:DETAILED" in the IDF). Building building surfaces ("BUILDINGSURFACE:DETAILED" in the IDF). Building
surfaces to iterate over and determine if either a change on an surfaces to iterate over and determine if either a change on an
adjacent surface is needed or the creation of a new one adjacent surface is needed or the creation of a new one
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
""" """
adj_surfs_to_change = {} adj_surfs_to_change = {}
adj_surfs_to_make = [] adj_surfs_to_make = []
@ -1166,7 +1166,7 @@ def _get_schedules(idf):
"""Get schedules from IDF """Get schedules from IDF
Args: Args:
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
""" """
start_time = time.time() start_time = time.time()
log("Reading schedules from the IDF file...") log("Reading schedules from the IDF file...")
@ -1203,7 +1203,7 @@ def clear_name_idf_objects(idfFile, log_clear_names=False):
new name will be "stl_00000n" - limits length to 10 characters new name will be "stl_00000n" - limits length to 10 characters
Args: Args:
idfFile (translater.idfclass.IDF): IDF object where to clean names idfFile (trnslator.idfclass.IDF): IDF object where to clean names
log_clear_names: log_clear_names:
""" """
@ -1771,7 +1771,7 @@ def _write_zone_buildingSurf_fenestrationSurf(
fenestrationSurfs (idf_MSequence): IDF object from idf.idfobjects(). fenestrationSurfs (idf_MSequence): IDF object from idf.idfobjects().
List of fenestration surfaces ("FENESTRATIONSURFACE:DETAILED" in the List of fenestration surfaces ("FENESTRATIONSURFACE:DETAILED" in the
IDF). IDF).
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
lines (list): Text to create the T3D file (IDF file to import in lines (list): Text to create the T3D file (IDF file to import in
TRNBuild). To be appended (insert) here TRNBuild). To be appended (insert) here
n_ground (Vector 3D): Normal vector of the ground surface n_ground (Vector 3D): Normal vector of the ground surface
@ -1927,7 +1927,7 @@ def _modify_adj_surface(buildingSurf, idf):
Args: Args:
buildingSurf (EpBunch): Building surface object to modify buildingSurf (EpBunch): Building surface object to modify
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
""" """
# Force outside boundary condition to "Zone" # Force outside boundary condition to "Zone"
buildingSurf.Outside_Boundary_Condition = "Zone" buildingSurf.Outside_Boundary_Condition = "Zone"
@ -1986,7 +1986,7 @@ def _inverse_vertices_surf(buildingSurf, idf, outside_bound_surf, idfobject_key)
Args: Args:
buildingSurf (EpBunch): Building surface object to modify buildingSurf (EpBunch): Building surface object to modify
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
outside_bound_surf (str): Name of the adjacent surface to the outside_bound_surf (str): Name of the adjacent surface to the
buildingSurf buildingSurf
idfobject_key (str): Section name of the IDF where to find the idfobject_key (str): Section name of the IDF where to find the
@ -2420,7 +2420,7 @@ def _write_gains(equipments, lights, lines, peoples, htm, old_new_names):
Args: Args:
equipments (idf_MSequence): IDF object from idf.idfobjects(). List of equipments (idf_MSequence): IDF object from idf.idfobjects(). List of
equipments ("ELECTRICEQUIPMENT" in the IDF). equipments ("ELECTRICEQUIPMENT" in the IDF).
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
lights (idf_MSequence): IDF object from idf.idfobjects(). List of lights lights (idf_MSequence): IDF object from idf.idfobjects(). List of lights
("LIGHTS" in the IDF). ("LIGHTS" in the IDF).
lines (list): Text to create the T3D file (IDF file to import in lines (list): Text to create the T3D file (IDF file to import in
@ -2641,7 +2641,7 @@ def _write_constructions_end(constr_list, idf, lines):
Args: Args:
constr_list (list): list of construction names to be written constr_list (list): list of construction names to be written
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
lines (list): Text to create the T3D file (IDF file to import in lines (list): Text to create the T3D file (IDF file to import in
TRNBuild). To be appended (insert) here TRNBuild). To be appended (insert) here
""" """
@ -2658,7 +2658,7 @@ def _write_constructions(constr_list, idf, lines, mat_name, materials):
Args: Args:
constr_list (list): list of construction names to be written constr_list (list): list of construction names to be written
idf (translater.idfclass.IDF): IDF object idf (trnslator.idfclass.IDF): IDF object
lines (list): Text to create the T3D file (IDF file to import in lines (list): Text to create the T3D file (IDF file to import in
TRNBuild). To be appended (insert) here TRNBuild). To be appended (insert) here
mat_name (list): list of material names to be written mat_name (list): list of material names to be written

View File

@ -2,7 +2,7 @@
# Module: utils.py # Module: utils.py
# Description: Utility functions for configuration, logging # Description: Utility functions for configuration, logging
# License: MIT, see full license in LICENSE.txt # License: MIT, see full license in LICENSE.txt
# Web: https://github.com/louisleroy5/translater # Web: https://github.com/louisleroy5/trnslator
################################################################################ ################################################################################
# OSMnx # OSMnx
# #
@ -32,8 +32,8 @@ import pandas as pd
from pandas.io.json import json_normalize from pandas.io.json import json_normalize
from path import Path from path import Path
from translater import settings from trnslator import settings
from translater.settings import ep_version from trnslator.settings import ep_version
def config( def config(
@ -62,7 +62,7 @@ def config(
imgs_folder (str): where to save figures. imgs_folder (str): where to save figures.
cache_folder (str): where to save the simulation results. cache_folder (str): where to save the simulation results.
use_cache (bool): if True, use a local cache to save/retrieve many of use_cache (bool): if True, use a local cache to save/retrieve many of
translater outputs such as EnergyPlus simulation results. This can trnslator outputs such as EnergyPlus simulation results. This can
save a lot of time by not calling the simulation and DataPortal APIs save a lot of time by not calling the simulation and DataPortal APIs
repetitively for the same requests. repetitively for the same requests.
log_file (bool): if true, save log output to a log file in logs_folder. log_file (bool): if true, save log output to a log file in logs_folder.
@ -98,7 +98,7 @@ def config(
# if logging is turned on, log that we are configured # if logging is turned on, log that we are configured
if settings.log_file or settings.log_console: if settings.log_file or settings.log_console:
log("Configured translater") log("Configured trnslator")
def validate_epversion(ep_version): def validate_epversion(ep_version):
@ -660,7 +660,7 @@ def get_eplus_dirs(version=ep_version):
def warn_if_not_compatible(): def warn_if_not_compatible():
"""Checks if an EnergyPlus install is detected. If the latest version """Checks if an EnergyPlus install is detected. If the latest version
detected is higher than the one specified by translater, a warning is also detected is higher than the one specified by trnslator, a warning is also
raised. raised.
""" """
eplus_homes = get_eplus_basedirs() eplus_homes = get_eplus_basedirs()
@ -668,7 +668,7 @@ def warn_if_not_compatible():
if not eplus_homes: if not eplus_homes:
warnings.warn( warnings.warn(
"No installation of EnergyPlus could be detected on this " "No installation of EnergyPlus could be detected on this "
"machine. Please install EnergyPlus from https://energyplus.net before using translater" "machine. Please install EnergyPlus from https://energyplus.net before using trnslator"
) )
if len(eplus_homes) > 1: if len(eplus_homes) > 1:
# more than one installs # more than one installs
@ -691,7 +691,7 @@ def get_eplus_basedirs():
return eplus_homes return eplus_homes
else: else:
warnings.warn( warnings.warn(
"translater is not compatible with %s. It is only compatible " "trnslator is not compatible with %s. It is only compatible "
"with Windows, Linux or MacOs" % platform.system() "with Windows, Linux or MacOs" % platform.system()
) )
@ -802,7 +802,7 @@ def parallel_process(in_dict, function, processors=-1, use_kwargs=True):
"""A parallel version of the map function with a progress btr. """A parallel version of the map function with a progress btr.
Examples: Examples:
>>> import translater as tr >>> import trnslator as tr
>>> files = ['tests/input_data/problematic/nat_ventilation_SAMPLE0.idf', >>> files = ['tests/input_data/problematic/nat_ventilation_SAMPLE0.idf',
>>> 'tests/input_data/regular/5ZoneNightVent1.idf'] >>> 'tests/input_data/regular/5ZoneNightVent1.idf']
>>> wf = 'tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw' >>> wf = 'tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw'