Skip to content

Commit

Permalink
Merge pull request #72 from quantopian/update-jupyter-versions
Browse files Browse the repository at this point in the history
MAINT: Update supported IPython/Notebook versions.
  • Loading branch information
Scott Sanderson authored Dec 31, 2019
2 parents 5fad3f6 + cf925b4 commit c2a5f20
Show file tree
Hide file tree
Showing 13 changed files with 203 additions and 67 deletions.
45 changes: 31 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
language: python
sudo: false

python:
- "2.7"
- "3.5"
- "3.6"
env:
- NB_VERSION=4
- NB_VERSION=5
- FLAKE8=true NB_VERSION=5
- NOTEST=true NB_VERSION=5
jobs:
include:
- name: "Python 2.7 - Notebook 5 Tests"
python: "2.7"
env:
- TOXENV=py27-notebook5
- name: "Python 3.5 - Notebook 5 Tests"
python: "3.5"
env:
- TOXENV=py35-notebook5
- name: "Python 3.6 - Notebook 5 Tests"
python: "3.6"
env:
- TOXENV=py36-notebook5
- name: "Python 3.5 - Notebook 6 Tests"
python: "3.5"
env:
- TOXENV=py35-notebook6
- name: "Python 3.6 - Notebook 6 Tests"
python: "3.6"
env:
- TOXENV=py36-notebook6
- name: "Check [tests] deps not required"
python: "3.5"
env:
- TOXENV=notest
- name: "Flake8"
python: "3.5"
env:
- TOXENV=flake8

services:
- postgresql
Expand All @@ -21,11 +42,7 @@ install:
- pip install tox

script:
- if [[ $TRAVIS_PYTHON_VERSION = '2.7' ]]; then tox -e py27-notebook$NB_VERSION; fi
- if [[ $TRAVIS_PYTHON_VERSION = '3.5' ]]; then tox -e py35-notebook$NB_VERSION; fi
- if [[ $TRAVIS_PYTHON_VERSION = '3.6' ]]; then tox -e py36-notebook$NB_VERSION; fi
- if [[ $FLAKE8 = 'true' ]]; then tox -e notest; fi
- if [[ $NOTEST = 'true' ]]; then tox -e flake8; fi
- tox

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Getting Started
---------------
**Prerequisites:**
- Write access to an empty `PostgreSQL <http://www.postgresql.org>`_ database.
- A Python installation with `Jupyter Notebook <https://github.com/jupyter/notebook>`_ >= 4.0.
- A Python installation with `Jupyter Notebook <https://github.com/jupyter/notebook>`_ >= 5.0.

**Installation:**

Expand Down
2 changes: 0 additions & 2 deletions notebook4_constraints.txt

This file was deleted.

74 changes: 73 additions & 1 deletion notebook5_constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1,73 @@
notebook<6
alembic==1.3.2
attrs==19.3.0
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
bleach==3.1.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
configparser==4.0.2
contextlib2==0.6.0.post1
cryptography==2.8
decorator==4.4.1
defusedxml==0.6.0
entrypoints==0.3
enum34==1.1.6
flake8==3.7.9
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.3.0
idna==2.8
importlib-metadata==1.3.0
ipaddress==1.0.23
ipykernel==4.10.1
ipython==5.8.0
ipython-genutils==0.2.0
Jinja2==2.10.3
jsonschema==3.2.0
jupyter-client==5.3.4
jupyter-core==4.6.1
Mako==1.1.0
MarkupSafe==1.1.1
mccabe==0.6.1
mistune==0.8.4
mock==3.0.5
more-itertools==5.0.0
nbconvert==5.6.1
nbformat==4.4.0
nose==1.3.7
nose-ignore-docstring==0.2
notebook==5.7.8
pandocfilters==1.4.2
pathlib2==2.3.5
pexpect==4.7.0
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==1.0.18
psycopg2==2.8.4
ptyprocess==0.6.0
pycodestyle==2.5.0
pycparser==2.19
pyflakes==2.1.1
Pygments==2.5.2
pyrsistent==0.15.6
python-dateutil==2.8.1
python-editor==1.0.4
pyzmq==18.1.1
requests==2.22.0
scandir==1.10.0
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.13.0
SQLAlchemy==1.3.12
terminado==0.8.3
testpath==0.4.4
tornado==5.1.1
traitlets==4.3.3
typing==3.7.4.1
urllib3==1.25.7
wcwidth==0.1.7
webencodings==0.5.1
zipp==0.6.0
62 changes: 62 additions & 0 deletions notebook6_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
alembic==1.3.2
attrs==19.3.0
backcall==0.1.0
bleach==3.1.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
cryptography==2.8
decorator==4.4.1
defusedxml==0.6.0
entrypoints==0.3
flake8==3.7.9
idna==2.8
importlib-metadata==1.3.0
ipykernel==5.1.3
ipython==7.9.0
ipython-genutils==0.2.0
jedi==0.15.2
Jinja2==2.10.3
jsonschema==3.2.0
jupyter-client==5.3.4
jupyter-core==4.6.1
Mako==1.1.0
MarkupSafe==1.1.1
mccabe==0.6.1
mistune==0.8.4
mock==3.0.5
more-itertools==8.0.2
nbconvert==5.6.1
nbformat==4.4.0
nose==1.3.7
nose-ignore-docstring==0.2
notebook==6.0.2
pandocfilters==1.4.2
parso==0.5.2
pexpect==4.7.0
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==2.0.10
psycopg2==2.8.4
ptyprocess==0.6.0
pycodestyle==2.5.0
pycparser==2.19
pyflakes==2.1.1
Pygments==2.5.2
pyrsistent==0.15.6
python-dateutil==2.8.1
python-editor==1.0.4
pyzmq==18.1.1
requests==2.22.0
Send2Trash==1.5.0
six==1.13.0
SQLAlchemy==1.3.12
terminado==0.8.3
testpath==0.4.4
tornado==6.0.3
traitlets==4.3.3
urllib3==1.25.7
wcwidth==0.1.7
webencodings==0.5.1
zipp==0.6.0
6 changes: 4 additions & 2 deletions pgcontents/tests/test_hybrid_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
join as osjoin,
)
from posixpath import join as pjoin
from unittest import TestCase

from six import (
iteritems,
itervalues,
)
from unittest import TestCase
from IPython.utils.tempdir import TemporaryDirectory
from notebook.services.contents.tests.test_manager import TestContentsManager
from notebook.services.contents.tests.test_contents_api import APITest

from pgcontents.hybridmanager import HybridContentsManager
from pgcontents.pgmanager import PostgresContentsManager
Expand All @@ -29,7 +31,7 @@
remigrate_test_schema,
TEST_DB_URL,
)
from ..utils.ipycompat import APITest, FileContentsManager, TestContentsManager
from ..utils.ipycompat import FileContentsManager


setup_module = remigrate_test_schema
Expand Down
9 changes: 7 additions & 2 deletions pgcontents/tests/test_pgcontents_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from six import iteritems

from IPython.utils.tempdir import TemporaryDirectory
from notebook.services.contents.tests.test_contents_api import APITest
from notebook.tests.launchnotebook import assert_http_error
from requests import HTTPError

from ..constants import UNLIMITED
Expand All @@ -50,8 +52,11 @@
TEST_DB_URL,
)
from ..utils.ipycompat import (
APITest, Config, FileContentsManager, GenericFileCheckpoints, to_os_path,
assert_http_error)
Config,
FileContentsManager,
GenericFileCheckpoints,
to_os_path,
)
from ..utils.sync import walk, walk_dirs


Expand Down
3 changes: 2 additions & 1 deletion pgcontents/tests/test_pgmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from cryptography.fernet import Fernet
from itertools import combinations

from notebook.services.contents.tests.test_manager import TestContentsManager

from pgcontents.pgmanager import PostgresContentsManager
from .utils import (
assertRaisesHTTPError,
Expand All @@ -31,7 +33,6 @@
remigrate_test_schema,
)
from ..crypto import FernetEncryption
from ..utils.ipycompat import TestContentsManager
from ..utils.sync import walk_files_with_content

setup_module = remigrate_test_schema
Expand Down
14 changes: 0 additions & 14 deletions pgcontents/utils/ipycompat.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
Utilities for managing compat between notebook versions.
"""
import notebook
if notebook.version_info[0] >= 6: # noqa
raise ImportError("Jupyter Notebook versions 6 and up are not supported.")

from traitlets.config import Config
from notebook.services.contents.checkpoints import (
Checkpoints,
Expand All @@ -15,13 +11,6 @@
GenericFileCheckpoints
)
from notebook.services.contents.manager import ContentsManager
from notebook.services.contents.tests.test_manager import (
TestContentsManager
)
from notebook.services.contents.tests.test_contents_api import (
APITest
)
from notebook.tests.launchnotebook import assert_http_error
from notebook.utils import to_os_path
from nbformat import from_dict, reads, writes
from nbformat.v4.nbbase import (
Expand All @@ -43,9 +32,7 @@


__all__ = [
'APITest',
'Any',
'assert_http_error',
'Bool',
'Checkpoints',
'Config',
Expand All @@ -57,7 +44,6 @@
'HasTraits',
'Instance',
'Integer',
'TestContentsManager',
'Unicode',
'from_dict',
'new_code_cell',
Expand Down
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

10 changes: 0 additions & 10 deletions requirements_test.txt

This file was deleted.

21 changes: 16 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ def read_requirements(basename):


def main():
reqs = read_requirements('requirements.txt')
test_reqs = read_requirements('requirements_test.txt')

setup(
name='pgcontents',
version='0.6',
Expand All @@ -45,9 +42,23 @@ def main():
'Programming Language :: Python',
'Topic :: Database',
],
install_requires=reqs,
install_requires=[
'SQLAlchemy>=1.0.5',
'alembic>=0.7.6',
'click>=3.3',
'cryptography>=1.4',
'psycopg2>=2.6.1',
'six>=1.9.0',
'notebook>=5.0',
],
extras_require={
'test': test_reqs,
'test': [
'notebook[test]',
'nose',
'nose-ignore-docstring',
'requests',
'mock',
],
},
scripts=[
'bin/pgcontents',
Expand Down
Loading

0 comments on commit c2a5f20

Please sign in to comment.