Skip to content

Commit 77d9a6a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 27f2f4c commit 77d9a6a

15 files changed

+27
-17
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,6 @@ _Note: You might want to set a reference to the main repository to fetch/merge f
149149
git remote add upstream https://github.com/nteract/papermill
150150
```
151151

152-
It's possible you will have conflicts between your repository and main. Here, `main` is meant to be synchronized with the `upstream` repository. GitHub has some good [documentation](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/) on merging pull requests from the command line.
152+
It's possible you will have conflicts between your repository and main. Here, `main` is meant to be synchronized with the `upstream` repository. GitHub has some good [documentation](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/) on merging pull requests from the command line.
153153

154154
Happy hacking on Papermill!

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pip install papermill
4747
```
4848

4949
For all optional io dependencies, you can specify individual bundles
50-
like `s3`, or `azure` -- or use `all`. To use Black to format parameters you can add as an extra requires \['black'\].
50+
like `s3`, or `azure` -- or use `all`. To use Black to format parameters you can add as an extra requires ['black'].
5151

5252
```{.sourceCode .bash}
5353
pip install papermill[all]
@@ -100,7 +100,7 @@ $ papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
100100
```
101101

102102
**NOTE:**
103-
If you use multiple AWS accounts, and you have [properly configured your AWS credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html), then you can specify which account to use by setting the `AWS_PROFILE` environment variable at the command-line. For example:
103+
If you use multiple AWS accounts, and you have [properly configured your AWS credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html), then you can specify which account to use by setting the `AWS_PROFILE` environment variable at the command-line. For example:
104104

105105
```{.sourceCode .bash}
106106
$ AWS_PROFILE=dev_account papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
@@ -154,7 +154,7 @@ Papermill supports the following name handlers for input and output paths during
154154

155155
- Local file system: `local`
156156

157-
- HTTP, HTTPS protocol: `http://, https://`
157+
- HTTP, HTTPS protocol: `http://, https://`
158158

159159
- Amazon Web Services: [AWS S3](https://aws.amazon.com/s3/) `s3://`
160160

binder/cli-simple/pm_example.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
],
6565
"source": [
6666
"import os\n",
67+
"\n",
6768
"import papermill as pm\n",
6869
"\n",
6970
"binder_dir = '..'"

docs/changelog.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ We made it to our [1.0 milestone goals](https://github.com/nteract/papermill/mil
188188

189189
- Input and output paths can now reference input parameters. `my_nb_{nb_type}.ipynb out_{nb_type}.ipynb -p nb_type test` will substitute values into the paths passed in with python format application patterns.
190190
- `read_notebook`, `read_notebooks`, `record`, and `display` api functions are now removed.
191-
- \[upstream\] ipywidgets are now supported. See [nbconvert docs](https://nbconvert.readthedocs.io/en/latest/execute_api.html#widget-state) for details.
192-
- \[upstream\] notebook executions which run out of memory no longer hang indefinitely when the kernel dies.
191+
- [upstream] ipywidgets are now supported. See [nbconvert docs](https://nbconvert.readthedocs.io/en/latest/execute_api.html#widget-state) for details.
192+
- [upstream] notebook executions which run out of memory no longer hang indefinitely when the kernel dies.
193193

194194
## 0.19.1
195195

papermill/abs.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utilities for working with Azure blob storage"""
2+
23
import io
34
import re
45

papermill/adl.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utilities for working with Azure data lake storage"""
2+
23
import re
34

45
from azure.datalake.store import core, lib

papermill/engines.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Engines to perform different roles"""
2+
23
import datetime
34
import sys
45
from functools import wraps
@@ -169,9 +170,7 @@ def autosave_cell(self):
169170
# Autosave is taking too long, so exponentially back off.
170171
self.autosave_cell_every *= 2
171172
logger.warning(
172-
"Autosave too slow: {:.2f} sec, over {}% limit. Backing off to {} sec".format(
173-
save_elapsed, self.max_autosave_pct, self.autosave_cell_every
174-
)
173+
f"Autosave too slow: {save_elapsed:.2f} sec, over {self.max_autosave_pct}% limit. Backing off to {self.autosave_cell_every} sec"
175174
)
176175

177176
@catch_nb_assignment

papermill/inspection.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Deduce parameters of a notebook from the parameters cell."""
2+
23
from pathlib import Path
34

45
import click

papermill/log.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Sets up a logger"""
2+
23
import logging
34

45
logger = logging.getLogger('papermill')

papermill/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Models used by papermill."""
2+
23
from collections import namedtuple
34

45
Parameter = namedtuple(

papermill/tests/notebooks/gcs/gcs_in/gcs-simple_notebook.ipynb

+7-5
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"outputs": [],
123123
"source": [
124124
"import time\n",
125+
"\n",
125126
"time.sleep(10)"
126127
]
127128
},
@@ -147,14 +148,13 @@
147148
"outputs": [],
148149
"source": [
149150
"import sys\n",
150-
"from ctypes import CDLL\n",
151151
"# This will crash a Linux or Mac system\n",
152152
"# equivalent calls can be made on Windows\n",
153153
"\n",
154154
"# Uncomment these lines if you would like to see the segfault\n",
155155
"\n",
156156
"# dll = 'dylib' if sys.platform == 'darwin' else 'so.6'\n",
157-
"# libc = CDLL(\"libc.%s\" % dll) \n",
157+
"# libc = CDLL(\"libc.%s\" % dll)\n",
158158
"# libc.time(-1) # BOOM!!"
159159
]
160160
},
@@ -323,7 +323,9 @@
323323
}
324324
],
325325
"source": [
326-
"import time, sys\n",
326+
"import sys\n",
327+
"import time\n",
328+
"\n",
327329
"for i in range(8):\n",
328330
" print(i)\n",
329331
" time.sleep(0.5)"
@@ -333,8 +335,8 @@
333335
"metadata": {
334336
"colab": {
335337
"name": "test.ipynb",
336-
"version": "0.3.2",
337-
"provenance": []
338+
"provenance": [],
339+
"version": "0.3.2"
338340
},
339341
"kernelspec": {
340342
"display_name": "Python 3",

papermill/tests/notebooks/keyboard_interrupt.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
],
2020
"source": [
2121
"from time import sleep\n",
22+
"\n",
2223
"sleep(60)"
2324
]
2425
}

papermill/tests/notebooks/systemexit.ipynb

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
8-
"source": [
9-
"import sys"
10-
]
8+
"source": []
119
},
1210
{
1311
"cell_type": "code",

papermill/tests/notebooks/test_autosave.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"source": [
1717
"import time\n",
18+
"\n",
1819
"for i in range(25): # This will take 2.5 seconds\n",
1920
" time.sleep(0.1)\n",
2021
" print(i)"

papermill/tests/notebooks/test_logging.ipynb

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"source": [
1717
"import logging\n",
18+
"\n",
1819
"logger = logging.getLogger(\"test\")\n",
1920
"logger.setLevel(logging.INFO)\n",
2021
"logging.basicConfig(level=logging.INFO)\n",
@@ -66,8 +67,10 @@
6667
],
6768
"source": [
6869
"import warnings\n",
70+
"\n",
6971
"warnings.simplefilter(action='ignore', category=FutureWarning)\n",
7072
"from ggplot import mpg\n",
73+
"\n",
7174
"mpg['cty'].plot.hist(bins=12)"
7275
]
7376
},

0 commit comments

Comments
 (0)