8000 Reorganize the python/server side of the notebook by ellisonbg · Pull Request #3321 · ipython/ipython · GitHub
[go: up one dir, main page]

Skip to content

Reorganize the python/server side of the notebook #3321

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

Merged
merged 21 commits into from
May 17, 2013

Conversation

ellisonbg
Copy link
Member

This organizes the handlers and managers into subdirs based on the service/component. This is being done in preparation of doing the same thing to the js/less files in static. This should be ready to go.

import stat
import threading

import logging
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate import

@minrk
Copy link
Member
minrk commented May 15, 2013

Just to summarize the design discussion from chat:

  • each service gets a subpackage, containing any relevant handlers, objects, etc.
  • handlers for restful API requests all go in service/apihandlers.py
  • all other handlers related to the service go in service/handlers.py
  • a handlers file shall have default_handlers, a list of tuples for the default URL / handler mapping used to register the handlers.

self.finish()


class ZMQStreamHandler(websocket.WebSocketHandler):
Copy link
Member

Do these ZMQStreamHandlers belong in the base dir, rather than kernel? They aren't really specific.

ModifyNotebookCheckpointsHandler
),

# Load the (URL pattern, handler) tuples for each component.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you want to put this block in an init_handlers method, to facilitate subclassing? If so, probably init_settings for the block below as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will do that now.

@minrk
Copy link
Member
minrk commented May 16, 2013

Looks like you need to update some test exclusions

@minrk
Copy link
Member
minrk commented May 16, 2013

After catching up the test exclusions, 👍 to merge.

@Carreau
Copy link
Member
Carreau commented May 16, 2013

So this does not change the URL scheme for now right ?
If so, good for me.

@ellisonbg
Copy link
Member Author

In a Google+ hangout today we decided to organize things in the following manner:

auth
    login.py
    logout.py
base
    handlers.py
    zmqhandlers.py
tree
    handlers.py
notebook
    handlers.py
services
    notebooks
        handlers.py
        azurenbmanager.py
        filenbmanager.py
        nbmanager.py
    clusters
        handlers.py
        clustermanager.py
    kernels
        handlers.py
        kernelmanager.py

To prevent this from becoming too deeply nested, we are going to move IPython.frontend.html.notebook to IPython.html.

@ellisonbg
Copy link
Member Author

OK this is ready for final review and merge. The PR follows the design posted above. Test suite passes and notebook runs, but someone should play with it a bit.

@minrk
Copy link
Member
minrk commented May 17, 2013

read, tested, and played with - looks good to me. 👍 to merge.

ellisonbg added a commit that referenced this pull request May 17, 2013
Reorganize the python/server side of the notebook
@ellisonbg ellisonbg merged commit fbaab3a into ipython:master May 17, 2013
fperez added a commit that referenced this pull request May 24, 2013
Organize the JS and less files by component, in the `static` directory of the notebook.

This PR does the client side re-org that parallels the server side work in #3321.  There are now subdirectories in `static/` for each part of the client; roughly speaking there is one subdir for each page, web service or component.
@ellisonbg ellisonbg deleted the nbreorg branch January 28, 2014 17:49
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Reorganize the python/server side of the notebook
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Organize the JS and less files by component, in the `static` directory of the notebook.

This PR does the client side re-org that parallels the server side work in ipython#3321.  There are now subdirectories in `static/` for each part of the client; roughly speaking there is one subdir for each page, web service or component.
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

Successfully merging this pull request may close these issues.

3 participants
0