==============
Notes for eppy
==============



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

Notes on moving to uv from (and running with uv) https://x.com/i/grok?conversation=2002198771770290596


Moving to uv
============

    uv init
    uv add -r requirements.txt
    uv add --dev -r requirements_dev.txt
    uv sync

Running on uv
=============

    uv run python your_script.py
    uv run pytest                      # If you have tests
    uv run ruff check .                # If you added ruff as a dev tool


Updating on uv
==============

    uv lock --upgrade     # Update all packages to latest compatible versions
    uv sync               # Apply the updates to the environment

    uv add --dev ruff mypy pytest
    uv add requests
    
    uv run pip install ipython # for internal dev
                               # no need to publish in .toml
    
bumping a version and pushing branch and pushing tags
=====================================================

Maybe update HISTORY.rst before the release
  
::  

    uv version --bump patch/minor/major

    git commit -m "Bump version to $(uv version --short)"
    git tag "r$(uv version --short)"
    git push origin <branch>
    git push origin tag "r$(uv version --short)"

Now publish
===========

::
  
    uv build
    uv publish --token # token comes here



Lists of files changing when uv is used
=======================================

files changed::

    .github/workflows/tests.yml # for github actions
    eppy/__init__.py # version is got from pyproject.toml - see Note: below
    docs/requirements.txt # needed for readthedocs
    pyproject.toml # uv likes having everything here

    Note: to test __init__.__version__ you have to do 'uv pip install -e .'
    
Once uv is set up these files can be removed::

    requirements.txt
    requirements_dev.txt
    setup.cfg
    setup.py


Webhooks from github to readthdocs
==================================

- login to readthedocs using github
- copy webhooks and secret from readthedocs to github





2021-09-07
----------

testing the new github authentication
change 1
change 2

Hi @santoshphilip,

You recently used a password to access the repository at santoshphilip/eppy with git using git/2.24.3 (Apple Git-128).

Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.

Thanks,
The GitHub Team


Used github CLI to do this.
https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git

Steps to do the above 

- brew install gh	
- In the command line, enter gh auth login, then follow the prompts.
    - When prompted for your preferred protocol for Git operations, select HTTPS.
    - When asked if you would like to authenticate to Git with your GitHub credentials, enter Y.
    
    
2020-11-05
----------

notes on fixing bugs

- make a branch from develop called ixxx_name
- fix bug
- test with with E+ runs
- run black
- commit with fixed issue #xxx message
- add commit message to HISTORY.rst
- merge into branch develop
- git push origin develop
- delete branch ixxx_name

notes on releasing

- start with branch develop
- merge develop into master
- Add release number to HISTORY.rst
- do a git commit


# version number in eppy/__init__.py and setup.py
    # has to be in single quotes before running bumpversion
    # black makes it double quotes
# the comment about double quotes not true. latest version of bumpversion works with black
- bumpversion patch # major or minor or patch
- git log
- git tag r0.5.53
- git push origin r0.5.53
- git push origin master

make release in github
# look at previous release to see what to do
# copy release notes from HISTORY.rst. Use pandoc to convert from rst to md

make release in pypi (use make)

publish latest docs in readthedocs

- merge master into develop


# ----------------

Read the docs can do latest and stable
give links to latest and stable in README.rst

2020-08-30
----------

for only python3 version

python3 -m venv ~/venvs/eppy3_1  # first time
source ~/venvs/eppy3_1/bin/activate # all other times

removed six

2018-03-21
----------
On windows pip is giving a windowserror
solution:
- python -m pip -r requirements.txt
----
- EPPY_INTEGRATION=TRUE
- export EPPY_INTEGRATION
becomes
- setx EPPY_INTEGRATION TRUE
and
- unset EPPY_INTEGRATION
becomes
- setx

2017-09-07
----------
small change to run tests on travis
2017-02-09
----------
an install failed because setup.py did not include folder runner 
The unit tests do not catch this because it is running within the code
Such a bug is likely to happen again, so we need some process to catch this.
2016-09-06
----------
to run integration tests on mac:
do the follwing in your shell:
- EPPY_INTEGRATION=TRUE
- export EPPY_INTEGRATION
now integration test will not be skipped
to skip do:
- unset EPPY_INTEGRATION

python 3:
python3 -m venv ~/venvs/eppy3  # first time
source ~/venvs/eppy3/bin/activate # all other times

2016-05-29
----------
set up integration tests for open and save of files
maybe use find_idd from i41_idfnew. also Add to license. 
build it up simple to get the pieces in place.
2016-02-13
----------
look into 
- mock testing
- integration testing
- tox
some links:
- https://blog.fugue.co/2016-02-11-python-mocking-101.html
- http://pytest.org/latest/monkeypatch.html
- https://pypi.python.org/pypi/pytest-mock
- http://enterprisecraftsmanship.com/2015/07/13/integration-testing-or-how-to-sleep-well-at-nights/
- http://pythontesting.net/strategy/why-most-unit-testing-is-waste/
2016-02-05
----------
merge from jamiebull1-i68_latin-1-encoding after this
2014-10-19
----------
made a new branch i31_loopdiagram for issue 31
2015-02-20
----------
doing pylint
- I don't have full coverage in pytest
- make pytest out of documentation examples
2015-01-14
----------
Check Alex Martelli's response in 
<http://stackoverflow.com/questions/3487434/overriding-append-method-after-inheriting-from-a-python-list>
to understand how to use collections.MutableSequence

2015-01-01
----------
Need following people
- eppy release master -> formally releases each version
- Energyplus release test master -> test eppy with each release of Energyplus
- Documentation Keeper -> maintains and releases documentation
- Project master -> coordinates any projects that is built with eppy
- Python3 master -> migration and maintainance of python3 version
Also need:
- eEP -> eppy Enhancement Proposal -> named after Python Enhancement Proposal (PEP) 
2014-12-12
----------
need stub files to quickly open a file
put then in stub folder
2014-08-26
----------
Development tasks

- core programming and development
    - docuementation
    - 
- python 3    
- useful scripts
- hvac modules - testing and development
- outputs 
- output graphing
- input graphing
- input calculations
- web gui example ?
- 
2014-08-20
----------
- review the code to get a global understanding of it
- document the larger structure so that others can work on it
- fix the quick hacks
- revisit the strategies and data structure used

2013-11-24
----------
need a default setting for idd (maybe the latest one)
open a new file -> IDF.initnew() -> DONE
readfile -> IDF.initread(fname) -> DONE
readtxt -> IDF.inittxt(idftxt) -> DONE
2013-09-09
----------
***** possible bug ? ********
mats = idf.idfobjects["MATERIAL"]
mats.pop()
removes it from mats, but does not remove it from idf.model.dt

2013-07-03
----------
Notes for conf call
- all functionality complete.
- documentation complete (more complex examples should be included)
- plant loop is done (a ir loop and condenser loop not yet done - plant loop was non trivial)

to be done:
install instructions needed.


2013-06-21
----------
using idd version 8.0.0
had to remove non-unicode chars in the idd file
passes all unittest after minor change in one test
2013-05-30
----------
notes for conf call

all tasks for completion of project
- update docs
- HVAC loop Builder (at component, branch and loop level)
- finish up remaining functions (rename, any others ?, comment in save)

Tasks done:
update docs -> ongoing
HVAC
- loop level API
    - loop builder done for plant loop
- branch level API
    - build a branch with a list of components -> close to done -> DONE
    - replace existing branch with new branch -> close to done -> DONE
- component level API
    - branch level API can be used to do this -> discuss -> DONE
-----------
Background work done:
- put GPL license in all code files
- unit tests updated so that tests can be done with any version of IDD. 
This was hard coded earlier with IDD snippets embedded in the test. Different test were using different versions of IDD.

tasks to be done:
- complete items that are close to done
- finish up remaining functions
- update docs
- traversing the loop
- clean up the github branches so that you can send the link to anyone.
- JUNE end as completion. 

2013-05-30
----------
some thoughts:
- need a good way of calling things:
    - "ZONE" = objkey ?
    - "Plenum" = anobject ?
- how to deal with case in the fields
    - some fields are case sensitive
    - case should be retained
    - comparisons should be case insensitive, except in retaincase
    - need to find if retaincase is true.
- need philosophy on this:
    - I have 3 levels of editing
    - lowest is -> data, commdct
    - mid -> bunchdt
    - high -> IDF
2013-05-08
----------
when you rename nodes do:
obj.nodefield = [oldnodename, newodename]
Then you can find the occurance of the old names in other places.

2013-05-07
----------
loopname = "p_loop"
sloop = ['sb0', ['sb1', 'sb2', 'sb3'], 'sb4']
dloop = ['db0', ['db1', 'db2', 'db3'], 'db4']
makeplantloop(idf1, loopname, sloop, dloop)

2013-05-04
----------
L = constr.Layer_5 # Layer_5 may not exist in data.dt
L = constr["Layer_5"] # Layer_5 may not exist in data.dt
L = constr.Layer5 # there is a typo in the field name
L = constr["Layer5"] # there is a typo in the field name
constr.Layer_5 = 'B52' # Layer_5 may not exist in data.dt
constr["Layer_5"] = 'B52' # Layer_5 may not exist in data.dt

    Plan an appropriate response for each of the above.

L = constr.Layer_5 # Layer_5 may not exist in data.dt
    # return None ?
    # return '' ? -> maybe this one ? # DONE this
    # throw exception ? 
L = constr["Layer_5"] # Layer_5 may not exist in data.dt
    # same as above
    # DONE as above
L = constr.Layer5 # there is a typo in the field name
    # Throw exception "BadEPFieldError"
    # DONE
L = constr["Layer5"] # there is a typo in the field name
    # Throw exception "BadEPFieldError"
    # DONE
constr.Layer_5 = 'B52' # Layer_5 may not exist in data.dt
    # you should be able to put a value in.
    # if Layer_4 also does not exit, make it ''. 
    # DONE
constr["Layer_5"] = 'B52' # Layer_5 may not exist in data.dt
    # same as above
    # DONE
    
2013-05-02
----------
dev. notes on hvac loops
- plant side components can be replaced/deleted in branch
- air side components have to be replaced in equipment list
2013-04-24
----------
- give links to python. 
- find and replace
- do the loops branches from contract.

2013-04-24
----------
Notes for conf. call

x
Bad News
- Issue of node following in HVAC
- it has not been possible to come up with a generic node-following code.
- will speak about this on call
- 
- have not explored 3-D API (such as resizing windows)
2013-04-23
----------
write the following functions
- rename
- import one
- import attached
- find attached
- find reference
- check obj equal
- justrename if equal
2013-04-20
----------
fuck ... I am trying to make this too complicated.
Keep it simple.
model, toprint, idd_info = idfreader(fname1, iddfile)
toprint = is the real model
model = allows you to access objects and change fields
    it does not allow you to add or delete objects
----
class IDF
idf = IDF(iddfilename)
model = idf.read(idffilename)
print model
str(model)
CRUD
model.create("ZONE", "zonename") # will be last zone in list of zones
model.read -> azone = model.objects["ZONE"][0]
model.update -> azone.Name="gumby"
model.delete(azone)

2013-04-20
----------
TODO today
- import export
- reference following and name change
    - ref to, ref from
- elimination parametrics
- simple HVAC replacement
- try complex HVAC replacements
- pip install
- directory reorganize for simplicity.
- test other EEM measures
2013-03-25
----------
to save the docs as html
- open ipython notebook in firefox
- go to print view
- save as html. 
2013-03-18
----------
change git editor to textmate using
git config --global core.editor "mate -w"

=======
2013-03-15
----------
Agenda for call
- Status of pyenergyplus
- Next updates
- timeline
- Contractual issues

State of pyenergyplus:
----------------------
- Object API is complete
- Geometry API is complete
- HTML Table output reader complete
- Example files to illustrate API use is complete

Next updates:
two possibilities:
(time and resources may be enough for only one of the following)
1. streamline install and usage:
    - full install thru pip using the following command
        - pip install energyplus 
    - maybe restructure or code to make it simpler for a first time user.
2. Cookbook of recipes
    - Use the EEM list from this project to generate recipes.
    - Additional functions may be added to the API to facilitate the recipes
    
Contractual Issues
------------------
Contract asks for a report at each stage. What should I do for this.
How should I stage this ?


do a name change API
resizes window. 
3D-API
hmtl table -> better example
import.
node following code.
reference following code.
more examples
call in two weeks.

TODO.
draft of documentation.
node following code.
reference following code.

2013-02-28
----------
- Consider using https://bitbucket.org/birkenfeld/ipython-physics/
- see tutorial in http://www.southampton.ac.uk/~fangohr/blog/physical-quantities-numerical-value-with-units-in-python.html
    
 
2013-02-28
----------
- Consider using https://bitbucket.org/birkenfeld/ipython-physics/
- see tutorial in http://www.southampton.ac.uk/~fangohr/blog/physical-quantities-numerical-value-with-units-in-python.html
>>>>>>> 70d10350f23085a225a91b857335539f4a666b86
2013-01-31
----------
Next release:
ongoing todo list
- release notes
- update ex_addobject.py - DONE
- add ex_readoutput.py
- any other examples to update ?

2013-01-29
----------
from virtualenv do
python -m pytest
to run py.test
2013-01-04
----------
include type conversions - DONE
2013-01-03
----------
unit test needed for examples. - DONE

2012-11-26
----------
code review with Tuan and Nathan

2012-11-25
----------
some tasks in sequence.
1. factor the code in iddgaps.py
it is hard to make sense of it now.

2. Also it is not filling the gaps in all objects.
update to fix this

3. Once above is done, use it in bunch2data.py

2012-11-21
----------
Notes from conference call with Jason Glazer:
- Scripting library to be called PyEnergyplus
- Jason needs to use the software to generate files for the following criteria:
	1. internal loads (people, lights, process, schedules etc.)
	2. envelope (skin, construction, windows size, shading elements etc.)
	3. Climate
	4. Geometry
	5. HVAC
- All of the above except Climate can be done by pyenergyplus object API
- climate/weather file should be changed during the energy simulation
- To do this we need to be able to run energyplus from pyenergyplus
- then look at the results and be able to another run
- It would be useful to get a signal back from energyplus, when the simulation is complete

The tasks to be completed are:
1. Object API
2. Geometry API
3. Output Reader
4. HVAC API (beyond the Object API)
5. Documentation (code docs, user docs, tutorial)

Of the above we have proof of concept for 1, 2, 3.

Schedule:
- Dec 15th
	- Object API
	- corresponding user docs
- Jan 21st
	- Object API (any updates)
	- Geometry API
	- Output reader (atleast for ABUPS)
	- corresponding user docs
