From 184d33a3de1a8314d46b57326364d9725135d721 Mon Sep 17 00:00:00 2001 From: sachin235 Date: Fri, 5 Jun 2020 15:13:56 +0530 Subject: [PATCH 1/2] Updated files --- githubcommit/handlers.py | 8 ++++---- githubcommit/static/main.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/githubcommit/handlers.py b/githubcommit/handlers.py index e88f285..50262e0 100644 --- a/githubcommit/handlers.py +++ b/githubcommit/handlers.py @@ -33,7 +33,7 @@ def put(self): data = json.loads(self.request.body.decode('utf-8')) filename = urllib.parse.unquote(data['filename']) msg = data['msg'] - commit_only_source = data['commit_only_source'] + # commit_only_source = data['commit_only_source'] # get current directory (to return later) @@ -57,9 +57,9 @@ def put(self): # commit current notebook # client will sent pathname containing git directory; append to git directory's parent try: - if commit_only_source : - subprocess.run(['jupyter', 'nbconvert', '--to', 'script', str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename)]) - filename = str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename.replace('ipynb', 'py')) + # if commit_only_source : + # subprocess.run(['jupyter', 'nbconvert', '--to', 'script', str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename)]) + # filename = str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename.replace('ipynb', 'py')) print(repo.git.add(str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename))) print(repo.git.commit( a=False, m="{}\n\nUpdated {}".format(msg, filename) )) diff --git a/githubcommit/static/main.js b/githubcommit/static/main.js index 23ce7d7..b8de677 100644 --- a/githubcommit/static/main.js +++ b/githubcommit/static/main.js @@ -13,9 +13,9 @@ define(['base/js/namespace','base/js/dialog','jquery'],function(IPython, dialog, var input = $('') var div = $('
') - var checkbox = '' + // var checkbox = '' - div.append(checkbox) + // div.append(checkbox) div.append(p) .append(input) @@ -28,7 +28,7 @@ define(['base/js/namespace','base/js/dialog','jquery'],function(IPython, dialog, var payload = { 'filename': filepath, 'msg': input.val(), - 'commit_only_source': $("#commit_only_source").prop('checked') + // 'commit_only_source': $("#commit_only_source").prop('checked') }; var settings = { url : '/git/commit', From 9d1846dd5c59a0769d690a9c41e66787390c48ec Mon Sep 17 00:00:00 2001 From: sachin235 Date: Sat, 6 Jun 2020 01:51:03 +0530 Subject: [PATCH 2/2] Update files --- README.md | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 63b4979..7588efb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ run need help to modify this extension allowing user to select his repo and bran You can currently install this directly from git: ``` -pip install git+https://github.com/sat28/githubcommit.git +pip install git+https://github.com/sachin235/githubcommit.git jupyter serverextension enable --py githubcommit jupyter nbextension install --py githubcommit ``` diff --git a/setup.py b/setup.py index aa7805b..f9c66d3 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ setuptools.setup( name="githubcommit", version='0.1.0', - url="https://github.com/sat28/githubcommit", - author="Shaleen Anand Taneja", + url="https://github.com/sachin235/githubcommit", + author="Sachin Singla", description="Jupyter extension to enable user push notebooks to a git repo", packages=setuptools.find_packages(), install_requires=[