Skip to content

Commit

Permalink
Removed deprecated functions for 1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Apr 25, 2019
1 parent 916e99f commit a8bc422
Show file tree
Hide file tree
Showing 19 changed files with 91 additions and 1,131 deletions.
111 changes: 0 additions & 111 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ Papermill lets you:
- **parameterize** notebooks
- **execute** notebooks

**DEPRECATED** This functionality will be removed entirely in papermill 1.0,
the features are moved to [scrapbook](https://nteract-scrapbook.readthedocs.io/en/latest/):
- **collect** metrics across the notebooks
- **summarize collections** of notebooks

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

Expand Down Expand Up @@ -156,112 +151,6 @@ Papermill supports the following name handlers for input and output paths during

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

Python In-notebook Bindings
---------------------------

### Recording Values to the Notebook

**DEPRECATED** This functionality will be removed entirely in papermill 1.0

See scrapbook's [glue](https://nteract-scrapbook.readthedocs.io/en/latest/usage-glue.html)
for an equivilent API for this capability.

Users can save values to the notebook document to be consumed by other
notebooks.

Recording values to be saved with the notebook.

``` {.sourceCode .python}
"""notebook.ipynb"""
import papermill as pm
pm.record("hello", "world")
pm.record("number", 123)
pm.record("some_list", [1, 3, 5])
pm.record("some_dict", {"a": 1, "b": 2})
```

Users can recover those values as a Pandas dataframe via the
`read_notebook` function.

``` {.sourceCode .python}
"""summary.ipynb"""
import papermill as pm
nb = pm.read_notebook('notebook.ipynb')
nb.dataframe
```

![image](docs/img/nb_dataframe.png)

### Displaying Plots and Images Saved by Other Notebooks

**DEPRECATED** This functionality will be removed entirely in papermill 1.0

See scrapbook's [reglue](https://nteract-scrapbook.readthedocs.io/en/latest/usage-read-notebook.html#reglue)
for an equivilent API for this capability.

Display a matplotlib histogram with the key name `matplotlib_hist`.

``` {.sourceCode .python}
"""notebook.ipynb"""
import papermill as pm
from ggplot import mpg
import matplotlib.pyplot as plt
# turn off interactive plotting to avoid double plotting
plt.ioff()
f = plt.figure()
plt.hist('cty', bins=12, data=mpg)
pm.display('matplotlib_hist', f)
```

![image](docs/img/matplotlib_hist.png)

Read in that above notebook and display the plot saved at
`matplotlib_hist`.

``` {.sourceCode .python}
"""summary.ipynb"""
import papermill as pm
nb = pm.read_notebook('notebook.ipynb')
nb.display_output('matplotlib_hist')
```

![image](docs/img/matplotlib_hist.png)

### Analyzing a Collection of Notebooks

**DEPRECATED** This functionality will be removed entirely in papermill 1.0

See scrapbook's [scrapbook](https://nteract-scrapbook.readthedocs.io/en/latest/usage-read-notebooks.html)
model for an equivilent API for this capability.

Papermill can read in a directory of notebooks and provides the
`NotebookCollection` interface for operating on them.

``` {.sourceCode .python}
"""summary.ipynb"""
import papermill as pm
nbs = pm.read_notebooks('/path/to/results/')
# Show named plot from 'notebook1.ipynb'
# Accept a key or list of keys to plot in order.
nbs.display_output('train_1.ipynb', 'matplotlib_hist')
```

![image](docs/img/matplotlib_hist.png)

``` {.sourceCode .python}
# Dataframe for all notebooks in collection
nbs.dataframe.head(10)
```

![image](docs/img/nbs_dataframe.png)

Development Guide
-----------------

Expand Down
9 changes: 0 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ Papermill lets you:
* **parameterize** notebooks
* **execute** notebooks

**DEPRECATED** This functionality will be removed entirely in papermill 1.0,
the features are moved to [scrapbook](https://nteract-scrapbook.readthedocs.io/en/latest/):

* **collect** metrics across the notebooks
* **summarize collections** of notebooks

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

- Perhaps you have a financial report that you wish to run with different
Expand Down Expand Up @@ -56,10 +50,7 @@ These pages guide you through the installation and usage of papermill.
usage-workflow
usage-parameterize
usage-execute
usage-recording
usage-display
usage-store
usage-collection
usage-cli
extending-overview

Expand Down
1 change: 0 additions & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This part of the documentation lists the full API reference of all public classe
.. toctree::
:maxdepth: 2

papermill-api
papermill-cli
papermill-workflow
papermill-translators
Expand Down
29 changes: 0 additions & 29 deletions docs/reference/papermill-api.rst

This file was deleted.

52 changes: 45 additions & 7 deletions docs/reference/papermill.tests.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
Tests
=====
papermill.tests package
=======================

papermill.tests
---------------
Submodules
----------

papermill.tests.test\_abs module
--------------------------------

This reference documents the tests used in the development of papermill.
.. automodule:: papermill.tests.test_abs
:members:
:undoc-members:
:show-inheritance:

papermill.tests.test\_api module
papermill.tests.test\_adl module
--------------------------------

.. automodule:: papermill.tests.test_api
.. automodule:: papermill.tests.test_adl
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -30,6 +36,14 @@ papermill.tests.test\_conf module
:undoc-members:
:show-inheritance:

papermill.tests.test\_engines module
------------------------------------

.. automodule:: papermill.tests.test_engines
:members:
:undoc-members:
:show-inheritance:

papermill.tests.test\_exceptions module
---------------------------------------

Expand All @@ -46,6 +60,14 @@ papermill.tests.test\_execute module
:undoc-members:
:show-inheritance:

papermill.tests.test\_gcs module
--------------------------------

.. automodule:: papermill.tests.test_gcs
:members:
:undoc-members:
:show-inheritance:

papermill.tests.test\_iorw module
---------------------------------

Expand All @@ -62,6 +84,14 @@ papermill.tests.test\_parameterize module
:undoc-members:
:show-inheritance:

papermill.tests.test\_preprocessor module
-----------------------------------------

.. automodule:: papermill.tests.test_preprocessor
:members:
:undoc-members:
:show-inheritance:

papermill.tests.test\_s3 module
-------------------------------

Expand All @@ -78,6 +108,14 @@ papermill.tests.test\_translators module
:undoc-members:
:show-inheritance:

papermill.tests.test\_utils module
----------------------------------

.. automodule:: papermill.tests.test_utils
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------
Expand Down
63 changes: 0 additions & 63 deletions docs/usage-collection.rst

This file was deleted.

Loading

0 comments on commit a8bc422

Please sign in to comment.