diff --git a/jgscm/__init__.py b/jgscm/__init__.py index b2c5a19..d5cc958 100644 --- a/jgscm/__init__.py +++ b/jgscm/__init__.py @@ -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): @@ -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 diff --git a/setup.py b/setup.py index 0a158ba..31980e3 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ 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="vadim@sourced.tech", @@ -12,8 +12,10 @@ 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",