diff --git a/doc/modules/ROOT/pages/tutorials/centrality-algorithms.adoc b/doc/modules/ROOT/pages/tutorials/centrality-algorithms.adoc index 08f9ecd3e..b888e5ae7 100644 --- a/doc/modules/ROOT/pages/tutorials/centrality-algorithms.adoc +++ b/doc/modules/ROOT/pages/tutorials/centrality-algorithms.adoc @@ -34,9 +34,11 @@ connection to the database. [source, python, role=no-test] ---- -from graphdatascience import GraphDataScience -import pandas as pd import os + +import pandas as pd + +from graphdatascience import GraphDataScience ---- [source, python, role=no-test] @@ -101,8 +103,8 @@ gds.run_cypher( gds.run_cypher( """ - UNWIND $rels AS rel - MATCH (source:City {node_id: rel.Origin}), (target:City {node_id: rel.Destination}) + UNWIND $rels AS rel + MATCH (source:City {node_id: rel.Origin}), (target:City {node_id: rel.Destination}) CREATE (source)-[:HAS_FLIGHT_TO]->(target) """, params={"rels": routes_df.to_dict("records")}, diff --git a/doc/modules/ROOT/pages/tutorials/community-detection.adoc b/doc/modules/ROOT/pages/tutorials/community-detection.adoc index 8fbeb9ea0..4f3dcdba2 100644 --- a/doc/modules/ROOT/pages/tutorials/community-detection.adoc +++ b/doc/modules/ROOT/pages/tutorials/community-detection.adoc @@ -34,9 +34,11 @@ connection to the database. [source, python, role=no-test] ---- -from graphdatascience import GraphDataScience -import pandas as pd import os + +import pandas as pd + +from graphdatascience import GraphDataScience ---- [source, python, role=no-test] @@ -114,8 +116,8 @@ gds.run_cypher( gds.run_cypher( """ - UNWIND $rels AS rel - MATCH (source:Subreddit {name: rel.SOURCE_SUBREDDIT}), (target:Subreddit {name: rel.TARGET_SUBREDDIT}) + UNWIND $rels AS rel + MATCH (source:Subreddit {name: rel.SOURCE_SUBREDDIT}), (target:Subreddit {name: rel.TARGET_SUBREDDIT}) CREATE (source)-[:HYPERLINKED_TO]->(target) """, params={"rels": relationship_df.to_dict("records")}, @@ -232,7 +234,7 @@ We can also check that the property was written by the below command. ---- gds.run_cypher( """ - MATCH (n) WHERE 'louvainCommunityId' IN keys(n) + MATCH (n) WHERE 'louvainCommunityId' IN keys(n) RETURN n.name, n.louvainCommunityId LIMIT 10 """ ) diff --git a/doc/modules/ROOT/pages/tutorials/fastrp-and-knn.adoc b/doc/modules/ROOT/pages/tutorials/fastrp-and-knn.adoc index 9a1cc609c..c6036d388 100644 --- a/doc/modules/ROOT/pages/tutorials/fastrp-and-knn.adoc +++ b/doc/modules/ROOT/pages/tutorials/fastrp-and-knn.adoc @@ -55,6 +55,7 @@ our GDS client connection to the database. [source, python, role=no-test] ---- import os + from graphdatascience import GraphDataScience # Get Neo4j DB URI and credentials from environment if applicable diff --git a/doc/modules/ROOT/pages/tutorials/gds-sessions-self-managed.adoc b/doc/modules/ROOT/pages/tutorials/gds-sessions-self-managed.adoc index 822b2f9e5..eafd65915 100644 --- a/doc/modules/ROOT/pages/tutorials/gds-sessions-self-managed.adoc +++ b/doc/modules/ROOT/pages/tutorials/gds-sessions-self-managed.adoc @@ -34,6 +34,7 @@ version `+1.12a1+` or later. [source, python, role=no-test] ---- from datetime import timedelta + %pip install "graphdatascience>=1.12a1" ---- @@ -50,7 +51,8 @@ is the main entry point for managing GDS Sessions. [source, python, role=no-test] ---- import os -from graphdatascience.session import GdsSessions, AuraAPICredentials + +from graphdatascience.session import AuraAPICredentials, GdsSessions client_id = os.environ["AURA_API_CLIENT_ID"] client_secret = os.environ["AURA_API_CLIENT_SECRET"] @@ -83,11 +85,13 @@ delete the session ourselves. [source, python, role=no-test] ---- import os -from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory, CloudLocation -from datetime import timedelta + +from graphdatascience.session import AlgorithmCategory, CloudLocation, DbmsConnectionInfo # Identify the Neo4j DBMS -db_connection = DbmsConnectionInfo(uri=os.environ["NEO4J_URI"], username=os.environ["NEO4J_USER"], password=os.environ["NEO4J_PASSWORD"]) +db_connection = DbmsConnectionInfo( + uri=os.environ["NEO4J_URI"], username=os.environ["NEO4J_USER"], password=os.environ["NEO4J_PASSWORD"] +) # Specify where to create the GDS session cloud_location = CloudLocation(provider="gcp", region="europe-west1") diff --git a/doc/modules/ROOT/pages/tutorials/gds-sessions.adoc b/doc/modules/ROOT/pages/tutorials/gds-sessions.adoc index e3c123698..f87818a23 100644 --- a/doc/modules/ROOT/pages/tutorials/gds-sessions.adoc +++ b/doc/modules/ROOT/pages/tutorials/gds-sessions.adoc @@ -50,7 +50,8 @@ is the main entry point for managing GDS Sessions. [source, python, role=no-test] ---- import os -from graphdatascience.session import GdsSessions, AuraAPICredentials + +from graphdatascience.session import AuraAPICredentials, GdsSessions client_id = os.environ["AURA_API_CLIENT_ID"] client_secret = os.environ["AURA_API_CLIENT_SECRET"] @@ -84,10 +85,13 @@ delete the session ourselves. ---- import os from datetime import timedelta -from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory + +from graphdatascience.session import AlgorithmCategory, DbmsConnectionInfo # Identify the AuraDB instance -db_connection = DbmsConnectionInfo(uri=os.environ["AURA_DB_ADDRESS"], username=os.environ["AURA_DB_USER"], password=os.environ["AURA_DB_PW"]) +db_connection = DbmsConnectionInfo( + uri=os.environ["AURA_DB_ADDRESS"], username=os.environ["AURA_DB_USER"], password=os.environ["AURA_DB_PW"] +) # Create a GDS session! memory = sessions.estimate( node_count=20, diff --git a/doc/modules/ROOT/pages/tutorials/heterogeneous-node-classification-with-hashgnn.adoc b/doc/modules/ROOT/pages/tutorials/heterogeneous-node-classification-with-hashgnn.adoc index 8d1acc9ee..3f6ada73a 100644 --- a/doc/modules/ROOT/pages/tutorials/heterogeneous-node-classification-with-hashgnn.adoc +++ b/doc/modules/ROOT/pages/tutorials/heterogeneous-node-classification-with-hashgnn.adoc @@ -44,6 +44,7 @@ connection to the database. ---- # Import our dependencies import os + from graphdatascience import GraphDataScience ---- diff --git a/doc/modules/ROOT/pages/tutorials/import-sample-export-gnn.adoc b/doc/modules/ROOT/pages/tutorials/import-sample-export-gnn.adoc index 714c1ec92..badfad6dd 100644 --- a/doc/modules/ROOT/pages/tutorials/import-sample-export-gnn.adoc +++ b/doc/modules/ROOT/pages/tutorials/import-sample-export-gnn.adoc @@ -57,15 +57,16 @@ connection to the database. [source, python, role=no-test] ---- import os -import pandas as pd -from graphdatascience import GraphDataScience +import random + +import numpy as np import torch -from torch_geometric.data import Data import torch.nn.functional as F +from torch_geometric.data import Data from torch_geometric.nn import GCNConv from torch_geometric.transforms import RandomNodeSplit -import random -import numpy as np + +from graphdatascience import GraphDataScience ---- [source, python, role=no-test] diff --git a/doc/modules/ROOT/pages/tutorials/kge-predict-transe-pyg-train.adoc b/doc/modules/ROOT/pages/tutorials/kge-predict-transe-pyg-train.adoc index 3767f63c1..26e82c1a7 100644 --- a/doc/modules/ROOT/pages/tutorials/kge-predict-transe-pyg-train.adoc +++ b/doc/modules/ROOT/pages/tutorials/kge-predict-transe-pyg-train.adoc @@ -48,15 +48,17 @@ connection to the database. [source, python, role=no-test] ---- +import collections import os -from graphdatascience import GraphDataScience + +import pandas as pd import torch import torch.optim as optim from torch_geometric.data import Data, download_url from torch_geometric.nn import TransE -import collections from tqdm import tqdm -import pandas as pd + +from graphdatascience import GraphDataScience ---- [source, python, role=no-test] diff --git a/doc/modules/ROOT/pages/tutorials/load-data-via-graph-construction.adoc b/doc/modules/ROOT/pages/tutorials/load-data-via-graph-construction.adoc index 2463f583a..83d28accf 100644 --- a/doc/modules/ROOT/pages/tutorials/load-data-via-graph-construction.adoc +++ b/doc/modules/ROOT/pages/tutorials/load-data-via-graph-construction.adoc @@ -33,6 +33,7 @@ the `+graphdatascience+` package and import the client class. [source, python, role=no-test] ---- import os + from graphdatascience import GraphDataScience ---- diff --git a/doc/modules/ROOT/pages/tutorials/ml-pipelines-node-classification.adoc b/doc/modules/ROOT/pages/tutorials/ml-pipelines-node-classification.adoc index 9d8f562a3..f08d55e7b 100644 --- a/doc/modules/ROOT/pages/tutorials/ml-pipelines-node-classification.adoc +++ b/doc/modules/ROOT/pages/tutorials/ml-pipelines-node-classification.adoc @@ -37,6 +37,7 @@ install the `+graphdatascience+` package and import the client class. [source, python, role=no-test] ---- import os + from graphdatascience import GraphDataScience ---- diff --git a/examples/centrality-algorithms.ipynb b/examples/centrality-algorithms.ipynb index f7121ee02..6c8ee1ab0 100644 --- a/examples/centrality-algorithms.ipynb +++ b/examples/centrality-algorithms.ipynb @@ -30,7 +30,7 @@ "\n", "This notebook will show how you can apply eigenvector centrality, betweenness centrality, degree centrality and closeness centrality on a graph dataset.\n", "\n", - "### Setup\n", + "## Setup\n", "\n", "We start by importing our dependencies and setting up our GDS client connection to the database." ] @@ -51,9 +51,11 @@ "metadata": {}, "outputs": [], "source": [ - "from graphdatascience import GraphDataScience\n", + "import os\n", + "\n", "import pandas as pd\n", - "import os" + "\n", + "from graphdatascience import GraphDataScience" ] }, { @@ -92,7 +94,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Importing the dataset\n", + "## Importing the dataset\n", "\n", "We import the dataset as a pandas dataframe first. We deal with two files here. The file `reachability-meta.csv.gz` stores the names of the cities and their information while the file `reachability.txt.gz` stores the edges of the graph. An edge exists from city `i` to city `j` if the estimated airline travel time is less than a threshold.\n" ] @@ -146,8 +148,8 @@ "\n", "gds.run_cypher(\n", " \"\"\"\n", - " UNWIND $rels AS rel \n", - " MATCH (source:City {node_id: rel.Origin}), (target:City {node_id: rel.Destination}) \n", + " UNWIND $rels AS rel\n", + " MATCH (source:City {node_id: rel.Origin}), (target:City {node_id: rel.Destination})\n", " CREATE (source)-[:HAS_FLIGHT_TO]->(target)\n", " \"\"\",\n", " params={\"rels\": routes_df.to_dict(\"records\")},\n", @@ -174,7 +176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Eigenvector Centrality\n", + "## Eigenvector Centrality\n", "\n", "[Eigenvector centrality](https://neo4j.com/docs/graph-data-science/current/algorithms/eigenvector-centrality/) measures the importance or influence of a node based on its connections to other nodes in the network. A higher eigenvector centrality score suggests that a node is more central and influential within the network.\n", "\n", @@ -289,7 +291,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Betweenness Centrality\n", + "## Betweenness Centrality\n", "\n", "[Betweenness Centrality](https://neo4j.com/docs/graph-data-science/current/algorithms/betweenness-centrality/) quantifies the importance of a node as a bridge or intermediary in the network. It measures how often a node lies on the shortest path between other pairs of nodes. \n", "\n", @@ -367,7 +369,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Degree Centrality\n", + "## Degree Centrality\n", "\n", "[Degree Centrality](https://neo4j.com/docs/graph-data-science/current/algorithms/degree-centrality/) measures the number of connections (edges) a node has in the network. \n", "\n", @@ -445,7 +447,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Cleanup\n", + "## Cleanup\n", "\n", "Before finishing we can clean up the example data from both the GDS in-memory state and the database." ] @@ -474,7 +476,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### References\n", + "## References\n", "- For the network:\n", "Brendan J. Frey and Delbert Dueck. \"Clustering by passing messages between data points.\" Science 315.5814 (2007): 972-976.\n", "\n", diff --git a/examples/community-detection.ipynb b/examples/community-detection.ipynb index cf638c315..5c1dcd39d 100644 --- a/examples/community-detection.ipynb +++ b/examples/community-detection.ipynb @@ -33,7 +33,7 @@ "\n", "The tasks we cover here include performing initial graph preprocessing using Weakly Connected Components and then performing community detection on the largest component using the Louvain algorithm.\n", "\n", - "### Setup\n", + "## Setup\n", "\n", "We start by importing our dependencies and setting up our GDS client connection to the database." ] @@ -56,9 +56,11 @@ "metadata": {}, "outputs": [], "source": [ - "from graphdatascience import GraphDataScience\n", + "import os\n", + "\n", "import pandas as pd\n", - "import os" + "\n", + "from graphdatascience import GraphDataScience" ] }, { @@ -100,7 +102,7 @@ "id": "48bd8af1", "metadata": {}, "source": [ - "### Importing the dataset\n", + "## Importing the dataset\n", "\n", "We import the dataset as a pandas dataframe first. We work with only a subset of the dataset. The sampled data is only till 1st March 2014. " ] @@ -187,8 +189,8 @@ "\n", "gds.run_cypher(\n", " \"\"\"\n", - " UNWIND $rels AS rel \n", - " MATCH (source:Subreddit {name: rel.SOURCE_SUBREDDIT}), (target:Subreddit {name: rel.TARGET_SUBREDDIT}) \n", + " UNWIND $rels AS rel\n", + " MATCH (source:Subreddit {name: rel.SOURCE_SUBREDDIT}), (target:Subreddit {name: rel.TARGET_SUBREDDIT})\n", " CREATE (source)-[:HYPERLINKED_TO]->(target)\n", " \"\"\",\n", " params={\"rels\": relationship_df.to_dict(\"records\")},\n", @@ -226,7 +228,7 @@ "id": "9c259471", "metadata": {}, "source": [ - "### Weakly Connected Components\n", + "## Weakly Connected Components\n", "\n", "A graph dataset need not always be connected. That is, there may not exist a path from every node to \n", "every other node in the graph dataset (subgraphs in it may not be connected to each other at all). Hence, we \n", @@ -332,7 +334,7 @@ "id": "17942d04", "metadata": {}, "source": [ - "### Community Detection using Louvain\n", + "## Community Detection using Louvain\n", "\n", "We use the [Louvain](https://neo4j.com/docs/graph-data-science/current/algorithms/louvain/) algorithm to detect communities in our subgraph and assign a `louvainCommunityId` to each community." ] @@ -382,7 +384,7 @@ "source": [ "gds.run_cypher(\n", " \"\"\"\n", - " MATCH (n) WHERE 'louvainCommunityId' IN keys(n) \n", + " MATCH (n) WHERE 'louvainCommunityId' IN keys(n)\n", " RETURN n.name, n.louvainCommunityId LIMIT 10\n", " \"\"\"\n", ")" @@ -424,7 +426,7 @@ "id": "5ed56f82", "metadata": {}, "source": [ - "### Further ideas\n", + "## Further ideas\n", "\n", "* Inspect the produced communities using [Bloom](https://neo4j.com/docs/bloom-user-guide/current/). You can use rule-based styling based on the community property.\n", "* Try to tune more parameters of Louvain and see how the communities differ.\n", @@ -437,7 +439,7 @@ "id": "6e00ed7b", "metadata": {}, "source": [ - "### Cleanup\n", + "## Cleanup\n", "\n", "Before finishing we can clean up the example data from both the GDS in-memory state and the database." ] @@ -471,7 +473,7 @@ "id": "65dcb952", "metadata": {}, "source": [ - "### References\n", + "## References\n", "\n", "Srijan Kumar, William L. Hamilton, Jure Leskovec, and Dan Jurafsky. 2018. Community Interaction and Conflict on the Web. In Proceedings of the 2018 World Wide Web Conference (WWW '18). International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva, CHE, 933–943. https://doi.org/10.1145/3178876.3186141" ] diff --git a/examples/fastrp-and-knn.ipynb b/examples/fastrp-and-knn.ipynb index 8f775fb25..61424de6c 100644 --- a/examples/fastrp-and-knn.ipynb +++ b/examples/fastrp-and-knn.ipynb @@ -77,6 +77,7 @@ "outputs": [], "source": [ "import os\n", + "\n", "from graphdatascience import GraphDataScience\n", "\n", "# Get Neo4j DB URI and credentials from environment if applicable\n", diff --git a/examples/gds-sessions-self-managed.ipynb b/examples/gds-sessions-self-managed.ipynb index 90587b04b..cd9b14da8 100644 --- a/examples/gds-sessions-self-managed.ipynb +++ b/examples/gds-sessions-self-managed.ipynb @@ -59,6 +59,7 @@ "outputs": [], "source": [ "from datetime import timedelta\n", + "\n", "%pip install \"graphdatascience>=1.12a1\"" ] }, @@ -81,7 +82,8 @@ "outputs": [], "source": [ "import os\n", - "from graphdatascience.session import GdsSessions, AuraAPICredentials\n", + "\n", + "from graphdatascience.session import AuraAPICredentials, GdsSessions\n", "\n", "client_id = os.environ[\"AURA_API_CLIENT_ID\"]\n", "client_secret = os.environ[\"AURA_API_CLIENT_SECRET\"]\n", @@ -121,11 +123,13 @@ "outputs": [], "source": [ "import os\n", - "from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory, CloudLocation\n", - "from datetime import timedelta\n", + "\n", + "from graphdatascience.session import AlgorithmCategory, CloudLocation, DbmsConnectionInfo\n", "\n", "# Identify the Neo4j DBMS\n", - "db_connection = DbmsConnectionInfo(uri=os.environ[\"NEO4J_URI\"], username=os.environ[\"NEO4J_USER\"], password=os.environ[\"NEO4J_PASSWORD\"])\n", + "db_connection = DbmsConnectionInfo(\n", + " uri=os.environ[\"NEO4J_URI\"], username=os.environ[\"NEO4J_USER\"], password=os.environ[\"NEO4J_PASSWORD\"]\n", + ")\n", "# Specify where to create the GDS session\n", "cloud_location = CloudLocation(provider=\"gcp\", region=\"europe-west1\")\n", "\n", diff --git a/examples/gds-sessions.ipynb b/examples/gds-sessions.ipynb index a091ad8b6..3ca131663 100644 --- a/examples/gds-sessions.ipynb +++ b/examples/gds-sessions.ipynb @@ -80,7 +80,8 @@ "outputs": [], "source": [ "import os\n", - "from graphdatascience.session import GdsSessions, AuraAPICredentials\n", + "\n", + "from graphdatascience.session import AuraAPICredentials, GdsSessions\n", "\n", "client_id = os.environ[\"AURA_API_CLIENT_ID\"]\n", "client_secret = os.environ[\"AURA_API_CLIENT_SECRET\"]\n", @@ -121,10 +122,13 @@ "source": [ "import os\n", "from datetime import timedelta\n", - "from graphdatascience.session import DbmsConnectionInfo, AlgorithmCategory\n", + "\n", + "from graphdatascience.session import AlgorithmCategory, DbmsConnectionInfo\n", "\n", "# Identify the AuraDB instance\n", - "db_connection = DbmsConnectionInfo(uri=os.environ[\"AURA_DB_ADDRESS\"], username=os.environ[\"AURA_DB_USER\"], password=os.environ[\"AURA_DB_PW\"])\n", + "db_connection = DbmsConnectionInfo(\n", + " uri=os.environ[\"AURA_DB_ADDRESS\"], username=os.environ[\"AURA_DB_USER\"], password=os.environ[\"AURA_DB_PW\"]\n", + ")\n", "# Create a GDS session!\n", "memory = sessions.estimate(\n", " node_count=20,\n", diff --git a/examples/heterogeneous-node-classification-with-hashgnn.ipynb b/examples/heterogeneous-node-classification-with-hashgnn.ipynb index 3583211cf..76b72045c 100644 --- a/examples/heterogeneous-node-classification-with-hashgnn.ipynb +++ b/examples/heterogeneous-node-classification-with-hashgnn.ipynb @@ -78,6 +78,7 @@ "source": [ "# Import our dependencies\n", "import os\n", + "\n", "from graphdatascience import GraphDataScience" ] }, @@ -250,7 +251,7 @@ "id": "e9d0dbcc", "metadata": {}, "source": [ - "### The HashGNN node embedding algorithm\n", + "## The HashGNN node embedding algorithm\n", "\n", "As the last part of the training pipeline, there will be an ML training algorithm.\n", "If we use the `plot_keywords` directly as our feature input to the ML algorithm, we will not utilize any of the relationship data we have in our graph.\n", diff --git a/examples/import-sample-export-gnn.ipynb b/examples/import-sample-export-gnn.ipynb index fddd49073..902574080 100644 --- a/examples/import-sample-export-gnn.ipynb +++ b/examples/import-sample-export-gnn.ipynb @@ -83,15 +83,16 @@ "outputs": [], "source": [ "import os\n", - "import pandas as pd\n", - "from graphdatascience import GraphDataScience\n", + "import random\n", + "\n", + "import numpy as np\n", "import torch\n", - "from torch_geometric.data import Data\n", "import torch.nn.functional as F\n", + "from torch_geometric.data import Data\n", "from torch_geometric.nn import GCNConv\n", "from torch_geometric.transforms import RandomNodeSplit\n", - "import random\n", - "import numpy as np" + "\n", + "from graphdatascience import GraphDataScience" ] }, { diff --git a/examples/kge-predict-transe-pyg-train.ipynb b/examples/kge-predict-transe-pyg-train.ipynb index 2733425be..ed8519312 100644 --- a/examples/kge-predict-transe-pyg-train.ipynb +++ b/examples/kge-predict-transe-pyg-train.ipynb @@ -60,15 +60,17 @@ "metadata": {}, "outputs": [], "source": [ + "import collections\n", "import os\n", - "from graphdatascience import GraphDataScience\n", + "\n", + "import pandas as pd\n", "import torch\n", "import torch.optim as optim\n", "from torch_geometric.data import Data, download_url\n", "from torch_geometric.nn import TransE\n", - "import collections\n", "from tqdm import tqdm\n", - "import pandas as pd" + "\n", + "from graphdatascience import GraphDataScience" ] }, { diff --git a/examples/load-data-via-graph-construction.ipynb b/examples/load-data-via-graph-construction.ipynb index 85ef5249e..32cd2c93d 100644 --- a/examples/load-data-via-graph-construction.ipynb +++ b/examples/load-data-via-graph-construction.ipynb @@ -59,6 +59,7 @@ "outputs": [], "source": [ "import os\n", + "\n", "from graphdatascience import GraphDataScience" ] }, diff --git a/examples/ml-pipelines-node-classification.ipynb b/examples/ml-pipelines-node-classification.ipynb index 74d9c3c63..ecc3cfe9f 100644 --- a/examples/ml-pipelines-node-classification.ipynb +++ b/examples/ml-pipelines-node-classification.ipynb @@ -61,6 +61,7 @@ "outputs": [], "source": [ "import os\n", + "\n", "from graphdatascience import GraphDataScience" ] }, diff --git a/pyproject.toml b/pyproject.toml index 43a3ba984..681045c52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [tool.ruff] line-length = 120 -include = ["*.py", "*.py"] +include = ["*.py", "*.ipynb"] exclude = [ # default diff --git a/requirements/dev/dev.txt b/requirements/dev/dev.txt index fc6d7a096..5cdeae62b 100644 --- a/requirements/dev/dev.txt +++ b/requirements/dev/dev.txt @@ -1,6 +1,6 @@ ruff == 0.6.1 mypy == 1.8.0 -nbconvert == 7.11.0 +nbconvert == 7.16.4 pandas-stubs == 2.2.2.240603 tox == 4.11.3 types-setuptools == 68.1.0.1 diff --git a/requirements/dev/notebook-ci.txt b/requirements/dev/notebook-ci.txt index 155129e25..751eef1fc 100644 --- a/requirements/dev/notebook-ci.txt +++ b/requirements/dev/notebook-ci.txt @@ -1,6 +1,6 @@ nbconvert==7.16.4 -nbformat==5.9.2 -nbclient==0.9.0 +nbformat==5.10.4 +nbclient==0.10.0 ipykernel==6.26.0 scipy == 1.14.0 torch==2.1.0 diff --git a/scripts/checkstyle b/scripts/checkstyle index 1c44a4aca..c79ce87f4 100755 --- a/scripts/checkstyle +++ b/scripts/checkstyle @@ -29,6 +29,7 @@ do if [[ "$FORMATTED_NB" != "$NB" ]]; then echo "Notebook $f is not correctly formatted" + diff --color=always --suppress-common-lines --minimal --side-by-side $NB $FORMATTED_NB exit 1 fi done