Page MenuHomeSolus

Initial inclusion of python-notebook, fixes T5049
AbandonedPublic

Authored by rjurga on Feb 4 2018, 9:30 AM.

Details

Reviewers
sunnyflunk
Group Reviewers
Triage Team
Maniphest Tasks
T5049: Python notebook for jupyter
Summary

Initial inclusion of python-notebook.
Fixes T5049.
Depends on D2180 and D2181.

Test Plan

Python tests (requires python-nose):
nosetests notebook

JavaScript tests:
python -m notebook.jstest notebook

If running with Python 2, requires python-mock and python-setuptools.
It requires CasperJS and PhantomJS. Installation follows the instructions from npm documentation for permissions (https://docs.npmjs.com/getting-started/fixing-npm-permissions), otherwise an error occurs.

sudo eopkg install nodejs
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
npm install -g casperjs phantomjs-prebuilt

Trying to run the JavaScript tests with Python 2 makes PhantomJS crash.
PhantomJS is not developed anymore so maybe not surprising.

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

rjurga created this revision.Feb 4 2018, 9:30 AM
rjurga added a comment.EditedFeb 4 2018, 9:34 AM

The package.yml has all the officially required dependencies. However some of them pull each other, if you want to trim it to the minimum list of dependencies, the commented ones below can be removed.

builddeps  :
    - pkgconfig(python3)
    - git
    - nodejs-devel
    # - python-ipykernel
    # - python-ipython_genutils
    # - python-jinja
    # - python-jupyter_client
    # - python-jupyter_core
    - python-nbconvert
    # - python-nbformat
    - python-send2trash
    - python-setuptools
    - python-terminado
    # - python-tornado
    # - python-traitlets
rundeps    :
    # - python-ipykernel
    # - python-ipython_genutils
    # - python-jinja
    # - python-jupyter_client
    # - python-jupyter_core
    - python-nbconvert
    # - python-nbformat
    - python-send2trash
    - python-terminado
    # - python-tornado
    # - python-traitlets

I included them all because the jupyter packages already in Solus do the same. Let me know if it is the right approach.

EP01 added a subscriber: EP01.Feb 4 2018, 10:49 AM

Hi @rjurga, I'm the original packager of the existing jupyter stuff, I'm glad to see that people are using them! Thanks for taking this on, and for reporting the other problems with the current packages, I'll see what I can do to resolve those. Anyway, I have a couple of comments regarding this diff:

  • The rundeps are not required as builddeps.
  • python-setuptools is not in the correct place to conform to alphabetical order (pkgconfig deps in order, then explicit deps in order).

This should be all you need:

builddeps  :
    - pkgconfig(python3)
    - git
    - nodejs-devel
    - python-setuptools

Also, you are quite correct that the rundeps can be tidied up as they pull each other in as deps. However, personally, I almost always list what is in the setup.py to make absolutely sure that nothing is missed. The Triage Team, however, may have a different view and ask you to tidy it up.

rjurga updated this revision to Diff 5238.Feb 4 2018, 11:32 AM

Remove unnecessary builddeps that are only rundeps.

How can we request review for this task?

How can we request review for this task?

It's already in </> Needs Review state. Just look below the task title.

Thanks. I was just hoping it could be reviewed sooner rather than later.

sunnyflunk requested changes to this revision.Mar 16 2018, 12:00 AM
sunnyflunk added a subscriber: sunnyflunk.

This *needs* to be updated to version >=5.4.1 due to security vulnerability in version 5.4.0

This revision now requires changes to proceed.Mar 16 2018, 12:00 AM

I am currently on a tight schedule (finishing my PhD) and I will only be available from mid-april to work on this again. If someone wants to take over in the meantime feel free, otherwise I'll only get back to it after I'm done with the PhD.

EP01 added a comment.Mar 16 2018, 1:03 PM

@rjurga No problem, good luck with your thesis, I can take this over tonight after work if no one has any objections.

@sunnyflunk I cannot find a 5.4.1 release or information on any current security issues. Could you point me in the right direction please?

http://seclists.org/oss-sec/2018/q1/238

It appears that it isn't released (I thought it meant that 5.5 was pending release). There's not a lot of information there to patch the fix

Patch is merged and now 5.4.1 is released, so this can be updated now.

DataDrake abandoned this revision.Dec 11 2018, 4:29 AM