{"action":"created","issue":{"url":"https://api.github.com/repos/takluyver/nbopen/issues/11","labels_url":"https://api.github.com/repos/takluyver/nbopen/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/takluyver/nbopen/issues/11/comments","events_url":"https://api.github.com/repos/takluyver/nbopen/issues/11/events","html_url":"https://github.com/takluyver/nbopen/issues/11","id":61996996,"number":11,"title":"Start notebook server in root VCS directory if found.","user":{"login":"mforbes","id":1028433,"avatar_url":"https://avatars.githubusercontent.com/u/1028433?v=3","gravatar_id":"","url":"https://api.github.com/users/mforbes","html_url":"https://github.com/mforbes","followers_url":"https://api.github.com/users/mforbes/followers","following_url":"https://api.github.com/users/mforbes/following{/other_user}","gists_url":"https://api.github.com/users/mforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/mforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mforbes/subscriptions","organizations_url":"https://api.github.com/users/mforbes/orgs","repos_url":"https://api.github.com/users/mforbes/repos","events_url":"https://api.github.com/users/mforbes/events{/privacy}","received_events_url":"https://api.github.com/users/mforbes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-16T07:43:01Z","updated_at":"2015-03-16T20:42:27Z","closed_at":null,"body":"I have not fully thought through the implications of this yet, but it could be very handy if ``nbopen`` was VCS aware and would start a server at the top level (or a customizable level) of a repository when started in a version controlled project.  One particular use case is to include project-specific ``python_notebook_config.py`` or ``python_config.py`` files in a single location that will automatically apply to notebooks opened within that project.  (Presently these will only take effect if ``ipython`` is run in the same directory as the config files and I know of no way to specify that config files in preceeding directories should take effect.)\r\n\r\nMaybe a good way of doing this would be for ``nbopen`` to look for a specific configuration file in the root of a project (either defined as the location of VCS directories like ``.hg`` or ``.git`` or maybe defined as a top-level python package directory with ``setup.py``.  In the latter case, maybe the configuration could be in ``setup.cfg``) which can specify where ``ipython notebook`` should be run from or where the configuration files are located (so they don't need to pollute the root directory namespace)."},"comment":{"url":"https://api.github.com/repos/takluyver/nbopen/issues/comments/81926642","html_url":"https://github.com/takluyver/nbopen/issues/11#issuecomment-81926642","issue_url":"https://api.github.com/repos/takluyver/nbopen/issues/11","id":81926642,"user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T20:42:27Z","updated_at":"2015-03-16T20:42:27Z","body":"I'm not sure that finding a VCS root makes sense:\r\n\r\n1. The point of nbopen is that you can use it the same way without having to think about whether there's a server already running or not. If launching a new server would start with project customisations, that's not equivalent to using an existing server.\r\n2. I'm somewhat wary of our config files, because they are both executed and can specify code to execute. We've had long and contentious discussions about security, and one principle that has come out is that it should be safe to open an untrusted notebook without it being able to run code (until the user starts explicitly running that code, of course). I think a similar principle goes for repositories - if I clone a repo from somewhere on the internet and double click a notebook, I don't expect that to execute Python code from that repo."}}