Skip to content

Commit

Permalink
Removed python 3.5 and made nbclient dependency >= 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Mar 31, 2020
1 parent ebb1853 commit ceee4a1
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ language: python
sudo: false
matrix:
include:
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
Expand Down
17 changes: 16 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,27 @@ If you are contributing with documentation please jump to [building documentatio
We need to install the development package before we can run the tests. If anything is confusing below, always resort to the relevant documentation.

For the most basic test runs against python 3.6 use this tox subset (callable after `pip install tox`):

```bash
tox -e py36
```

This will just execute the unittests against python 3.6 in a new virtual env. The first run will take longer to setup the virtualenv, but will be fast after that point.

For a full test suite of all envs and linting checks simply run tox without any arguments

```bash
tox
```
This will require python2.7, python3.5, python3.6, and python3.7 to be installed. **Note** that python 3.7 has problems with the alpha build which is the available package version on many linux distros. Local build failures with 3.7 can happen as a result (you'll see a seg fault or exist code -11).

This will require python3.6, python3.8, and python3.7 to be installed. **Note** that python 3.7 has problems with the alpha build which is the available package version on many linux distros. Local build failures with 3.7 can happen as a result (you'll see a seg fault or exist code -11).

Alternavitely pytest can be used if you have an environment already setup which works or has custom packages not present in the tox build.

```bash
pytest --pyargs papermill
```

The `pyargs` option allows `pytest` to interpret arguments as python package names. An advantage is that `pytest` will run in any directory, and this approach follows the `pytest` [best practices](https://docs.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code).

Now there should be a working and editable installation of Papermill to start making your own contributions.
Expand All @@ -86,6 +92,7 @@ This will generate `.html` files in the `/.tox/docs_out/` directory. Once you ar
## So You're Ready to Pull Request

The general workflow for this will be:

1. Run local tests
2. Pushed changes to your forked repository
3. Open pull request to main repository
Expand All @@ -97,26 +104,33 @@ pytest --pyargs papermill
```

Run check manifest to ensure all files are accounted for in the repository.

```bash
check-manifest
```

This commands read the `MANIFEST.in` file and explicitly specify the files to include in the source distribution. You can read more about how this works [here](https://docs.python.org/3/distutils/sourcedist.html).

### Push Changes to Forked Repo

Your commits should be pushed to the forked repository. To verify this type

```bash
git remote -v
```

and ensure the remotes point to your GitHub. Don't work on the master branch!

1. Commit changes to local repository:

```bash
git checkout -b my-feature
git add <updated_files>
git commit
```

2. Push changes to your remote repository:

```bash
git push -u origin my-feature
```
Expand All @@ -128,6 +142,7 @@ Follow [these](https://help.github.com/articles/creating-a-pull-request-from-a-f
There are good references to the [Git documentation](https://git-scm.com/doc) and [Git workflows](https://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html) for more information if any of this is unfamiliar.

_Note: You might want to set a reference to the main repository to fetch/merge from there instead of your forked repository. You can do that using:_

```bash
git remote add upstream https://github.com/nteract/papermill
```
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
[![image](https://codecov.io/github/nteract/papermill/coverage.svg?branch=master)](https://codecov.io/github/nteract/papermill?branch=master)
[![Documentation Status](https://readthedocs.org/projects/papermill/badge/?version=latest)](http://papermill.readthedocs.io/en/latest/?badge=latest)
[![badge](https://tinyurl.com/ybwovtw2)](https://mybinder.org/v2/gh/nteract/papermill/master?filepath=binder%2Fprocess_highlight_dates.ipynb)
[![badge](https://tinyurl.com/y7uz2eh9)](https://mybinder.org/v2/gh/nteract/papermill/master?filepath=binder%2Fcli-simple%2Fcli_example.ipynb)
[![Python 3.5](https://img.shields.io/badge/python-3.5-blue.svg)](https://www.python.org/downloads/release/python-350/)
[![badge](https://tinyurl.com/y7uz2eh9)](https://mybinder.org/v2/gh/nteract/papermill/master?
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
Expand Down
12 changes: 0 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
- job: 'Test'
strategy:
matrix:
py35-linux:
imageName: $(linux)
python.version: '3.5'
tox.env: py35
py36-linux:
imageName: $(linux)
python.version: '3.6'
Expand All @@ -28,10 +24,6 @@ jobs:
imageName: $(linux)
python.version: '3.7'
tox.env: py37
py35-mac:
imageName: $(mac)
python.version: '3.5'
tox.env: py35
py36-mac:
imageName: $(mac)
python.version: '3.6'
Expand All @@ -40,10 +32,6 @@ jobs:
imageName: $(mac)
python.version: '3.7'
tox.env: py37
py35-win:
imageName: $(windows)
python.version: '3.5'
tox.env: py35
py36-win:
imageName: $(windows)
python.version: '3.6'
Expand Down
50 changes: 34 additions & 16 deletions binder/cli-simple/simple_output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"cell_type": "markdown",
"metadata": {
"papermill": {
"duration": 0.007888,
"end_time": "2020-01-28T07:57:21.147746",
"duration": 0.008268,
"end_time": "2020-03-31T22:13:45.530631",
"exception": false,
"start_time": "2020-01-28T07:57:21.139858",
"start_time": "2020-03-31T22:13:45.522363",
"status": "completed"
},
"tags": []
Expand All @@ -20,11 +20,17 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2020-03-31T22:13:45.571537Z",
"iopub.status.busy": "2020-03-31T22:13:45.565912Z",
"iopub.status.idle": "2020-03-31T22:13:45.573254Z",
"shell.execute_reply": "2020-03-31T22:13:45.568463Z"
},
"papermill": {
"duration": 0.012612,
"end_time": "2020-01-28T07:57:21.172238",
"duration": 0.02564,
"end_time": "2020-03-31T22:13:45.573471",
"exception": false,
"start_time": "2020-01-28T07:57:21.159626",
"start_time": "2020-03-31T22:13:45.547831",
"status": "completed"
},
"tags": [
Expand All @@ -40,11 +46,17 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2020-03-31T22:13:45.631535Z",
"iopub.status.busy": "2020-03-31T22:13:45.627605Z",
"iopub.status.idle": "2020-03-31T22:13:45.633788Z",
"shell.execute_reply": "2020-03-31T22:13:45.626311Z"
},
"papermill": {
"duration": 0.010011,
"end_time": "2020-01-28T07:57:21.184448",
"duration": 0.046538,
"end_time": "2020-03-31T22:13:45.634929",
"exception": false,
"start_time": "2020-01-28T07:57:21.174437",
"start_time": "2020-03-31T22:13:45.588391",
"status": "completed"
},
"tags": [
Expand All @@ -61,11 +73,17 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2020-03-31T22:13:45.745359Z",
"iopub.status.busy": "2020-03-31T22:13:45.731399Z",
"iopub.status.idle": "2020-03-31T22:13:45.780277Z",
"shell.execute_reply": "2020-03-31T22:13:45.756062Z"
},
"papermill": {
"duration": 0.011221,
"end_time": "2020-01-28T07:57:21.199409",
"duration": 0.104207,
"end_time": "2020-03-31T22:13:45.783570",
"exception": false,
"start_time": "2020-01-28T07:57:21.188188",
"start_time": "2020-03-31T22:13:45.679363",
"status": "completed"
},
"tags": []
Expand Down Expand Up @@ -105,17 +123,17 @@
"version": "3.6.7"
},
"papermill": {
"duration": 1.157077,
"end_time": "2020-01-28T07:57:21.525041",
"duration": 2.644132,
"end_time": "2020-03-31T22:13:45.995934",
"environment_variables": {},
"exception": null,
"input_path": "binder/cli-simple/simple_input.ipynb",
"output_path": "binder/cli-simple/simple_output.ipynb",
"parameters": {
"msg": "Hello"
},
"start_time": "2020-01-28T07:57:20.367964",
"version": "1.2.1"
"start_time": "2020-03-31T22:13:43.351802",
"version": "2.0.0"
}
},
"nbformat": 4,
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 2.1.0

- Support for python 3.5 has been dropped. Upstream library changes for async were causing process deadlocks with await commands. End-of-life is later this year for 3.5 anyway so we decided to also drop support here.
- Error cells injected at the top of failed notebooks look nicer now as markdown.

## 2.0.0

Papermill 2.0 has a number of awesome features from many different contributors. We used the major version change mostly to signify the change to Python 3 only, but we also allowed for PRs which has small interaction changes to also be made. No major functionality should change with this release, but many minor improvements might impact specific execution patterns. We'll keep an eye on issues and post bug fixes ASAP if any of these cause larger unexpected issues.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This opens up new opportunities for how notebooks can be used. For example:
Python Version Support
----------------------

This library currently supports python 3.5+ versions. As minor python
This library currently supports python 3.6+ versions. As minor python
versions are officially sunset by the python org papermill will similarly
drop support in the future.

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ ansiwrap
click
pyyaml
nbformat
nbclient
nbclient >= 0.2.0
tqdm >= 4.32.2
jupyter_client
requests
entrypoints
tenacity
black; python_version >= '3.6'
black
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def read_reqs(fname):
long_description_content_type='text/markdown',
url='https://github.com/nteract/papermill',
packages=['papermill'],
python_requires='>=3.5',
python_requires='>=3.6',
install_requires=read_reqs('requirements.txt'),
extras_require=extras_require,
entry_points={'console_scripts': ['papermill = papermill.cli:papermill']},
Expand All @@ -88,7 +88,6 @@ def read_reqs(fname):
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist = true
envlist = py{35,36,37,38}, flake8, dist, manifest, docs, binder
envlist = py{36,37,38}, flake8, dist, manifest, docs, binder

# Linters
[testenv:flake8]
Expand Down Expand Up @@ -57,7 +57,6 @@ setenv =
AWS_SECRET_ACCESS_KEY=foobar_secret
passenv = *
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
Expand Down

0 comments on commit ceee4a1

Please sign in to comment.