[Cython] Move IPython's cython extension to cython
As you probably know, IPython has a "cython magic" [1], an extension to interface ipython with cython, allowing to use cython code in the interactive session. Originally, few of these "language specific magics" (R, cython, octave, etc) were included builtin in IPython, but then the IPython core developers decided break out them (with fair arguments IMHO [2]), either to be included in the "language package" they depend on or as a third party extensions. At the moment, cython-magic is the only one language specific extension left to move. The rest were moved to the packages they depend on [3] So, this message is to ask if the Cython project would like to import this code, task that Brian Grangrer (the author of the cython-magic extension and IPython core dev) entrusted me [3]. Of course, I could help you preparing a PR that migrate the module, its tests and documentation, preserving the git history as far as possible. let me know your opinion/decision cheers Martin. [1] http://ipython.org/ipython-doc/dev/config/extensions/cythonmagic.html [2] https://github.com/ipython/ipython/issues/3150 [3] https://github.com/ipython/ipython/issues/3803 [4] https://github.com/ipython/ipython/issues/3150#issuecomment-37203217 -- mgaitan.github.io textosyprextextos.com.ar -- mgaitan.github.io textosyprextextos.com.ar ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Move IPython's cython extension to cython
On Fri, Apr 4, 2014 at 10:55 AM, Martín Gaitán wrote: > As you probably know, IPython has a "cython magic" [1], an extension to > interface ipython with cython, allowing to use cython code in the > interactive session. > > Originally, few of these "language specific magics" (R, cython, octave, etc) > were included builtin in IPython, but then the IPython core developers > decided break out them (with fair arguments IMHO [2]), either to be included > in the "language package" they depend on or as a third party extensions. > > At the moment, cython-magic is the only one language specific extension > left to move. > The rest were moved to the packages they depend on [3] > > So, this message is to ask if the Cython project would like to import this > code, task that Brian Grangrer (the author of the cython-magic extension > and IPython core dev) entrusted me [3]. > > Of course, I could help you preparing a PR that migrate the module, its > tests and documentation, preserving the git history as far as possible. > > let me know your opinion/decision I'd say this could generally make sense. Would it be the case that iff cython is installed then the %cython magic would be available and just work? Also, how testable is this (e.g. via automated tests vs. having to fire up a notebook and test it manually)? - Robert ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Move IPython's cython extension to cython
On Sun, Apr 6, 2014 at 12:37 AM, Robert Bradshaw wrote: > I'd say this could generally make sense. Would it be the case that iff > cython is installed then the %cython magic would be available and just > work? > Yes, but before to use it, you'll need to load the extension somewhere. Could be with ipython's %load_ext or setting up it in your config script to be loaded automatically on the startup. For example, see how octave magic (included in the package oct2py) works http://nbviewer.ipython.org/github/blink1073/oct2py/blob/master/example/octavemagic_extension.ipynb?create=1 and here is the code https://github.com/blink1073/oct2py/tree/master/oct2py/ipython Also, how testable is this (e.g. via automated tests vs. having > to fire up a notebook and test it manually)? > There is some unittests https://github.com/ipython/ipython/blob/master/IPython/extensions/tests/test_cythonmagic.py Of course, they could/should be included in the moving. I could refactor them to remove Nose as a requirement, but obviously IPython (probably few versions) would be mandatory to run them. let me know any other consideration/question. cheers Martin -- mgaitan.github.io textosyprextextos.com.ar ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel