From ceee4a1525157d8d7bd13d88c957b465ed01349d Mon Sep 17 00:00:00 2001 From: Matthew Seal Date: Tue, 31 Mar 2020 15:24:46 -0700 Subject: [PATCH] Removed python 3.5 and made nbclient dependency >= 0.2 --- .travis.yml | 2 -- CONTRIBUTING.md | 17 ++++++++- README.md | 3 +- azure-pipelines.yml | 12 ------- binder/cli-simple/simple_output.ipynb | 50 ++++++++++++++++++--------- docs/changelog.md | 5 +++ docs/index.rst | 2 +- requirements.txt | 4 +-- setup.py | 3 +- tox.ini | 3 +- 10 files changed, 61 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 373a18ce..f4336205 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17c3aaff..c1774669 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. @@ -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 @@ -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 git commit ``` + 2. Push changes to your remote repository: + ```bash git push -u origin my-feature ``` @@ -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 ``` diff --git a/README.md b/README.md index 8203a5d3..89352d18 100644 --- a/README.md +++ b/README.md @@ -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/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cce43364..5340e395 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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' @@ -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' @@ -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' diff --git a/binder/cli-simple/simple_output.ipynb b/binder/cli-simple/simple_output.ipynb index effde0c6..46a6d191 100644 --- a/binder/cli-simple/simple_output.ipynb +++ b/binder/cli-simple/simple_output.ipynb @@ -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": [] @@ -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": [ @@ -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": [ @@ -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": [] @@ -105,8 +123,8 @@ "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", @@ -114,8 +132,8 @@ "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, diff --git a/docs/changelog.md b/docs/changelog.md index cae00c87..fbc753e6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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. diff --git a/docs/index.rst b/docs/index.rst index 85e38b08..d7224d8c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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. diff --git a/requirements.txt b/requirements.txt index c86ee8b0..baa87769 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index a2bd9528..5df7f679 100644 --- a/setup.py +++ b/setup.py @@ -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']}, @@ -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', diff --git a/tox.ini b/tox.ini index acbf2487..0000c616 100644 --- a/tox.ini +++ b/tox.ini @@ -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] @@ -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