Skip to content

setuptools compliancy - #21

Merged
ayfchan merged 3 commits into
oanda:masterfrom
hootnot:master
Jan 14, 2016
Merged

setuptools compliancy#21
ayfchan merged 3 commits into
oanda:masterfrom
hootnot:master

Conversation

@hootnot

@hootnot hootnot commented Dec 24, 2015

Copy link
Copy Markdown
Contributor

make the oandapy setuptools compliant. This makes it pip installable. Optionally the package could be put on pypi.python.org

versioning up to OANDA, I guess semantic versioning MAJOR.MINOR.PATCH would be the way to go.

Please, see request #9 and #20 also.

After this change installing and upgrading comes down to:
pip install git+https://github.com/oanda/oandapy

a pypi package would even be more convenient:
pip install oandapy

ayfchan pushed a commit that referenced this pull request Jan 14, 2016
@ayfchan
ayfchan merged commit 37e4c27 into oanda:master Jan 14, 2016
@alekna

alekna commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

Doesn't work with Python 3:

[root@380065207cac /]# python3
Python 3.4.3 (default, Jun 29 2015, 12:16:01) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oandapy 
>>> oandapy.API()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'API'
>>> 

Work fine with Python 2:

[root@380065207cac /]# python
Python 2.7.10 (default, Sep  8 2015, 17:20:17) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import oandapy
>>> oandapy.API()
<oandapy.oandapy.API object at 0x7f18d3dbf2d0>
>>> 

@hootnot

hootnot commented Jan 25, 2016

Copy link
Copy Markdown
Contributor Author

if you modify oandapy/init.py

--- a/oandapy/init.py
+++ b/oandapy/init.py
@@ -1 +1 @@
-from oandapy import *
+from .oandapy import *

it is solved

@alekna

alekna commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

It helped. Will you create another PR?

@hootnot

hootnot commented Jan 25, 2016

Copy link
Copy Markdown
Contributor Author

I've made the change and pushed it. It is in the pending pull request I
made the 19th.

@hootnot

hootnot commented Jan 25, 2016

Copy link
Copy Markdown
Contributor Author

I have written some tests to test the complete API. Tests pass Python
2.7.5. I will see to test Python 3 also.

@alekna

alekna commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

Why don't you split your changes into multiple branches/PRs ? Putting it all under name of "Update of README" is a bit misinforming.

@hootnot

hootnot commented Jan 25, 2016

Copy link
Copy Markdown
Contributor Author

Yes you are right and I've noticed it too. Therefore I've already made a
branche for the extension of the Streamer class and will make the PR's
from there. I will do so for the testcode too.

@alekna

alekna commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

Good luck. I hope they will accept your changes/improvements. They're not very good at this. As if no one at OANDA cares about API anymore.

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

Successfully merging this pull request may close these issues.

3 participants