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

Add Python libraries in neuron package #17914

Closed
rqcy opened this issue Aug 22, 2016 · 13 comments
Closed

Add Python libraries in neuron package #17914

rqcy opened this issue Aug 22, 2016 · 13 comments

Comments

@rqcy
Copy link

rqcy commented Aug 22, 2016

Issue description

The NEURON simulation environment is often scripted with Python instead of its native hoc interpreter. Adding Python to the neuron package would be very useful.

@rqcy
Copy link
Author

rqcy commented Aug 22, 2016

@adevress would it be difficult to implement?

Thanks for maintaining this (esoteric ;) ) package!

@adevress
Copy link
Contributor

Hi rqcy,

No it should be doable and rather easy, I will add this in a future pull request.

@adevress
Copy link
Contributor

@obadz Can you assign this ticket to me ? thank you in advance.

@obadz
Copy link
Contributor

obadz commented Aug 22, 2016

Hmmmm… apparently I can only assign to project members, sorry. I guess if anyone finds this issue they will know it's all yours.

@adevress
Copy link
Contributor

@obadz That's fine but that's wierd, I was thinking I'm automatically attached for anything related to a package I maintain.

@rqcy
Copy link
Author

rqcy commented Aug 24, 2016 via email

@FRidh
Copy link
Member

FRidh commented Aug 30, 2016

when you mean you want to use Python with Neuron, is then the base interpreter enough or do you also want to use additional modules?

@rqcy
Copy link
Author

rqcy commented Aug 31, 2016 via email

@FRidh
Copy link
Member

FRidh commented Aug 31, 2016

I see, thanks for the example @rqcy .

Certain applications have a built-in interpreter that can be used to write plugins, e.g. FreeCAD, in which case you might want to use additional modules, like numpy.

But sometimes, you want to use the libraries offered by the program, like you seem to want to do with Neuron. If you want to use it like this, then it makes sense to make this package available as a Python library.

@adevress I recommend making the python parameter optional, that is, python ? null, and keep it as null for pkgs.neuron and pkgs.neuron-mpi. Then, in python-packages.nix you take pkgs.neuron and override it to add python. That way, pkgs.neuron is for those that want to use neuron without Python, andpkgs.pythonXXPackages.neuron` is build for the right interpreter version. We can discuss those details further in the PR.

adevress added a commit to adevress/nixpkgs that referenced this issue Sep 1, 2016
…tion and minor fixes

- Add support for python bindings
- make neuron respect standard pythonpath prefix
- force exec_prefix == prefix to respect standard nix file hierarchy
- normalize indentation
- propagate dependencies necessary for nrniv_makefile usage
- Add support for darwin
@adevress
Copy link
Contributor

adevress commented Sep 1, 2016

Hi @FRidh

I updated the pull request following your recommendation.

You have now a standard neuron and neuron-mpi modules without python support.
and a pythonPackages.neuron and pythonPackages.neuron-mpi with the python support for every version of python.

FRidh pushed a commit that referenced this issue Sep 1, 2016
…and minor fixes

- Add support for python bindings
- make neuron respect standard pythonpath prefix
- force exec_prefix == prefix to respect standard nix file hierarchy
- normalize indentation
- propagate dependencies necessary for nrniv_makefile usage
- Add support for darwin
@FRidh
Copy link
Member

FRidh commented Sep 1, 2016

Great! Merged so closing this.

@FRidh FRidh closed this as completed Sep 1, 2016
@FRidh FRidh reopened this Sep 1, 2016
@FRidh
Copy link
Member

FRidh commented Sep 1, 2016

Actually, the bindings don't work just yet.

@adevress
Copy link
Contributor

adevress commented Sep 1, 2016

@FRidh Ok I found the issue, the old prefix was not renamed properly, sorry for that.

Thank you for your testing @FRidh

I just fixed it and tested it in an isolated python environment. The fix is available in this pull request #18187

@FRidh FRidh closed this as completed Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants