{"action":"created","issue":{"url":"https://api.github.com/repos/mwouts/nbsrc/issues/5","repository_url":"https://api.github.com/repos/mwouts/nbsrc","labels_url":"https://api.github.com/repos/mwouts/nbsrc/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mwouts/nbsrc/issues/5/comments","events_url":"https://api.github.com/repos/mwouts/nbsrc/issues/5/events","html_url":"https://github.com/mwouts/nbsrc/issues/5","id":350431905,"node_id":"MDU6SXNzdWUzNTA0MzE5MDU=","number":5,"title":"Allow .nb.py as an alternative notebook extension","user":{"login":"mwouts","id":29915202,"node_id":"MDQ6VXNlcjI5OTE1MjAy","avatar_url":"https://avatars2.githubusercontent.com/u/29915202?v=4","gravatar_id":"","url":"https://api.github.com/users/mwouts","html_url":"https://github.com/mwouts","followers_url":"https://api.github.com/users/mwouts/followers","following_url":"https://api.github.com/users/mwouts/following{/other_user}","gists_url":"https://api.github.com/users/mwouts/gists{/gist_id}","starred_url":"https://api.github.com/users/mwouts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwouts/subscriptions","organizations_url":"https://api.github.com/users/mwouts/orgs","repos_url":"https://api.github.com/users/mwouts/repos","events_url":"https://api.github.com/users/mwouts/events{/privacy}","received_events_url":"https://api.github.com/users/mwouts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-14T13:37:32Z","updated_at":"2018-08-15T16:08:34Z","closed_at":null,"author_association":"OWNER","body":"Allowing companion python scripts to have `.nb.py` extension rather than `.py` would possibly improve the user experience, as it\r\n- indicates more explicitly that the new file is a notebook\r\n- would support the case when a python script exists with the same name than the notebook (but with another content)"},"comment":{"url":"https://api.github.com/repos/mwouts/nbsrc/issues/comments/413247225","html_url":"https://github.com/mwouts/nbsrc/issues/5#issuecomment-413247225","issue_url":"https://api.github.com/repos/mwouts/nbsrc/issues/5","id":413247225,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzI0NzIyNQ==","user":{"login":"mwouts","id":29915202,"node_id":"MDQ6VXNlcjI5OTE1MjAy","avatar_url":"https://avatars2.githubusercontent.com/u/29915202?v=4","gravatar_id":"","url":"https://api.github.com/users/mwouts","html_url":"https://github.com/mwouts","followers_url":"https://api.github.com/users/mwouts/followers","following_url":"https://api.github.com/users/mwouts/following{/other_user}","gists_url":"https://api.github.com/users/mwouts/gists{/gist_id}","starred_url":"https://api.github.com/users/mwouts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwouts/subscriptions","organizations_url":"https://api.github.com/users/mwouts/orgs","repos_url":"https://api.github.com/users/mwouts/repos","events_url":"https://api.github.com/users/mwouts/events{/privacy}","received_events_url":"https://api.github.com/users/mwouts/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T16:08:33Z","updated_at":"2018-08-15T16:08:33Z","author_association":"OWNER","body":"An initial implementation is available on branch v0.5.0. If I set the default config to \r\n```\r\nc.ContentsManager.default_nbrmd_formats = 'ipynb,nb.py'\r\n```\r\nthen a jupyter notebook 'notebook.ipynb' is duplicated to a python only version with name 'notebook.nb.py', as expected. If I modify that file and reopen the notebook, then the inputs are up to date.\r\n\r\nHowever, when I open a plain python file, say 'script.py' as a notebook, and save it, two additional files are created: 'script.ipynb' and also 'script.nb.py' (with contents identical to 'script.py'). Clearly\r\n- the 'script.nb.py' is useless\r\n- and the creation of 'script.ipynb' is questionable (see also https://github.com/mwouts/nbrmd/issues/16), as it could override a pre-existing notebook with the same name.\r\n\r\nI will at least avoid generating two notebooks with the same extensions (not generate 'script.nb.py'), and think a bit more to the second case: should 'ipynb' files be generated only for extensions that are in 'nbrmd_formats' ? Or even, should 'nbrmd_formats' become a dictionary that tells which formats to save to, given the opened one?"}}
{"actor":{"display_login":"mwouts"}}