-
Notifications
You must be signed in to change notification settings - Fork 551
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
refactor providers #443
refactor providers #443
Conversation
This is coming along: there is no longer any specific mention of github outside of the github provider other in the python code. I'm going to take a look at what would be entailed in pulling those out as well... |
I've moved the github/gist-specific template values and error handling out and into the provider. Tests next? The general ecosystem pattern usually has the tests near where the code is, so I guess the providers should get tests... |
If you end up writing wholly new tests, might I suggest migrating some to using Tornado's async testing setup? It should make mocking much easier - the current tests are doing integration/functional testing by hitting the webserver like a black box. |
Just gardening... So haven't written any new tests, just moved the old
|
I like the organization you've laid out here and am happy you kept the defaults to be what's on the "reference implementation", for the sake of people wanting to contribute to nbviewer.ipython.org and for ease of deployment. |
Thanks, that was the goal. This will represent a breaking change, as I didn't shim any of the old locations: should we actually do a major increment to 1.0? Perhaps when this and #421 land, that might be appropriate. Anyhoo, looks like needs rebase... after that, I'm going to take of the [wip]... don't want to drag this out too long! |
Ok, had enough fun here: ready to review, but certainly open to any other changes. I still don't know how someone coming along would create and set custom configuration values for a custom provider except via environment variables! |
What do you mean by:
Are you talking code locations or URL paths? |
Code locations! The URL scheme is unchanged! The only thing that should be On Tue, Apr 21, 2015 at 12:03 PM Kyle Kelley [email protected]
|
I guess we could use IPython traitlets, the way nbconvert configuration does it, but that something for post 4.x split. I must say that I hadn't looked at the code of nbviewer in a looooong time, but I'm really happy to see things going this way. This is really awesome ! Once this is merge I would suggest to write a blog post about nbviewer on blog.Jupyter.org if you like. |
Yeah: I was wondering about that. I was holding off buying into any more of the APIs while TBS:tm: was going on. Since we already use traitlets for configuring nbconvert, it might be the path forward. My first look into that space suggested I should use The other thing that keeps bothering me is that this really looks like a I recall a talk by Doug Hellman where he slams rolling your own plugin mechanism (which I have basically done, here), which I still think is probably true, but I also recall some animosity towards
Sounds interesting! It would be great to have some numbers from the analytics to present in there:
|
Do you want to wait on exposing alternate providers in traitlets for a later PR? |
Great. Tried to never leave it broken... But i totally have a draft in my inbox for how i was trying out setuptools entry_points. I am much happier with it, and will open a separate pr! I started a straw man gitlab integration (we stated using gl at work), and the API was very smooth... Up until the client. |
Welp, we'll see what happens when it deploys. 😉 |
This PR is an implementation of #428:
handlers.py
, mostly intoproviders/<provider>/handlers.py
At the end of this, it should be much clearer how to create a new handler, how to configure existing handlers, etc.