[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...

2016-09-16 Thread leifurhauks
Github user leifurhauks commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/418#discussion_r79199796
  
--- Diff: 
gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py ---
@@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer):
 def _dictify(self, number):
 if isinstance(number, bool):  # python thinks that 0/1 integers 
are booleans
 return number
-elif isinstance(number, long):
+elif isinstance(number, long) or (number > 2147483647): # in 
python all numbers are int unless specified otherwise
--- End diff --

Maybe the absolute value of the integer should be checked here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #418: Fixed issue in NumberSerializer that could caus...

2016-09-15 Thread leifurhauks
Github user leifurhauks commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/418#discussion_r78990181
  
--- Diff: 
gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py ---
@@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer):
 def _dictify(self, number):
 if isinstance(number, bool):  # python thinks that 0/1 integers 
are booleans
 return number
-elif isinstance(number, long):
+elif isinstance(number, long) or (number > 2147483647): # in 
python all numbers are int unless specified otherwise
--- End diff --

is graphson's Int32 unsigned?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #357: TINKERPOP-1278 : Make implicit relative imports explic...

2016-08-09 Thread leifurhauks
Github user leifurhauks commented on the issue:

https://github.com/apache/tinkerpop/pull/357
  
Brought this branch up to date and fixed the code generators.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #345: add license boilerplate to __version__

2016-06-22 Thread leifurhauks
GitHub user leifurhauks opened a pull request:

https://github.com/apache/tinkerpop/pull/345

add license boilerplate to __version__

also import __version__ in setup.py instead of eval-ing it

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/leifurhauks/incubator-tinkerpop 
python_version_license_boilerplate

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/345.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #345


commit 19cf29efa103ed360608cae3baf20298bf9a41bf
Author: Leifur Halldor Asgeirsson <lasgeirs...@zerofail.com>
Date:   2016-06-22T15:52:22Z

add license boilerplate to __version__

also import __version__ in setup.py instead of eval-ing it




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #344: gremlin_python: generate/build/deps before tests

2016-06-22 Thread leifurhauks
Github user leifurhauks commented on the issue:

https://github.com/apache/tinkerpop/pull/344
  
Also, the generated `__version__.py` file fails the rat check. I think it 
needs to be either
a) generated with the license boilerplate
b) excluded from the rat check, or
c) included in the clean configuration.

Please advise.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #344: gremlin_python: generate/build/deps before tests

2016-06-22 Thread leifurhauks
Github user leifurhauks commented on the issue:

https://github.com/apache/tinkerpop/pull/344
  
I think this should fix the CI test failures.

On the subject of the python dependencies (aenum and requests), should they 
be bundled in the jar? aenum has a 3-clause BSD 
[license](https://bitbucket.org/stoneleaf/aenum/src/c9dc3b8fc3e3755a919ba4357ab9ed9b22131af1/aenum/LICENSE?at=default=file-view-default),
 and requests uses the ASL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #344: gremlin_python: generate/build/deps before test...

2016-06-22 Thread leifurhauks
GitHub user leifurhauks opened a pull request:

https://github.com/apache/tinkerpop/pull/344

gremlin_python: generate/build/deps before tests

Code generation is triggered by Maven before tests are run; dependencies
(currently aenum, requests) are installed, and the generated package is 
built
into ${project.build.testOutputDirectory}/Lib, which is added to the
classpath for the tests via the python.home property. Jython tests
import the gremlin_python package instead of importing its modules
directly.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/leifurhauks/incubator-tinkerpop 
python_test_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/344.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #344


commit 252e358d7e0acf519e384da590050c6c55369a29
Author: Leifur Halldor Asgeirsson <lasgeirs...@zerofail.com>
Date:   2016-06-22T13:34:41Z

gremlin_python: generate/build/deps before tests

Code generation is triggered by Maven before tests are run; dependencies
(currently aenum, requests) are installed, and the generated package is 
built
into ${project.build.testOutputDirectory}/Lib, which is added to the
classpath for the tests via the python.home property. Jython tests
import the gremlin_python package instead of importing its modules
directly.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #340: add RawExpression to gremlin_python

2016-06-16 Thread leifurhauks
Github user leifurhauks commented on the issue:

https://github.com/apache/tinkerpop/pull/340
  
@okram , I realized the current implementation of bindings as dicts is 
breaking 2/3 compatibility. It also makes it bit hairy to extract just the key 
in `RawExpression`. 

I would suggest using a tuple (e.g. `('symbol', value)` ) or a simple class 
that just has two data members. May I revise the bindings implementation?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #340: add RawExpression to gremlin_python

2016-06-16 Thread leifurhauks
Github user leifurhauks commented on the issue:

https://github.com/apache/tinkerpop/pull/340
  
> This is just for the GeoPoint-style adding classes?

More generally, it can be used to create expressions that make use of APIs, 
presumably provided by the graph vendor, that aren't strictly part of gremlin. 
My immediate use case is to call static methods on Titan's Geoshape class.

I'll add an example to the asciidoc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop pull request #340: add RawExpression to gremlin_python

2016-06-16 Thread leifurhauks
GitHub user leifurhauks opened a pull request:

https://github.com/apache/tinkerpop/pull/340

add RawExpression to gremlin_python

As described on dev@tinkerpop.apache.org thread gremlin_python GLV

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/leifurhauks/incubator-tinkerpop raw_expr

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/340.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #340


commit 210d1a87fc0532b77ccf67bed57e149982b1e08a
Author: Leifur Halldor Asgeirsson <lasgeirs...@zerofail.com>
Date:   2016-06-16T14:13:10Z

cpython gitignore

commit e931d21457441e91efc0cfc8b9e70a5a4592b80f
Author: Leifur Halldor Asgeirsson <lasgeirs...@zerofail.com>
Date:   2016-06-16T15:59:58Z

add RawExpression to gremlin_python

As described on dev@tinkerpop.apache.org thread gremlin_python GLV




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---