Skip to content

Commit eb1c8cf

Browse files
authored
Merge pull request #127 from frreiss/branch-binder
Support for running notebooks on Binder
2 parents 73bedd8 + 4b99f64 commit eb1c8cf

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Text Extensions for Pandas
33

44
[![Documentation Status](https://readthedocs.org/projects/text-extensions-for-pandas/badge/?version=latest)](https://text-extensions-for-pandas.readthedocs.io/en/latest/?badge=latest)
5+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/frreiss/tep-fred/branch-binder?urlpath=lab/tree/notebooks)
6+
57

68
Natural language processing support for Pandas dataframes.
79

@@ -61,8 +63,16 @@ of this repository to the front of `sys.path`.
6163

6264
## Documentation
6365

64-
For examples of how to use the library, take a look at the notebooks in
65-
[this directory](https://github.com/CODAIT/text-extensions-for-pandas/tree/master/notebooks).
66+
For examples of how to use the library, take a look at the **example notebooks** in
67+
[this directory](https://github.com/CODAIT/text-extensions-for-pandas/tree/master/notebooks). You can try out these notebooks on [Binder](https://mybinder.org/) by navigating to [https://mybinder.org/v2/gh/frreiss/tep-fred/branch-binder?urlpath=lab/tree/notebooks](https://mybinder.org/v2/gh/frreiss/tep-fred/branch-binder?urlpath=lab/tree/notebooks)
68+
69+
To run the notebooks on your local machine, follow the following steps:
70+
71+
1. Install [Anaconda](https://docs.anaconda.com/anaconda/install/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html).
72+
1. Check out a copy of this repository.
73+
1. Use the script `env.sh` to set up an Anaconda environment for running the code in this repository.
74+
1. Type `jupyter lab` from the root of your local source tree to start a [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) environment.
75+
1. Navigate to the `notebooks` directory and choose any of the notebooks there
6676

6777
API documentation can be found at [https://text-extensions-for-pandas.readthedocs.io/en/latest/](https://text-extensions-for-pandas.readthedocs.io/en/latest/)
6878

@@ -73,6 +83,7 @@ API documentation can be found at [https://text-extensions-for-pandas.readthedoc
7383
* **env.sh**: Script to create a conda environment `pd` capable of running the notebooks and test cases in this project
7484
* **generate_docs.sh**: Script to build the [API documentation]((https://readthedocs.org/projects/text-extensions-for-pandas/)
7585
* **api_docs**: Configuration files for `generate_docs.sh`
86+
* **binder**: Configuration files for [running notebooks on Binder](https://mybinder.org/v2/gh/frreiss/tep-fred/branch-binder?urlpath=lab/tree/notebooks)
7687
* **config**: Configuration files for `env.sh`.
7788
* **docs**: Project web site
7889
* **notebooks**: example notebooks
@@ -83,12 +94,6 @@ API documentation can be found at [https://text-extensions-for-pandas.readthedoc
8394
cover complex end-to-end NLP use cases (work in progress).
8495

8596

86-
## Instructions to run a demo notebook
87-
1. Check out a copy of this repository
88-
1. (optional) Use the script `env.sh` to set up an Anaconda environment for running the code in this repository.
89-
1. Type `jupyter lab` from the root of your local source tree to start a [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) environment.
90-
1. Navigate to the `notebooks` directory and choose any of the notebooks there
91-
9297

9398
## Contributing
9499

binder/postBuild

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Post-build script for binder/repo2docker environment setup.
2+
3+
# Log commands
4+
set -ex
5+
6+
# Install additional packages beyond those in requirements.txt so that the
7+
# JupyterLab instance will be able to run all of the NLP library integrations.
8+
pip install -r config/dev_reqs.txt
9+
pip install -r config/jupyter_reqs.txt
10+
11+

0 commit comments

Comments
 (0)