-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add idf.copy and idf.deepcopy methods and tests #124
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #124 +/- ##
=========================================
Coverage ? 41.9%
=========================================
Files ? 52
Lines ? 5758
Branches ? 0
=========================================
Hits ? 2413
Misses ? 3345
Partials ? 0
Continue to review full report at Codecov.
|
Thoughts on APIMany of the users of eppy are not programmers. They write scripts to get something done. The API should read meaningfully to them. should there be a PS: I have not actually read your code yet. I am going off your comments and code in #118 API design driven by documentation and tutorialContinuing to think aloud here. My touchstone is to pretend I am writing a tutorial for this with the end user in mind. If it takes a lot to explain, the API design needs to be revisited. Zen of eppy for developers
|
I'll go ahead and
|
I totally agree with you on how writing documentation helps you rethink the API. I did the same thing when writing some docs for GeomEppy earlier this week - it's also why I like to document all my functions and methods well. My problems with your suggestion that I'm happy to have a crack at that, but I'm away now till Sunday night so will have to wait. |
I am moving to the conclusion that python's deepcopy is the wrong function for this. In eppy there is only a single copy of the idd. The idd and elements of the idd should not be copied. Python's deepcopy does not have the intelligence to do this. The most reliable way of making a copy of the IDF would be to save the idf to a StringIO (or file on disk) and open it again from the StringIO (or file on disk). It does not feel very elegant, but is rather pragmatic. |
Ok, that makes sense, and is what the code I submitted does for python 3, It's probably worth making a note that while On Sun, 11 Sep 2016, 07:32 santoshphilip, [email protected] wrote:
|
ae85145
to
c4d2c83
Compare
Implements #118