Skip to content

Add support for Python 3.10 #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
needs: generate-stack-name
steps:
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.10
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -58,10 +58,10 @@ jobs:
runs-on: ubuntu-latest
needs: [generate-stack-name, create-stack]
steps:
- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.10
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ on: [push, pull_request]
jobs:
unit-tests:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == true
strategy:
matrix:
python-version: ['3.8', '3.10']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Set up Node.js 14.x
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook.

## Upcoming
- Added support for Python 3.10 ([Link to PR](https://github.com/aws/graph-notebook/pull/476))
- Fixed Dockerfile builds breaking with AL2023 ([Link to PR](https://github.com/aws/graph-notebook/pull/466))
- Fixed `--store-to` option for several magics ([Link to PR](https://github.com/aws/graph-notebook/pull/463))
- Fixed broken documentation links in Neptune ML notebooks ([PR #1](https://github.com/aws/graph-notebook/pull/467)) ([PR #2](https://github.com/aws/graph-notebook/pull/468))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ It is recommended to check the [ChangeLog.md](ChangeLog.md) file periodically to

You will need:

* [Python](https://www.python.org/downloads/) 3.8.0-3.9.7
* [Python](https://www.python.org/downloads/) 3.8.0-3.10.11
* A graph database that provides one or more of:
* A SPARQL 1.1 endpoint
* An Apache TinkerPop Gremlin Server compatible endpoint
Expand Down Expand Up @@ -313,8 +313,8 @@ cd graph-notebook
# 2) Create a new virtual environment

# 2a) Option 1 - pyenv
pyenv install 3.9.7 # Only if not already installed; this can be any supported Python 3 version in Prerequisites
pyenv virtualenv 3.9.7 build-graph-notebook
pyenv install 3.10.11 # Only if not already installed; this can be any supported Python 3 version in Prerequisites
pyenv virtualenv 3.10.11 build-graph-notebook
pyenv local build-graph-notebook

# 2b) Option 2 - venv
Expand Down
21 changes: 11 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
SPARQLWrapper==1.8.4
networkx==2.4
Jinja2==3.0.3
Jinja2>=3.0.3,<=3.1.2
jupyter==1.0.0
notebook>=6.1.5,<6.5.0
ipywidgets==7.7.2
jupyterlab_widgets>=1.0.0,<3.0.0
nbclient<=0.7.0
jupyter-contrib-nbextensions<=0.7.0
widgetsnbextension<=3.6.1
gremlinpython>=3.5.1,<=3.6.1
requests==2.24.0
gremlinpython>=3.5.1,<=3.6.2
requests>=2.27.0,<=2.28.2
ipython==8.10.0
ipykernel==5.3.4
neo4j==4.2.1
neo4j>=4.4.9,<5.0.0
rdflib==5.0.0
setuptools>=65.5.1,<=66.0.0
nbconvert>=6.3.0,<=7.2.8
jedi<0.18.0
jedi>=0.18.1,<=0.18.2
markupsafe<2.1.0
itables>=1.0.0,<=1.4.5,!=1.4.3,!=1.4.4
pandas<=1.5.3
itables>=1.0.0,<=1.5.2,!=1.4.3,!=1.4.4
pandas>=1.4.0,<=1.5.3
numpy<1.24.0
nest_asyncio==1.5.6

# requirements for testing
botocore~=1.18.18
boto3~=1.15.15
pytest==6.2.2
botocore~=1.21.49
boto3~=1.18.49
pytest==6.2.5
parameterized==0.8.1
26 changes: 13 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,30 @@ def get_version():
package_dir={'': 'src'},
include_package_data=True,
install_requires=[
'gremlinpython>=3.5.1,<=3.6.1',
'gremlinpython>=3.5.1,<=3.6.2',
'SPARQLWrapper==1.8.4',
'requests<=2.28.2',
'requests>=2.27.0,<=2.28.2',
'ipywidgets==7.7.2',
'jupyterlab_widgets>=1.0.0,<3.0.0',
'networkx==2.4',
'Jinja2==3.0.3',
'Jinja2>=3.0.3,<=3.1.2',
'notebook>=6.1.5,<6.5.0',
'nbclient<=0.7.0',
'nbclient<=0.7.3',
'jupyter-contrib-nbextensions<=0.7.0',
'widgetsnbextension<=3.6.1',
'jupyter==1.0.0',
'botocore>=1.19.37,<=1.29.53',
'boto3>=1.17.58,<=1.26.53',
'botocore>=1.21.49,<=1.29.53',
'boto3>=1.18.49,<=1.26.53',
'ipython==8.10.0',
'neo4j==4.3.2',
'neo4j>=4.4.9,<5.0.0',
'rdflib==5.0.0',
'ipykernel==5.3.4',
'nbconvert>=6.3.0,<=7.2.8',
'jedi<0.18.0',
'markupsafe<2.1.0',
'itables>=1.0.0,<=1.4.5,!=1.4.3,!=1.4.4',
'pandas<=1.5.3',
'numpy<1.24.0'
'jedi>=0.18.1,<=0.18.2',
'itables>=1.0.0,<=1.5.2,!=1.4.3,!=1.4.4',
'pandas>=1.4.0,<=1.5.3',
'numpy<1.24.0',
'nest_asyncio==1.5.6'
],
package_data={
'graph_notebook': ['graph_notebook/widgets/nbextensions/**',
Expand All @@ -104,6 +104,6 @@ def get_version():
],
keywords='jupyter neptune gremlin sparql',
tests_require=[
'pytest'
'pytest==6.2.5'
]
)
4 changes: 2 additions & 2 deletions src/graph_notebook/network/EventfulNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SPDX-License-Identifier: Apache-2.0
"""

from collections import defaultdict
from collections import defaultdict, abc
import collections
import re
import json
Expand Down Expand Up @@ -126,7 +126,7 @@ def flatten(self, d: dict, parent_key='', sep='_') -> dict:
items = []
for k, v in d.items():
new_key = parent_key + sep + k if parent_key else k
if isinstance(v, collections.MutableMapping):
if isinstance(v, collections.abc.MutableMapping):
items.extend(self.flatten(v).items())
else:
items.append((new_key, v))
Expand Down