Running notes for eppy
======================


2026-01-21
----------

- skipped test in tests/test_runner.py
- this test should run only when E+ is installed
- do remaining steps of "move to uv" issue #453

Change file::

    eppy/__init__.py # version is got from pyproject.toml

- Readthedocs is working. 
    - need to get it to trigget on master and develop
- test the release to PyPi

2026-01-20
----------

- from /eppy/.github/workflows
- mv install.sh ../../delete_oldworkflows/ 
- mv main.yml ../../delete_oldworkflows 

These files in delete_oldworkflows may have info on how to install E+ and run .run functions

2024-10-19
----------

test on github failing in develop. Try with master

2024-10-18
----------

Working on issue #444. fixed the issue. Need to make unit tests that would fail before the fix and succeed after the fix

- The issue #444 is triggered with IDD > 9.4
- need to see what version of IDD the pytests are using. It is idf.idd_version=(8, 0, 0, 8)
- release this version in branch i444_hotfix without the tests, so it can be used

- tests are passing with this fix. Do more tests for i444

2023-11-08
----------

try to install another version of eppy in repository eppyactions

2023-11-05
----------

actions are doing the full tests at branch ``branchtest``. Points to note

- EPPY-INTEGRATION is set to True (can be st to true in master and false in develop)
- install E+ version 9.2.0 in CI. This is harcoded in ./github/worflows/install.sh and ./samepath/main.yml
- test are run in E+ version 8.9.0 in local


- this branch can be merged into develop and master
    - need to update history
- worth coding to select local and remote E+ versions for tests.

put double quote in VERSION = os.environ['ENERGYPLUS_INSTALL_VERSION'] of conftest.py and test_runner.py

Long term steps:

- Install any version of E+ on CI
- toggle for local and CI E+ version for testing.

2022-12-21
----------

issue #411

- Looks like just a space in the weatherfile path tripped it up
- confirm this
- strip the space -> solution
- check if it works with embedded spaces
    - looks like embedded spaces are not an issue
    
- code to fix this issue - DONE
    - test if file exists
    - throw exception
    - do unit test for this exception - TODO
- check on unmethours issue
- respond to this at 
- https://unmethours.com/question/58548/eppy-error-in-running-simulation-using-idfrun/

2022-11-30
----------

paused on issue #404

Then go onto zeppy that triggered all these changes.

2022-11-26
----------

Plan:

- don't change existing functions - idf.run and runIDFs
- make new functions that will run files from the disk
- idf.run -> idf.runfile
- runIDFs -> runIDFfiles

Status:

- OK .. both of the above are working
- TODO
    - duplicate the tests
    - Update doc strings for new function
    - include these functions in user documentation.
- need to restore idf.idfname to the original name
- see
- https://stackoverflow.com/questions/8577137/how-can-i-create-a-tmp-file-in-python
- for temporary file names.


2022-11-25
----------

- removed saveas("in.idf") from idf.run()
- runs works and runIDFs() works
- tests are failing - fix them.

notes:

- idf.run() should work only on a file that is on disk
- So a file has to be saved onto disk before it can be run
- The tests in tests_runner do not have this expaection. So they fail
- ######
- the fact that they have to saved has to in the documentation.
- both function doc and readthedocs 



2022-11-24
----------

write test for debug in 

- test_multiprocess_run_IDF
- test_multiprocess_run_IDF_from_generator

2022-10-09
----------

- remove temp files - DONE
- craft a fix issue commit message - DONE
- add message to History - DONE
- update any copyrights - DONE
- commit with message  - DONE
- merge into develop 
- remove 1395_extfield branch in local
- in remote
- close issue
- ind issue #391 ask for a break it test

2022-10-08
----------

- TODO: -- move extensible filed finctions to a new module called ext_field_functions - DONE
- these are in idfreader.py and bunch_subclass.py - DONE
- confirm that the unit test work - DONE
- then continue with issue #395
    - bunch_subclass is updated - DONE
    - it creastes extra fields. search for: - DONE
        - # TODO - fix extra fields issue - DONE
    - do unit tests for this - DONE
    - cleanup code - DONE
- After that, check if issure #391 and #393 were unnecessary
    - first check if skipping vars in newodfobject() will break it
         - Does not break - unit tested - DONE
- run black
- full test



2022-10-06
----------

- issue #391  has been fixed for reading a file
    - need to unit test this
    - generte a test string for "WindowMaterial:GlazingGroup:Thermochromic"
    - have a huge number of extensible fields 
    - read it
    - do this as a script ant then make it a test - DONE
    - clean up code after this 
    - update copyright in files
    - and do a release.
    - no documentation needed. It just works

- other ways issue #391 can fail
    - idf.newidfobject (with extensible fields overshooting)
    - adding anew field by doing obj.filedname
    - adding a new field by obj['fieldname']
    - other ways

2022-10-05
----------

- debuging using pudb for issue #391
- breakpoint at iddgaps.py  line 76
- figuring out how the repeating fields are renamed


2022-09-23
----------

issue #391

- Make minimal IDD to correspond to Minimal.idf - DONE
- mv.IDD and mv.idf with only version number
- use the debugger to walk thru a read of this

    > /Users/santoshphilip/Documents/coolshadow/github/eppy/eppy/modeleditor.py(689)read()
    -> self.__class__.setidd(idd_info, idd_index, block, idd_version)
    display block: 
        [['Version', 'A1']]
    display idd_info: 
        [[{'memo': ['Specifies the EnergyPlus version of the IDF file.'],
       'unique-object': [''],
       'format': ['singleLine'],
       'group': None,
       'idfobj': 'Version'},
      {'field': ['Version Identifier'], 'default': ['9.6']}]]



2021-12-10
----------

TODO :

	- packaging and release steps
	- clean up `make doca`
	- follow up on with eppy issues
	- revive eppy3000
	- zonrg and functional


2021-12-04
----------

- do an emergency release. Needed to answer question in unmethours
- merge develop into master
- do a bumpversion patch
- make a tag
- release on pypi
- update docs

2021-02-17
----------

- do a save after changing directory.
- It saves in the wrong place
- set the path as abs path and save to abs path

2021-02-15
----------

release

- bump version
    - in develop
    - udate History
    - push
    - merge into master
    - push
- release in pypi
- release in readthedocs

2021-02-13
----------

tag symbols in an object name are breaking html output. They break the cell in which the name appears. Browser and Beautiful soup mangle the cell trying to fix it

fixes:
    
- parse the entire file and change the tags in a cell to 
    - < becomes &lt;
    - > becomes &gt;
- get EnergyPlus to fix it 
- remove any nostring elements from the cell
    - This will still give a mangled name

2021-01-02
----------

rename with better name.

- ahtmltable -> get table using tableindex
    - tablebyindex __getitem__

- htmlonetable -> get table using tablename
    - tablebyname __getattr__

2019-07-15
----------

updated newfunctions.ipynb to remove upper.

- it has saved
- it is not generating the rst file

2019-05-20
----------

Scratch notes
- IDF.read()
    - idfreader.idfreader1()
        - idfreader.makebunches_alter()
            - idfreader.makeabunch()
2018-10-03
----------

- see <https://cookiecutter-pypackage.readthedocs.io/en/latest/pypi_release_checklist.html> before release


2018-10-03
----------

use cookiecutter:

- make cookiecutter in a different folder (turn pytest on)
    - use eppy as project name here.
- move Makefile to the real envars
- merge requirements_dev.txt into the one in the real envars
    - run pip install -r requirements_dev.txt
- merge the .gitignore
- merge setup.cfg
    - update current version on setup.cfg
    - version should be string in setup.py
- merge envars/__init__.py


things that work
- make test    
- make clean
- make lint
    - flake8.sh -> useful with textmate
- make coverage
- make dist
- make release

Does not work:
- make docs
    - now using:
        - cd docs
        - make html
    




2018-09-18
----------

issue #55
branch i55_idfdiff
- reveiw the error or recreate it.

on review:
- idfdiffs.idfdiffs(idf1, idf2) -> gives the wrong output in missing object.
- FIXED 
 
2018-04-30
----------

But in Python 2, identifiers can only be ASCII letters, numbers and underscores.

2018-03-24
----------

eppy.modeleditor.newrawobject is not converting fields to numbers
tricky to fix this since it needs block values [A1, A2, N1] tat are not available here.
see eppy.idfreader.convertallfields to see how this is done -> response to isse #188

2017-12-12
----------

gather eppy functions as two type:
- those that act on idf
- those that acto in idfobject

- update the documentation to reflect this first
- see if this leads to any recoding

IDF functions
- idf = IDF(fname) # fname or fhandle
- idf.printidf
- idf1.idfobjects['BUILDING']
- idf.save
- idf.saveas
- idf.newidfobject
- idf.copyidfobject
- idf.newidfobject
- idf.removeidfobject
- idf.popidfobject
- idf.copyidfobject

idfobjects function
- building.Name
- surface azimuth
- surface tilt
- surface area
- building.getrange("Loads_Convergence_Tolerance_Value")
- building.checkrange("Loads_Convergence_Tolerance_Value")
- building.fieldnames

area = modeleditor.zonearea(idf, zone.Name)
volume = modeleditor.zonevolume(idf, zone.Name)
json_functions.updateidf(idf1, json_str)
idf_helpers.getidfobjectlist
idf_helpers.copyidfintoidf


2017-12-11
----------

email/contace all users of eppy for feedback

@jamiebull1
people who have responded to issues
#166 @adChong
#161 @wta12
#154 @SriramK89
#141 @MatthewSteen
#137 @jasonglazer
#136 @jmarrec
#118 @aarongarrett
#117 @crollinjones


2017-11-09
----------
- Fix issue #170 by ensuring pydot3k is installed for all 3.x python versions, and using miniconda envs for Appveyor CI.
- Add Python 3.6 and EnergyPlus 8.8 to CI

2017-05-25
----------
slash and burn on i116_slashandburn
remove dfunct functions to improve coverage.

files to save and move:
- simplesurface.py
- usefulscripts/

2016-07-20
----------
documentation for changes in IDF.idd_info and other stuff;
- IDF.idd_index
- embedded data in IDF.idd_info
    zone = idf.idfobjects['ZONE'][0]
    zone.idf > access to the idf
    zone.objidd[0] has new keys
        - group, idfobj
    window = idf.idfobjects['WINDOW'][0]
    window.getfieldidd('Construction_Name') will give
        {u'field': [u'Construction Name'],
         u'note': [u'To be matched with a construction in this input file'],
         u'object-list': [u'ConstructionNames'],
         u'validobjects': {u'CONSTRUCTION',
          u'CONSTRUCTION:CFACTORUNDERGROUNDWALL',
          u'CONSTRUCTION:COMPLEXFENESTRATIONSTATE',
          u'CONSTRUCTION:FFACTORGROUNDFLOOR',
          u'CONSTRUCTION:INTERNALSOURCE',
          u'CONSTRUCTION:WINDOWDATAFILE'},
         u'required-field': [u''],
         u'type': [u'object-list']}
    validobjects -> is a new key
    


2016-07-07
----------
further thought from get_referenced_object
- do get_referable_objects -> gets all the objects that can be referred 
- wall.getfunctions -> return the functions specific to wall
- safeguard for name-clash in EpBunch.
    - can be done by having all functions start with a suffix get_ , f_ ,
    - aslo run a check when EpBunch is initiated. 
- get_referenced_object is a geeky functions. Most users will need something more specific with the most commonly used ones. 
        - Wall.belongsto or wall.parent
        - surface.belongsto or surface.parent
        - (might be good to have users have the ability to add functions)

2016-07-06
----------
review bunch_subclass.get_referenced_object
some syntactic sugar is possible - DONE

2016-06-28
----------
parse the idd to gather all the relationships between 'object-list' and 'reference'. write specific functions for all the refs - DONE in ./docs/temp3.py

2016-06-26
----------
in branch i102_mseq_idf.
remove the setting of epbunch.idf in all places.
set it when it is __set__ into Idf_MSequence
Idf_MSequence will need a varaible theidf
steps:
- remove all setting of idf in epbunch.idf 
    - remove the arg from __init__ DONE
    - it will be set to None in the __init__ DONE
- it should be set in Idf_MSequence DONE

2016-06-24
----------
epbunch.theidd - when does theidd have to be chnaged
- when epbunch is copied to a new idf
- when epbunch is removed form an idf file
- when a new epbunch is created in an idf
- when an epbunch is added to an idf
possibly if this is done in Idf_MSequence, all of it will be automatically taken care of. - DONE


2016-06-20
----------
write a script that will track all the references from the idd_info.
look at this to see what function must be written to wrap over getreferingobjs

- open an issue for all this code.

write function to return all the surfaces of a zone
This is a generic problem in eppy:
- return all the subsurfaces of a surface
- return all the objects that use a schedule
- etc

So write a more generic function that will work with 'object-list' and 'reference' (as described in the idd file)


2016-06-19
----------
TODO : remove self.idd_groups from IDF - DONE
abstraction of getzonesurfaces() - DONE

referredobj 

referringobjs = []
referedobj has: -> Name
                -> reference    
for each obj in idf: 
[optional filter -> objects in iddgroup]
    each field of obj:
    [optional filter -> field in fieldlist]
        has object-list [refname]:
            if refname in reference:
                if Name = field value:
                    referringobjs.append() 



def getreferingobjs(referedobj, iddgroups=None, fields=None):
    referringobjs = []
    idf = referedidd.theidf
    referedidd = referedobj.getidd(Name)
    references = referedidd['references']
    idfobjs = idf.idfobjects.values()
    idfobjs = list(itertools.chain.from_iterable(values)) # flatten list
    if iddgroups: # optional filter
        idfobjs = [anobj for anobj in idfobjs 
            if anobj.getidd('key')['group'] in iddgroups]
    for anobj in idfobjs:
        if not fields:
            fields = anobj.objls
        for field in fields:
            itsidd = anobj.getidd(field)
            if itsidd.has_key('object-list'):
                refname = itsidd['object-list']
                if refname in references:
                    if referedobj.isequal('Name', anobj[field]):
                        referringobjs.append(anobj)
    return referringobjs
        
args = referedobj

def getrefereingobjs(referedobj):
    
referedidd = referedobj.getidd(Name)
references = referedidd['references']
referringobjs = [idfobj for idfobj in idf]
if iddgroup:
    referringobjs = [idfobj for idfobj in referringobjs if idfobj in iddgroup]
referringobjs = [idfobj for idfobj in referringobjs isrefering(idfobj)]

def isrefering(anobj):
    if not fields:
        fields = anobj.iddls
    for field in fields:
        itsidd = anobj.getidd(field)
        try:
            refname = itsidd['object-list']
            if refname in references:
                return True
        except KeyError as e:
            return False

2016-06-13
----------
write code to get the list of zone surfaces. - DONE
abstract this into generic code. 

2016-06-11
----------
- idd2groups is built and tested
- groups are embedded into commdct
- extract glist from commdct - DONE

maybe do the following:
    - now explore idd_parse to understand what it is doing. 
    - maybe use this as a way to rebuild parse_idd.extractidddata
    - call "block" -> "field"


2016-06-03
----------
access the idf in epbunch - DONE
trace surfaces of walls.
    - reference give another name for key.
        to find a reference, search all key.Name.reference
would be nice to do 
    - wall.Name.idd['reference']
    - OR -> wall.getidd(fieldname)['reference']
wall.Zone_Name.idd['object-list'] -> ZoneNames
search
    [value[0]. for key, value in idfobjects.items() if len(value) != 0]
refname2key(idf, refname)

- would be nice to have the group data in idd_info
    - either put it into the idddata
    or
    - have a separate data structure
- without the group data, the relavant lists have to be made by hand
- make a new branch to test this ?
- branch - brazil_iddgroups
data structure
{'group 1 name':[k1, k2, k3, k4], 'grout2':[k5, k6, k7], }
{k1:g1, k2:g2, k3:g3}
OR
objidd = [{"group":"gname", ...}, {... }, ....]

idd2groups is built - now where do I use it ?    




2015-07-22
----------
Notes for Eric.
git checkout develop
git branch dtemp
git checkout dtemp
-
- put MIT license in new files
- added some imports from __future__
- ran 2t03 conversions
- added test_height_surface.py
- ran pylint on new files (except tinynumpy)
    - Eric, run pylint on test_tinydnarray



2015-05-26
----------
Have a toggle that can force the line endings
idf.save(lineendings='default')
idf.saveas(fname, lineendings='default')

2014-08-05
----------
eppy can read fields dos path names with backslash '\' 
2014-08-04
----------
ran test for checking if eppy is reading all example files.
on a mac under EnergyPlus-8-1-0, the following files failed the read:

- 12 False 4ZoneWithShading_Simple_1.idf
- 13 False 4ZoneWithShading_Simple_2.idf
the above two files used a keyword "End Lead Input" 
the keyword was not in the IDD file. So it failed

- 168 False EMSUserDefined5ZoneAirCooled.idf
- 169 False EMSUserDefinedWindACAuto.idf
- 225 False HospitalBaselineReheatReportEMS.idf
- 355 False RetailPackagedTESCoil.idf
the above 4 files used extended fields
while testing the idd did not have the extended fields
So they failed

2013-12-21
----------
on testing with issue13 updates, ony three files could not be read:
['./issue13/LookupTables.idf', 
    './issue13/RefrigeratedWarehouse.idf',
    './issue13/RetailPackagedTESCoil.idf']
this is because they have the object "TABLE:MULTIVARIABLELOOKUP" 
This object can be read in version 8.1 onwards.
Now the code will have to check the version :-( for backward compatibility
How and where can I do that.
2013-12-20
----------
issue 13
see slashcomment.py
fixed by change in parse_idd
test by converting files in example set and comaring input and output.
Do this using master and branch issue13
2013-12-11
----------
working towards release 0.4.5
- update the fixed idd file version 8.
- update docs for new changes
- include function docs in sphinx
- release on git hub and on pypi


2013-10-03
----------
l = [1,2,3]
pop -> popidfobject(index)
remove -> removeidfobject(idfobject)
append -> appendidfobject(idfobject)
newidfobject(key) will append a brand new idf object

2013-10-02
----------
EpBunch.area does not pass an arg to the function.
How can I pass an arg to the function. - DONE
    for example EpBunch.checkrange(fieldname)

2013-09-25
----------
update by stephan

2013-09-24
----------
pytest will go above the last folder with __init__.py for an import
This will make the imports work correctly.

2013-09-21
----------
keep the remaining docs (loops and readhtml)
focus on development. 

2013-09-21
----------
made branch -> almost_master
This shouuld really be master, but I am not sure.
made brancch -> develop (made it now)
All development should be done here

2013-09-21
----------
notes on overriding list
- __add__ override ?
- __delattr__ remove some attributes ?
- __delitems__ overide ?
- __overide __delslce__ ?
- __iadd__ override?
- __mul__ override ?
- __setitem__ overide ?
- __setslice__ overide ?

2013-09-19
----------
TODO 
- tutorial for condensor loop and airside loop
- seperate tutorial on readhtml
- nedd a function that will do:
	idf.idfobjects[key].pop(0)
- 
- articulate the thinking on the software orgainzation.
	- the core code deals only with objects and fields
	- readhtml is a seperate package (for output reading)
	- buildhvac would be a seperate package
	-
	- these packages would have seperate tutorials



2013-09-03
----------
try import numpy
exception error message

pyparsing: give path name to 1.5 version

ex_loopdiagram.py does not do ideal loads systems - worth including this
2013-09-01
----------
Try to use this to work on a real project
branch to frog_impact

for sphinx:
- make html # I need to get the docs to go t a specific folder.

add to docstring:
- IDF class variables to be documented in the doc string.
- EpBunch variables also to be documented in doc string
2013-08-31
----------
registered at PyPi
- works with pip install eppy
needs a lot of fixes:
- tutorial is not current

.pypirc
[server-login]
username: santoshphilip
password: *********

from <http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/>
python setup.py register
python setup.py sdist upload

2013-08-25
----------
- don't add any enhancements to code
- get this ready for release
- work a bit on coverage
- get tests working from setup.py test
- do documentation from sphinx
- do readthedocs
- finally use cookie cutter
2013-08-25
----------
used test coverage from
http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/
need to follow up on this long term.

2013-07-21
----------
For graphs see
http://bl.ocks.org/mbostock/4015254
2013-07-21
----------
windows virtual install
- pip install virtualenv
- pip install virtualenvwrapper-win
2013-07-03
----------
copy an object from within the idf
copy an object from another idef
2013-06-21
----------
update all ex_*.py files to using IDF
or
archive them and make IDF using files
- do rename
- update the print
- update docs
- 
2013-06-11
----------
- build a branch with a list of components -> close to done -> DONE
- replace existing branch with new branch -> close to done -> DONE
-
- link to commdct in epbunch -> DONE
2013-05-31
----------
rname the repository into eppy
branch master into eplus_diagrams
eppy branch is default
make eppybranch the mastert
2013-05-27
----------
back to hvac loops
- need to make a pipe component in hvacbuilder.makeplantloop - DONE
2013-05-26
----------
I think d_newread.py is working. 
Reads idd only once.
    from fhandle and filename
put idd in a module and try to do pytests with that, reading the idd only once.
    DONE
2013-05-12
----------
IIDF now reads idd only once
it works with iddfilename, but not with iddfilehandle :-(
see d_newread.py
compare theidd (from readidf.readdatacommdct) in d_newread.py and d_filehandle.py
2013-05-09
----------
- IDF.setiddname(fhandle)
    this is failing because, fhandle is getting exhausted
    fhandle should get used only once. - how to do this ?
moke the pipe objects.
check if a new object can be made with named arguments. DONE
- fix the pytest that read a file
2013-05-08
----------
- fix makeplantloop to have make objects.
- make IDF.newidfobject with 


when you rename nodes do:
obj.nodefield = [oldnodename, newodename]
Then you can find the occurance of the old names in other places.

node rename
- exception at loop endpoints.
- How to identify them.
updatebranch(loop, branch, [c1, c2, c3, c4])
getinletname(loop, branch, c1) -> maybe None
getoutletname(loop, branch, c1) -> maybe None
do standard node name change
If None:
    replace that nodename
else:
    pass
    
    
2013-05-05
----------
branch
[] -> [p0]

[p0] -> [p1]
[p0] -> [p0, p1]
[p0] -> [p1, p0]

[p0, p1] -> [pn, p1]
[p0, p1] -> [p0, pn]
[p0, p1] -> [pn, p0, p1]
[p0, p1] -> [p0, p1, pn]
[p0, p1, p2] -> [p0, pn, p1, p2]

OR

replace the contents of the branch with a new list of components
[pump, chiller, coil] -> these items are EpBunch objects.
two options:
- rename all the nodes logically. 
    - 
    Problem is that nodes may be referred to at the controls. 

# remove this line
