Skip to content

Commit

Permalink
Fix CI (#664)
Browse files Browse the repository at this point in the history
* fix format

* fix broken notebook

* revert and duppress deprecated warnings
  • Loading branch information
reoono committed Jun 9, 2022
1 parent 4b03f26 commit 43b6712
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions papermill/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def cat(
self,
source,
buffersize=None,
memsize=2 ** 24,
memsize=2**24,
compressed=False,
encoding='UTF-8',
raw=False,
Expand All @@ -297,7 +297,7 @@ def cat(
# try to read the file multiple times
for i in range(100):
obj = self.s3.Object(key.bucket.name, key.name)
buffersize = buffersize if buffersize is not None else 2 ** 20
buffersize = buffersize if buffersize is not None else 2**20

if not size:
size = obj.content_length
Expand Down
4 changes: 4 additions & 0 deletions papermill/tests/notebooks/broken2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"metadata": {},
"outputs": [],
"source": [
"# To suppress a DeprecationWarning from IPython.\n",
"import warnings\n",
"warnings.filterwarnings('ignore')\n",
"\n",
"# This causes multiple output elements to be created, one of type \"display_data\" and another of type \"error.\"\n",
"from IPython.core.display import display, HTML\n",
"display(HTML(\"<style>.container { width:100% !important; }</style>\"))\n",
Expand Down
2 changes: 2 additions & 0 deletions papermill/tests/test_hdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def open_input_stream(self, path):
def open_output_stream(self, path):
return MockHadoopFile()


class MockHadoopFile(object):
def __init__(self):
self._content = b'Content of notebook'
Expand All @@ -31,6 +32,7 @@ def write(self, new_content):
self._content = new_content
return 1


class MockFileInfo(object):
def __init__(self, path):
self.path = path
Expand Down

0 comments on commit 43b6712

Please sign in to comment.