Skip to content
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

write functions that work work when numpy is not installed #30

Closed
santoshphilip opened this issue Oct 13, 2014 · 106 comments
Closed

write functions that work work when numpy is not installed #30

santoshphilip opened this issue Oct 13, 2014 · 106 comments
Assignees

Comments

@santoshphilip
Copy link
Owner

There are geometry functions in ./eppy/geometry that use numpy.
It can be difficult to install numpy at times (for instance if you want to run epp in rhino http://www.rhino3d.com)

  • rewrite the those functions to run without numpy.
  • test if numpy is installed (use <try .. except> block to check)
  • if it is not installed, use the new functions
@eayoungs
Copy link
Collaborator

I've taken the first stab at re-writing the np.cross() function in Python, including a new test function.

They are located in the py_numeric.py and test_py_numeric.py files, respectively, within the geometry/ and tests/geometry_tests folders on the new 'i30_pythongeometry' branch.

@eayoungs
Copy link
Collaborator

I've updated the style of my code to conform with PEP-8. surface.py itself has some non-conformities but I updated the module to conform up to the point that I need to modify (the import statements). I plan to ignore the rest of the module for now. Please confirm this is the recommended approach

I'd like to modify it's test prior to modifying the surface.py module. My first inclination is to set up a virtual environment where numpy is not installed so that the try statement will fail but I'm not sure how to make this an explicit part of the test.

Please advise.

@eayoungs
Copy link
Collaborator

eayoungs commented Dec 4, 2014

Can I assume that all vectors passed to the 'cross' function (cross product) are going to be 3-dimentional? This would greatly simplify the function. Also, can I assume this for any (or all) of the other numpy functions used?

The original author of the Geometry library, Tuan Trang replied in an offline email that this is a valid assumption, so I have continued based on this information.

@eayoungs
Copy link
Collaborator

eayoungs commented Dec 9, 2014

I added a dot product function & test today.

@santoshphilip
Copy link
Owner Author

Eric,
I am in India. I have the code with me. My response time will be slow.

S.

Sent from my iPad

On Dec 9, 2014, at 2:08 PM, Eric Youngson notifications@github.com wrote:

I added a dot product function & test today.


Reply to this email directly or view it on GitHub.

@eayoungs
Copy link
Collaborator

No worries Santosh. I need to start on documentation and expanding test
cases.

On 12/11/14 2:04 PM, santoshphilip wrote:

Eric,
I am in India. I have the code with me. My response time will be slow.

S.

Sent from my iPad

On Dec 9, 2014, at 2:08 PM, Eric Youngson notifications@github.com
wrote:

I added a dot product function & test today.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#30 (comment).

@eayoungs
Copy link
Collaborator

I've revised the vector cross product function and tests to use exception handling and assert that exceptions are raised in the tests. I just got the tests to pass and will be moving on to use the same pattern to revise the rest of the functions I've written so far (dot product, determinant) before moving on to other functions.

Please review and advise as to weather the current approach is satisfactory before I move on

Thx!

Eric

@santoshphilip
Copy link
Owner Author

Awesome !
I'll review and respond.

Santosh.

Sent from my iPad

On May 9, 2015, at 8:09 PM, Eric Youngson notifications@github.com wrote:

Santosh

I've revised the vector cross product function and tests to use exception handling and assert that exceptions are raised in the tests. I just got the tests to pass and will be moving on to use the same pattern to revise the rest of the functions I've written so far (dot product, determinant) before moving on to other functions.

Please review and advise as to weather the current approach is satisfactory before I move on

Thx!

Eric


Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

Eric,
You are on the right track. Please continue.

I have some thoughts on coding style (PEP 8)
But please do not do anything about code style right now.
There automated tools to review the style and update.
Once you are finished we will apply those tools.

Looks like you are getting close to wrapping this up.

Santosh

@eayoungs
Copy link
Collaborator

Great! Thanks for the feedback. I feel like I'm starting to get the hang of it.

@santoshphilip
Copy link
Owner Author

Eric,    You have been programming rather defensively so far, trying to get things right.You are on the right track.You can now code a little more aggressively now.
In fact that is the thinking behind unit testing.- you write the test first- the test will fail because you have no code- write the code- the test may succeed or fail- write more tests and continue- stop when you think it is good enough - not when it is perfect.
Basically you making the computer catch your mistakes.
Later you clean the style, refactor, document better etc.
At the end you transition to python3.

Santosh

@eayoungs
Copy link
Collaborator

Sounds good. I will keep that in mind and try to follow your advice. Sounds like the idea is to move more quickly and allow for more experimentation. I'm excited to start a new phase in my coding!

@eayoungs
Copy link
Collaborator

Santosh,

I started writing the replacement to numpy.array(), which encompasses a lot of functionality. I was thinking I might need to write a class since there are many methods associated with it.

Then I took a look at where it's actually used within eppy. I only find references to it in the int2lines module. Furthermore, I don't see it imported or even referenced anywhere else in the project. If this is the case, I wonder if there is a good justification for re-implementing it in pure Python. I will move on to the last 2 numpy functions used; square root, and arc-cosine.

Cheers

Eric

@santoshphilip
Copy link
Owner Author

don't write anything you don't have to
Also see if you can find the other function in the math library
do
import math
and check

@vinc85
Copy link

vinc85 commented Jun 15, 2015

How can I import eppy in a java web application using Jython, with dependencies of numpy? thanks

@santoshphilip
Copy link
Owner Author

Eric,
To get a background in this, take a look at issue #48
and my comment in
https://groups.yahoo.com/neo/groups/eppy/conversations/messages/3

Vinc85 can use eppy in jython once you remove the numpy dependency.
Essentially once you are done with this and close this issue.

Vinc85 is wondering when that will happen :-)
Seems to me that you are very close to being done

@eayoungs
Copy link
Collaborator

Yes, I was just looking into this. I was able to replace the remaining numpy dependencies with the Python native library, "math" so essentially I am done. I was working on a custom exception for singular matrices. Right now I've compromised and simply manually raised the base Exception class when the determinant is zero.
I wonder if I/we should do some integration testing?
vinc85 if you want to use the code, it should all be available in the most recent commit of the branch: "i30_pythongeometry"

vinc85: Great timing! This is quite validating and makes my work seem very useful. It's quite gratifying.

Cheers

Eric

@santoshphilip
Copy link
Owner Author

If it passes all the unit tests without installing numpy, you are done

@eayoungs
Copy link
Collaborator

Cool! I will set up a virtual environment and run the tests, then.

@vinc85
Copy link

vinc85 commented Jun 16, 2015

Many thanks Eric, I have tested eppy "i30_pythongeometry" and it seems to work without the library numpy.
I hope it works now importing eppy in my java web application in Netbeans. I urge to run eppy on Web server.

 Il Martedì 16 Giugno 2015 1:27, Eric Youngson <notifications@github.com> ha scritto:

Cool! I will set up a virtual environment and run the tests, then.—
Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

Also test if all the code in ./docs/Main_Tutorial.ipynb work.
Open it up in ipython notebook and run all the cells.

@vinc85
Copy link

vinc85 commented Jun 17, 2015

Dear all,I have imported a new version of eppy (without numpy dependecies) in a Java Web Application and when I doing this
iddfile = request.getContextPath() + '/Energy+V7_2_0.idd'fname1 = request.getContextPath() + '/smallfile.idf'IDF.setiddname(iddfile)idf1 = IDF(fname1)
I have this error:
Traceback (most recent call last):
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/serv.py", line 18, in doPost
idf1 = IDF(fname1)
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 615, in init
super(IDF3, self).init(idfname)
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 560, in init
super(IDF2, self).init(idfname)
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 488, in init
super(IDF1, self).init(idfname)
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 442, in init
self.read()
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 472, in read
readout = idfreader1(self.idfname, self.iddname,
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/idfreader.py", line 148, in idfreader1
versiontuple = iddversiontuple(iddfile)
File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/idfreader.py", line 35, in iddversiontuple
line1 = fhandle.readline()
AttributeError: 'unicode' object has no attribute 'readline'
Why?
Many thanks.

 Il Mercoledì 17 Giugno 2015 1:44, santoshphilip <notifications@github.com> ha scritto:

Also test if all the code in ./docs/Main_Tutorial.ipynb work.
Open it up in ipython notebook and run all the cells.—
Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

vinc85,
I have reformated your reply to make it more readable.
see
https://guides.github.com/features/mastering-markdown/
on how to do this

vince85's reply reformatted

Dear all,I have imported a new version of eppy (without numpy dependecies) in a Java Web Application and when I doing this

iddfile = request.getContextPath() + '/Energy+V7_2_0.idd'
fname1 = request.getContextPath() + '/smallfile.idf'
IDF.setiddname(iddfile)
idf1 = IDF(fname1)

I have this error:

Traceback (most recent call last):
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/serv.py", line 18, in doPost
    idf1 = IDF(fname1)
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 615, in __init__
    super(IDF3, self).__init__(idfname)
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 560, in __init__
    super(IDF2, self).__init__(idfname)
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 488, in __init__
    super(IDF1, self).__init__(idfname)
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 442, in __init__
    self.read()
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/modeleditor.py", line 472, in read
    readout = idfreader1(self.idfname, self.iddname,
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/idfreader.py", line 148, in idfreader1
    versiontuple = iddversiontuple(iddfile)
  File "/Users/vincenzo/NetBeansProjects/ProvaPython/build/web/eppy/idfreader.py", line 35, in iddversiontuple
    line1 = fhandle.readline()
AttributeError: 'unicode' object has no attribute 'readline'

@santoshphilip
Copy link
Owner Author

vinc85,
That looks like a bug to me. I'll try to fix it in this branch

@vinc85
Copy link

vinc85 commented Jun 17, 2015

Ok, but I have not this error if I run eppy on desktop and not on a Web Application?Why?
Many thanks.

 Il Mercoledì 17 Giugno 2015 16:48, santoshphilip <notifications@github.com> ha scritto:

vinc85,
That looks like a bug to me. I'll try to fix it in this branch—
Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

It works if the filename is a string
Does not work if the filename is in unicode
see here about string and unicode:
https://docs.python.org/2/howto/unicode.html

java is sending the filename in unicode, while the desktop script is sending it in string

eppy should work with unicode too.
This needs to be fixed.

@vinc85
Copy link

vinc85 commented Jun 17, 2015

It's true!!! ;-)

 Il Mercoledì 17 Giugno 2015 17:06, santoshphilip <notifications@github.com> ha scritto:

It works if the filename is a string
Does not work if the filename is in unicode
see here about string and unicode:
https://docs.python.org/2/howto/unicode.htmljava is sending the filename in unicode, while the desktop script is sending it in stringeppy should work with unicode too.
This needs to be fixed.—
Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

vince85, try it now.

eayoungs (Eric), unit test is failing if I run it with numpy installed.
Can you look into this ?

Santosh

@vinc85
Copy link

vinc85 commented Jun 17, 2015

I don't understand...

 Il Mercoledì 17 Giugno 2015 17:52, santoshphilip <notifications@github.com> ha scritto:

vince85, try it now. eayoungs (Eric), unit test is failing if I run it with numpy installed.
Can you look into this ?Santosh—
Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

I am still not getting an install for tinynumpy

(eppy_nonumpy)Santoshs-Air:~ santoshphilip$ pip install tinynumpy
Downloading/unpacking tinynumpy
  Could not find a version that satisfies the requirement tinynumpy (from versions: 1.2.0.dev3)
Cleaning up...
No distributions matching the version for tinynumpy
Storing debug log for failure in /Users/santoshphilip/.pip/pip.log

shall I try to set up a temporary pipy account for tinynumpy (I'll call it tinynumpy_test or something). Just to see if I can get it to work.

@eayoungs
Copy link
Collaborator

Ugh! I thought I tested it on my Ubuntu machine, too. Let me check into it. This week is a little tight but I should be able to get to it in the next day or two.
I apologize for all the back & forth but I think it's key that I get this right, especially since my next task is to get the Python3 package working.

Thanks for staying in touch about this issue!

Eric

@eayoungs
Copy link
Collaborator

Santosh,
Here's what I get on my Ubuntu machine:

(test_tnp)eayoungs@pinky:~$ pip install tinynumpy
Collecting tinynumpy
Downloading tinynumpy-1.2.0.dev3.tar.gz
Building wheels for collected packages: tinynumpy
Running setup.py bdist_wheel for tinynumpy
Stored in directory: /home/eayoungs/.cache/pip/wheels/9e/93/24/ade532b9bd77231fb222c4c1f6e62947014e568429bd76fcf3
Successfully built tinynumpy
Installing collected packages: tinynumpy
Successfully installed tinynumpy-1.2.0.dev3

All tests pass on Ubuntu with both setups, too.
Can someone else test this? @jamiebull1 @vinc85

@santoshphilip
Copy link
Owner Author

Eric, I tracked down the problem.

From my error log:

https://pypi.python.org/simple/tinynumpy/), version 1.2.0.dev3 is a pre-release (use --pre to allow).

It installs if I do:

pip install --pre tinynumpy

For eppy to install it, it should work without the "--pre".
If you are comfortable enough with the release, can you make a release that is not a pre-release ?

@eayoungs
Copy link
Collaborator

Interesting. I didn't use that flag, but I'll check with @wadetb (tinynumpy) and see if I can get this updated on PyPI. It may be late this week or early next.

@santoshphilip
Copy link
Owner Author

I am attaching my error log, if it helps.
pip.txt

@santoshphilip
Copy link
Owner Author

Maybe this is happening because the word "dev" is in the version number.

the DOAP record: tinynumpy-1.2.0.dev3.xml says

<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>tinynumpy</name>
<shortdesc>A lightweight, pure Python, numpy compliant ndarray class</shortdesc>
<homepage rdf:resource="https://github.com/wadetb/tinynumpy" />
<maintainer><foaf:Person><foaf:name>Wade Brainerd, Almar Klein</foaf:name>
<foaf:mbox_sha1sum>2d85bb5e3da728bde551ac136e647bd44cd904fa</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.2.0.dev3</revision></Version></release>
</Project></rdf:RDF>

try without the word "dev" in the version number.
It might fix the issue

@eayoungs
Copy link
Collaborator

Sorry for the delay; I'll give it a try today.

@eayoungs
Copy link
Collaborator

Give it a try now; I've removed the "dev3" from the package name.

@santoshphilip
Copy link
Owner Author

Yes ! It works

@santoshphilip
Copy link
Owner Author

in branch i30_pythongeometry all tests pass

  • with tinynumpy installed and
  • without numpy installed

I have lost track of what to merge, since this is an old issue. My recollection is that this was already merged into branch develop. I'll try to spend some time update myself on the state of this issue

@eayoungs
Copy link
Collaborator

Great! I think I've got all the changes in the eayoungs branch. If the current state of that branch has been merged, then we're likely up to date.

Now I can move on to getting the Python 3 version of eppy available on PyPI

@santoshphilip
Copy link
Owner Author

Eric,
I was looking thru branch eayoungs and some thoughts:

  • requirements.txt should have tinynumpy in it
  • tinnumpy should be removed from eppy (and any associated tests for tinynumpy)
  • the import statements for tinynumpy will need an update (or pytest will fail)
  • after you do this, all pytest should pass

I tested the merge and I am not seeing conflicts arising from doing the merge into develop

@eayoungs
Copy link
Collaborator

Santosh,
I had made most of those changes previously but somehow stashed the changes when I undid the changes to the develop branch.
Anyway, I reapplied the changes and added tinynumpy>=1.2.0 to requirements.txt. All tests still pass with and without numpy. All commits have been pushed to eayoungs branch should now be available on Github.

Cheers

Eric

@santoshphilip
Copy link
Owner Author

Thanks. I'll test and then merge into develop.
will close this issue once that is done

@santoshphilip
Copy link
Owner Author

Some import statements need to be updated.
I have tinynumpy installed:

(tinynumpy)Santoshs-MacBook-Air:eppy santoshphilip$ python 
Python 2.7.6 (default, Apr  9 2014, 11:48:52) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tinynumpy
>>> 

py.test gives the following errors

(tinynumpy)Santoshs-MacBook-Air:eppy santoshphilip$ py.test
============================= test session starts ==============================
platform darwin -- Python 2.7.6, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /Users/santoshphilip/Documents/coolshadow/eppy, inifile: setup.cfg
collected 12 items / 12 errors 

eppy/tests/test_bunchhelpers.py ....
eppy/tests/test_iddgaps.py .
eppy/tests/test_readhtml.py ......
eppy/tests/EPlusInterfaceFunctions_tests/test_parse_idd.py .

==================================== ERRORS ====================================
___________________ ERROR collecting eppy/tests/test_IDF.py ____________________
eppy/tests/test_IDF.py:18: in <module>
    from eppy.modeleditor import IDF0
eppy/modeleditor.py:17: in <module>
    from eppy.idfreader import idfreader1
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
______________ ERROR collecting eppy/tests/test_bunch_subclass.py ______________
eppy/tests/test_bunch_subclass.py:682: in <module>
    import eppy.idfreader as idfreader
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
_________________ ERROR collecting eppy/tests/test_examples.py _________________
eppy/tests/test_examples.py:15: in <module>
    from eppy.idfreader import idfreader
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
_______________ ERROR collecting eppy/tests/test_hvacbuilder.py ________________
eppy/tests/test_hvacbuilder.py:15: in <module>
    import eppy.hvacbuilder as hvacbuilder
eppy/hvacbuilder.py:17: in <module>
    import eppy.modeleditor as modeleditor
eppy/modeleditor.py:17: in <module>
    from eppy.idfreader import idfreader1
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
________________ ERROR collecting eppy/tests/test_idfreader.py _________________
eppy/tests/test_idfreader.py:15: in <module>
    import eppy.idfreader as idfreader
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
_______________ ERROR collecting eppy/tests/test_modeleditor.py ________________
eppy/tests/test_modeleditor.py:18: in <module>
    from eppy.modeleditor import IDF
eppy/modeleditor.py:17: in <module>
    from eppy.idfreader import idfreader1
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
________________ ERROR collecting eppy/tests/test_simpleread.py ________________
eppy/tests/test_simpleread.py:14: in <module>
    import eppy.simpleread as simpleread
eppy/simpleread.py:14: in <module>
    import eppy.modeleditor as modeleditor
eppy/modeleditor.py:17: in <module>
    from eppy.idfreader import idfreader1
eppy/idfreader.py:20: in <module>
    import eppy.function_helpers as fh
eppy/function_helpers.py:17: in <module>
    from eppy.geometry import surface as g_surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
_________ ERROR collecting eppy/tests/geometry_tests/test_area_zone.py _________
eppy/tests/geometry_tests/test_area_zone.py:12: in <module>
    import eppy.geometry.area_zone as area_zone
eppy/geometry/area_zone.py:18: in <module>
    import eppy.geometry.surface as surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
__________ ERROR collecting eppy/tests/geometry_tests/test_surface.py __________
eppy/tests/geometry_tests/test_surface.py:12: in <module>
    import eppy.geometry.surface as surface
eppy/geometry/surface.py:27: in <module>
    from . import tinynumpy as np
E   ImportError: cannot import name tinynumpy
________ ERROR collecting eppy/tests/geometry_tests/test_volume_zone.py ________
eppy/tests/geometry_tests/test_volume_zone.py:17: in <module>
    import eppy.geometry.volume_zone as volume_zone
eppy/geometry/volume_zone.py:25: in <module>
    from eppy.geometry.tinynumpy import dot as dot
E   ImportError: No module named tinynumpy
_______ ERROR collecting eppy/tests/tinynumpy_tests/test_tinyndarray.py ________
eppy/tests/tinynumpy_tests/test_tinyndarray.py:13: in <module>
    import eppy.geometry.tinynumpy as tinynumpy
E   ImportError: No module named tinynumpy
________ ERROR collecting eppy/tests/tinynumpy_tests/test_tinynumpy.py _________
eppy/tests/tinynumpy_tests/test_tinynumpy.py:16: in <module>
    import eppy.geometry.tinynumpy as tnp
E   ImportError: No module named tinynumpy
===================== 12 passed, 12 error in 0.87 seconds ======================
(tinynumpy)Santoshs-MacBook-Air:eppy santoshphilip$ 

@eayoungs
Copy link
Collaborator

That's odd. First off, there shouldn't be any tinynumpy tests in the project anymore. I just checked quickly and there are commits on my machine that weren't pushed out. I've done that now and will check more closely this afternoon.

@eayoungs
Copy link
Collaborator

Santosh,
I've applied the changes to import directly from the pip installed module, but I'm getting an error related to the linalg module in the tinynumpy project. It is a separate file to mimic the structure of numpy and maximize the reuse of code with either numpy or tinynumpy.
Unfortunately I seem to have named the module tinylinalg instead of linalg, which is causing an error of it's own. I will have to change this in the tinynumpy project and revise the project on PyPI.

@santoshphilip
Copy link
Owner Author

give ma a heads up when you are done with that.
I'll run the tests again.

I am traveling most of December and may be out of contact. We should get some momentum on the python3 stuff before that. (completing the tinynumpy stuff is a precursor to that)
I'll put together some notes in the developer documentation about the present state of python3 version

@eayoungs
Copy link
Collaborator

I've been thinking about it and it should be just a matter of adjusting the import statement in eppy, hopefully without modifying tinynumpy
Well, that will give me some motivation to wrap this up and get started on the Python 3 issues by the end of the month. I've been distracted by work, but the good news is I've been using Python & R at work so my programming skills should have at least held, rather than degrading. ;-)

Eric

@eayoungs
Copy link
Collaborator

OK. I just made the changes to a few import statements and all tests path in both virtual environments (with numpy only, and with tinynumpy only).
Let's try this one more time!

Happy Thanksgiving!

@santoshphilip
Copy link
Owner Author

Will test it. Then we will be ready for the python3 transition.

Santosh.

Sent from my iPad

On Nov 26, 2015, at 12:03 PM, Eric Youngson notifications@github.com wrote:

OK. I just made the changes to a few import statements and all tests path in both virtual environments (with numpy only, and with tinynumpy only).
Let's try this one more time!

Happy Thanksgiving!


Reply to this email directly or view it on GitHub.

@santoshphilip
Copy link
Owner Author

Yessss !!!

  • tests pass with numpy
  • test pass without numpy

I'll take steps to make this part of the develop branch

@santoshphilip
Copy link
Owner Author

Eric,
I was reviewing you code changes and I see some extra files. They are listed below:

  • eppy/geometry/plan.md
  • eppy/redict_subclass.py
  • eppy/tests/test_cons_uval.py
  • eppy/tests/test_redict_subclass.py
  • eppy/useful_scripts/InputSim/ASHRAE90.1_SchoolPrimary_STD2007_Salem.idf
  • eppy/useful_scripts/InputSim/90.1-07_PrimSch.idf
  • eppy/useful_scripts/InputSim/ASHRAE90.1_SchoolPrimary_STD2007_Salem.idf
  • eppy/useful_scripts/InputSim/eppy-useful_scripts-test.ipynb
  • eppy/useful_scripts/cons_uval.py
  • eppy/useful_scripts/internal_loads.py

looks like most of them are from scripting you were doing.
Are any of them useful to keep in eppy? (cons_uval.py looked interesting)
it would be nice to have:

surface.uvalue() # based on cons_uval.py

@eayoungs
Copy link
Collaborator

Great! So glad to hear it.
On Nov 26, 2015 10:22 PM, "santoshphilip" notifications@github.com wrote:

Yessss !!!

  • tests pass with numpy
  • test pass without numpy

I'll take steps to make this part of the develop branch


Reply to this email directly or view it on GitHub
#30 (comment).

@eayoungs
Copy link
Collaborator

Yes. I was so excited, and it was Thanksgiving, so I forgot to clean things
up before pushing.
I believe that was the intention of the script. I'll take a look and see
what it needs.
I'm out of town until tomorrow, but I'll check in when I get back to town.
On Nov 26, 2015 10:47 PM, "santoshphilip" notifications@github.com wrote:

Eric,
I was reviewing you code changes and I see some extra files. They are
listed below:

  • eppy/geometry/plan.md
  • eppy/redict_subclass.py
  • eppy/tests/test_cons_uval.py
  • eppy/tests/test_redict_subclass.py

    eppy/useful_scripts/InputSim/ASHRAE90.1_SchoolPrimary_STD2007_Salem.idf
  • eppy/useful_scripts/InputSim/90.1-07_PrimSch.idf

    eppy/useful_scripts/InputSim/ASHRAE90.1_SchoolPrimary_STD2007_Salem.idf
  • eppy/useful_scripts/InputSim/eppy-useful_scripts-test.ipynb
  • eppy/useful_scripts/cons_uval.py
  • eppy/useful_scripts/internal_loads.py

looks like most of them are from scripting you were doing.
Are any of them useful to keep in eppy? (cons_uval.py looked interesting)
it would be nice to have:

surface.uvalue() # based on cons_uval.py


Reply to this email directly or view it on GitHub
#30 (comment).

@santoshphilip
Copy link
Owner Author

This is fully functional and released with the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants