Skip to content

Commit

Permalink
Merge pull request #1 from akotlar/master
Browse files Browse the repository at this point in the history
[apiserver]: fix jgscm root folder creation, dependencies
  • Loading branch information
akotlar authored Apr 8, 2019
2 parents c64fb7a + 149bc2a commit 1695db9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions jgscm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ def run_post_save_hook(self, model, os_path):
model=model,
contents_manager=self)
except Exception:
self.log.error("Post-save hook failed on %s", os_path, exc_info=True)
self.log.error("Post-save hook failed on %s",
os_path, exc_info=True)

@default("checkpoints_class")
def _checkpoints_class_default(self):
Expand Down Expand Up @@ -522,13 +523,15 @@ def _get_bucket(self, name, throw=False):
cache[name] = bucket
return bucket

@staticmethod
def _parse_path(path):
def _parse_path(self, path):
"""
Splits the path into bucket name and path inside the bucket.
:param path: string to split.
:return: tuple(bucket name, bucket path).
"""
if self.default_path and not path.startswith(f"{self.default_path}/"):
path = f"{self.default_path}/{path}"

bucket, _, blobname = path.partition("/")
return bucket, blobname

Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
setup(
name="jgscm",
description="Jupyter Google Cloud Storage ContentsManager",
version="0.1.9",
version="0.1.10-hail",
license="MIT",
author="Vadim Markovtsev",
author_email="[email protected]",
url="https://github.com/src-d/jgscm",
download_url="https://github.com/src-d/jgscm",
packages=["jgscm"],
keywords=["jupyter", "ipython", "gcloud", "gcs"],
install_requires=["google-cloud>=0.32.0", "notebook>=4.2", "nbformat>=4.1",
"tornado>=4", "traitlets>=4.2"],
install_requires=["google-api-python-client>=1.7",
"google-cloud-storage>=1.14",
"notebook>=5.7", "nbformat>=4.4",
"tornado>=6.0", "traitlets>=4.3"],
package_data={"": ["requirements.txt", "LICENSE", "README.md"]},
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down

0 comments on commit 1695db9

Please sign in to comment.