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

Py2neo 3 compatibility #4

Closed
veleritas opened this issue Jan 27, 2017 · 6 comments
Closed

Py2neo 3 compatibility #4

veleritas opened this issue Jan 27, 2017 · 6 comments

Comments

@veleritas
Copy link
Contributor

I'm working on upgrading hetio to be compatible with py2neo 3. Since many parts of the rephetio pipeline use hetio, what do you think the easiest way would be to test them all?

So far I've managed to get hetio to load nodes into Neo4j 3.1.1.

@dhimmel
Copy link
Member

dhimmel commented Jan 27, 2017

I actually think it shouldn't be too hard. hetio/hetio/neo4j.py is the only module in hetio that imports py2neo and it's only used in a few functions:

Other parts of the rephetio codebase may use py2neo directly, but I think you can just deal with any errors there as they arise. Luckily I think the py2neo upgrade is most likely to cause errors rather than silent bugs.

Happy to review any pull requests!

@dhimmel
Copy link
Member

dhimmel commented Jan 27, 2017

It's ideal if we can upgrade to py2neo 3 and then make a new hetio release. Therefore, you can choose your hetio release based on whether you want to use py2neo 2 or 3.

@veleritas
Copy link
Contributor Author

I've forked hetio to my account, will install as recommended by cloning and doing a pip install -e .

After it seems that the new hetio plays nice with the pipeline, then I will make a pull request.

@veleritas
Copy link
Contributor Author

If I want to add additional features to hetio such as having a progress bar (via tqdm) for the node and edge import steps, how would I specify that tqdm is a dependency of hetio?

@dhimmel
Copy link
Member

dhimmel commented Jan 27, 2017

how would I specify that tqdm is a dependency of hetio?

You can add an install_requires in setup.py. See example here.

Currently, I didn't put pandas or py2neo as dependencies although arguable they should be. Or we could put these packages in extras_require.

One option for the progress bar is that you can try to import tqdm. If it fails continue without if that's not too hard to implement. Otherwise, you can just make the progress bar always on.

@veleritas
Copy link
Contributor Author

I've made some small modifications to hetio and opened up a pull request!

@dhimmel dhimmel closed this as completed in 7fe01f1 Mar 2, 2017
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

2 participants