Skip to content

Commit fdf4880

Browse files
authored
apply pre-commit (#693)
1 parent 54f7d7a commit fdf4880

25 files changed

+81
-84
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug, help wanted
66
assignees: ''
7-
87
---
8+
99
## 🐛 Bug
1010

1111
<!-- A clear and concise description of what the bug is. -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ about: Suggest an idea for this project
44
title: ''
55
labels: enhancement, help wanted
66
assignees: ''
7-
87
---
98

109
## 🚀 Feature
10+
1111
<!-- A clear and concise description of the feature proposal -->
1212

1313
### Motivation

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ Please include a summary of the change and which issue is fixed.
55
Please also include relevant motivation and context.
66
List any dependencies that are required for this change.
77
-->
8-
Fixes #<issue_number>
8+
9+
Fixes #\<issue_number>

.github/codecov.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ comment:
1818
layout: "reach,diff,flags,files,footer"
1919
behavior: default
2020
require_changes: no
21-

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
python -VV
3131
python -m site
3232
python -m pip install --upgrade pip setuptools wheel
33-
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
33+
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
3434
3535
- name: "Run tox targets for ${{ matrix.python-version }}"
3636
run: python -m tox
@@ -60,4 +60,4 @@ jobs:
6060
set -xe
6161
python -m pip install virtualenv tox
6262
- name: "Run tox targets for ${{ matrix.toxenv }}"
63-
run: python -m tox
63+
run: python -m tox

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Code of Conduct
22

33
Please read our entire [Code of Conduct](https://github.com/nteract/nteract/blob/main/CODE_OF_CONDUCT.md)
4-

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ This will generate `.html` files in the `/.tox/docs_out/` directory. Once you ar
9696
The general workflow for this will be:
9797

9898
1. Run local tests
99-
2. Pushed changes to your forked repository
100-
3. Open pull request to main repository
99+
1. Pushed changes to your forked repository
100+
1. Open pull request to main repository
101101

102102
### Run Tests Locally
103103

@@ -125,17 +125,17 @@ and ensure the remotes point to your GitHub. Don't work on the main branch!
125125

126126
1. Commit changes to local repository:
127127

128-
```bash
129-
git checkout -b my-feature
130-
git add <updated_files>
131-
git commit
132-
```
128+
```bash
129+
git checkout -b my-feature
130+
git add <updated_files>
131+
git commit
132+
```
133133

134-
2. Push changes to your remote repository:
134+
1. Push changes to your remote repository:
135135

136-
```bash
137-
git push -u origin my-feature
138-
```
136+
```bash
137+
git push -u origin my-feature
138+
```
139139

140140
### Create Pull Request
141141

@@ -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

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<a href="https://github.com/nteract/papermill"><img src="https://media.githubusercontent.com/media/nteract/logos/master/nteract_papermill/exports/images/png/papermill_logo_wide.png" height="48px" /></a>
2-
=======================================================================================================================================================================
1+
# <a href="https://github.com/nteract/papermill"><img src="https://media.githubusercontent.com/media/nteract/logos/master/nteract_papermill/exports/images/png/papermill_logo_wide.png" height="48px" /></a>
32

43
<!---(binder links generated at https://mybinder.readthedocs.io/en/latest/howto/badges.html and compressed at https://tinyurl.com) -->
4+
55
[![CI](https://github.com/nteract/papermill/actions/workflows/ci.yml/badge.svg)](https://github.com/nteract/papermill/actions/workflows/ci.yml)
66
[![CI](https://github.com/nteract/papermill/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/nteract/papermill/actions/workflows/ci.yml)
77
[![image](https://codecov.io/github/nteract/papermill/coverage.svg?branch=main)](https://codecov.io/github/nteract/papermill?branch=main)
@@ -18,20 +18,20 @@ Jupyter Notebooks.
1818

1919
Papermill lets you:
2020

21-
- **parameterize** notebooks
22-
- **execute** notebooks
21+
- **parameterize** notebooks
22+
- **execute** notebooks
2323

2424
This opens up new opportunities for how notebooks can be used. For
2525
example:
2626

27-
- Perhaps you have a financial report that you wish to run with
28-
different values on the first or last day of a month or at the
29-
beginning or end of the year, **using parameters** makes this task
30-
easier.
31-
- Do you want to run a notebook and depending on its results, choose a
32-
particular notebook to run next? You can now programmatically
33-
**execute a workflow** without having to copy and paste from
34-
notebook to notebook manually.
27+
- Perhaps you have a financial report that you wish to run with
28+
different values on the first or last day of a month or at the
29+
beginning or end of the year, **using parameters** makes this task
30+
easier.
31+
- Do you want to run a notebook and depending on its results, choose a
32+
particular notebook to run next? You can now programmatically
33+
**execute a workflow** without having to copy and paste from
34+
notebook to notebook manually.
3535

3636
Papermill takes an *opinionated* approach to notebook parameterization and
3737
execution based on our experiences using notebooks at scale in data
@@ -41,14 +41,14 @@ pipelines.
4141

4242
From the command line:
4343

44-
``` {.sourceCode .bash}
44+
```{.sourceCode .bash}
4545
pip install papermill
4646
```
4747

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

51-
``` {.sourceCode .bash}
51+
```{.sourceCode .bash}
5252
pip install papermill[all]
5353
```
5454

@@ -62,13 +62,13 @@ drop support in the future.
6262

6363
### Parameterizing a Notebook
6464

65-
To parameterize your notebook designate a cell with the tag ``parameters``.
65+
To parameterize your notebook designate a cell with the tag `parameters`.
6666

6767
![enable parameters in Jupyter](docs/img/enable_parameters.gif)
6868

69-
Papermill looks for the ``parameters`` cell and treats this cell as defaults for the parameters passed in at execution time. Papermill will add a new cell tagged with ``injected-parameters`` with input parameters in order to overwrite the values in ``parameters``. If no cell is tagged with ``parameters`` the injected cell will be inserted at the top of the notebook.
69+
Papermill looks for the `parameters` cell and treats this cell as defaults for the parameters passed in at execution time. Papermill will add a new cell tagged with `injected-parameters` with input parameters in order to overwrite the values in `parameters`. If no cell is tagged with `parameters` the injected cell will be inserted at the top of the notebook.
7070

71-
Additionally, if you rerun notebooks through papermill and it will reuse the ``injected-parameters`` cell from the prior run. In this case Papermill will replace the old ``injected-parameters`` cell with the new run's inputs.
71+
Additionally, if you rerun notebooks through papermill and it will reuse the `injected-parameters` cell from the prior run. In this case Papermill will replace the old `injected-parameters` cell with the new run's inputs.
7272

7373
![image](docs/img/parameters.png)
7474

@@ -79,7 +79,7 @@ the Python API and (2) through the command line interface.
7979

8080
#### Execute via the Python API
8181

82-
``` {.sourceCode .python}
82+
```{.sourceCode .python}
8383
import papermill as pm
8484
8585
pm.execute_notebook(
@@ -94,48 +94,48 @@ pm.execute_notebook(
9494
Here's an example of a local notebook being executed and output to an
9595
Amazon S3 account:
9696

97-
``` {.sourceCode .bash}
97+
```{.sourceCode .bash}
9898
$ papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
9999
```
100100

101101
**NOTE:**
102102
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:
103103

104-
``` {.sourceCode .bash}
104+
```{.sourceCode .bash}
105105
$ AWS_PROFILE=dev_account papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
106106
```
107107

108-
In the above example, two parameters are set: ``alpha`` and ``l1_ratio`` using ``-p`` (``--parameters`` also works). Parameter values that look like booleans or numbers will be interpreted as such. Here are the different ways users may set parameters:
108+
In the above example, two parameters are set: `alpha` and `l1_ratio` using `-p` (`--parameters` also works). Parameter values that look like booleans or numbers will be interpreted as such. Here are the different ways users may set parameters:
109109

110-
``` {.sourceCode .bash}
110+
```{.sourceCode .bash}
111111
$ papermill local/input.ipynb s3://bkt/output.ipynb -r version 1.0
112112
```
113113

114-
Using ``-r`` or ``--parameters_raw``, users can set parameters one by one. However, unlike ``-p``, the parameter will remain a string, even if it may be interpreted as a number or boolean.
114+
Using `-r` or `--parameters_raw`, users can set parameters one by one. However, unlike `-p`, the parameter will remain a string, even if it may be interpreted as a number or boolean.
115115

116-
``` {.sourceCode .bash}
116+
```{.sourceCode .bash}
117117
$ papermill local/input.ipynb s3://bkt/output.ipynb -f parameters.yaml
118118
```
119119

120-
Using ``-f`` or ``--parameters_file``, users can provide a YAML file from which parameter values should be read.
120+
Using `-f` or `--parameters_file`, users can provide a YAML file from which parameter values should be read.
121121

122-
``` {.sourceCode .bash}
122+
```{.sourceCode .bash}
123123
$ papermill local/input.ipynb s3://bkt/output.ipynb -y "
124124
alpha: 0.6
125125
l1_ratio: 0.1"
126126
```
127127

128-
Using ``-y`` or ``--parameters_yaml``, users can directly provide a YAML string containing parameter values.
128+
Using `-y` or `--parameters_yaml`, users can directly provide a YAML string containing parameter values.
129129

130-
``` {.sourceCode .bash}
130+
```{.sourceCode .bash}
131131
$ papermill local/input.ipynb s3://bkt/output.ipynb -b YWxwaGE6IDAuNgpsMV9yYXRpbzogMC4xCg==
132132
```
133133

134-
Using ``-b`` or ``--parameters_base64``, users can provide a YAML string, base64-encoded, containing parameter values.
134+
Using `-b` or `--parameters_base64`, users can provide a YAML string, base64-encoded, containing parameter values.
135135

136-
When using YAML to pass arguments, through ``-y``, ``-b`` or ``-f``, parameter values can be arrays or dictionaries:
136+
When using YAML to pass arguments, through `-y`, `-b` or `-f`, parameter values can be arrays or dictionaries:
137137

138-
``` {.sourceCode .bash}
138+
```{.sourceCode .bash}
139139
$ papermill local/input.ipynb s3://bkt/output.ipynb -y "
140140
x:
141141
- 0.0
@@ -151,25 +151,23 @@ linear_function:
151151

152152
Papermill supports the following name handlers for input and output paths during execution:
153153

154-
* Local file system: `local`
154+
- Local file system: `local`
155155

156-
* HTTP, HTTPS protocol: `http://, https://`
156+
- HTTP, HTTPS protocol: `http://, https://`
157157

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

160-
* Azure: [Azure DataLake Store](https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-overview), [Azure Blob Store](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview) `adl://, abs://`
160+
- Azure: [Azure DataLake Store](https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-overview), [Azure Blob Store](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview) `adl://, abs://`
161161

162-
* Google Cloud: [Google Cloud Storage](https://cloud.google.com/storage/) `gs://`
162+
- Google Cloud: [Google Cloud Storage](https://cloud.google.com/storage/) `gs://`
163163

164-
Development Guide
165-
-----------------
164+
## Development Guide
166165

167166
Read [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to setup a local development environment and make code changes back to Papermill.
168167

169168
For development guidelines look in the [DEVELOPMENT_GUIDE.md](./DEVELOPMENT_GUIDE.md) file. This should inform you on how to make particular additions to the code base.
170169

171-
Documentation
172-
-------------
170+
## Documentation
173171

174172
We host the [Papermill documentation](http://papermill.readthedocs.io)
175173
on ReadTheDocs.

binder/cli-simple/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Simple CLI Example
22

33
This example uses three notebooks:
4+
45
- simple_input.ipynb
56
- simple_output.ipynb
67
- cli_example.ipynb
78

89
1. Open the cli_example.ipynb notebook.
910

10-
2. Begin executing the cells.
11+
1. Begin executing the cells.
1112

12-
3. One cell demonstrates running papermill from the the command line.
13+
1. One cell demonstrates running papermill from the the command line.

binder/cli-simple/simple_output.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@
138138
},
139139
"nbformat": 4,
140140
"nbformat_minor": 1
141-
}
141+
}

0 commit comments

Comments
 (0)