From c0b6a75b1d37fddc52011bcc81f04772a6a74fd1 Mon Sep 17 00:00:00 2001 From: Chris Woodward Date: Fri, 22 Jul 2022 16:48:56 -0400 Subject: [PATCH 1/3] adds mention of ArangoRDF to old RDF example --- notebooks/RDF_Import_Example.ipynb | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/notebooks/RDF_Import_Example.ipynb b/notebooks/RDF_Import_Example.ipynb index 4049814..5dc03df 100644 --- a/notebooks/RDF_Import_Example.ipynb +++ b/notebooks/RDF_Import_Example.ipynb @@ -1,5 +1,27 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ✨ ArangoRDF Now Available! ✨\n", + "**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n", + "\n", + "Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n", + "\n", + "[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n", + "\n", + "\n", + "Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 🔽 Old Notebook Below 🔽" + ] + }, { "cell_type": "code", "execution_count": null, @@ -193,8 +215,19 @@ "name": "simple_RDFtoArangoDB.ipynb", "provenance": [] }, + "kernelspec": { + "display_name": "Python 3.8.10 64-bit", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "name": "python", + "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "2edfe97f1b08e91e35da96a73483835fab7bced3e529c171a27a13878876907d" + } } }, "nbformat": 4, From e503129e74c283820ba15a4339fee361a2e36a29 Mon Sep 17 00:00:00 2001 From: Chris Woodward Date: Fri, 22 Jul 2022 16:54:25 -0400 Subject: [PATCH 2/3] updates with cloud_connector package --- notebooks/RDF_Import_Example.ipynb | 65 +++++++++++------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/notebooks/RDF_Import_Example.ipynb b/notebooks/RDF_Import_Example.ipynb index 5dc03df..03087d7 100644 --- a/notebooks/RDF_Import_Example.ipynb +++ b/notebooks/RDF_Import_Example.ipynb @@ -1,27 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# ✨ ArangoRDF Now Available! ✨\n", - "**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n", - "\n", - "Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n", - "\n", - "[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n", - "\n", - "\n", - "Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 🔽 Old Notebook Below 🔽" - ] - }, { "cell_type": "code", "execution_count": null, @@ -31,8 +9,7 @@ "outputs": [], "source": [ "%%capture\n", - "!git clone -b oasis_connector --single-branch https://github.com/arangodb/interactive_tutorials\n", - "!rsync -av interactive_tutorials/ ./ --exclude=.git\n", + "!pip install adb-cloud-connector\n", "\n", "!git clone -b \"RDF-Import-Example-Data\" --single-branch https://github.com/arangodb/interactive_tutorials RDF-Import-Example-Data\n", "!rsync -av RDF-Import-Example-Data/ ./ --exclude=.git\n", @@ -42,6 +19,21 @@ "!pip install rdflib" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ✨ ArangoRDF Now Available! ✨\n", + "**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n", + "\n", + "Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n", + "\n", + "[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n", + "\n", + "\n", + "Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information." + ] + }, { "cell_type": "code", "execution_count": null, @@ -53,10 +45,10 @@ "import json\n", "import requests\n", "import sys\n", - "import oasis\n", "import time\n", "import textwrap\n", "\n", + "from adb_cloud_connector import get_temp_credentials\n", "from pyArango.connection import *\n", "from arango import ArangoClient" ] @@ -69,12 +61,12 @@ }, "outputs": [], "source": [ - "# Retrieve tmp credentials from ArangoDB Tutorial Service\n", - "login = oasis.getTempCredentials(tutorialName=\"RDF-Import-Example\", credentialProvider=\"https://tutorials.arangodb.cloud:8529/_db/_system/tutorialDB/tutorialDB\")\n", + "# Request temporary instance from the managed ArangoDB Cloud Service.\n", + "login = get_temp_credentials()\n", + "print(json.dumps(login, indent=2))\n", "\n", - "# Connect to the temp database\n", - "# Please note that we use the python-arango driver as it has better support for ArangoSearch \n", - "db = oasis.connect_python_arango(login)" + "# Connect to the db via the python-arango driver\n", + "db = ArangoClient(hosts=login[\"url\"]).db(login[\"dbName\"], login[\"username\"], login[\"password\"], verify=True)" ] }, { @@ -215,19 +207,8 @@ "name": "simple_RDFtoArangoDB.ipynb", "provenance": [] }, - "kernelspec": { - "display_name": "Python 3.8.10 64-bit", - "language": "python", - "name": "python3" - }, "language_info": { - "name": "python", - "version": "3.8.10" - }, - "vscode": { - "interpreter": { - "hash": "2edfe97f1b08e91e35da96a73483835fab7bced3e529c171a27a13878876907d" - } + "name": "python" } }, "nbformat": 4, From 916c1b9816f7d06deeea0fae86d9e81f974f928c Mon Sep 17 00:00:00 2001 From: Chris Woodward Date: Fri, 22 Jul 2022 16:57:24 -0400 Subject: [PATCH 3/3] fixes markdown --- notebooks/RDF_Import_Example.ipynb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/notebooks/RDF_Import_Example.ipynb b/notebooks/RDF_Import_Example.ipynb index 03087d7..fb8dc29 100644 --- a/notebooks/RDF_Import_Example.ipynb +++ b/notebooks/RDF_Import_Example.ipynb @@ -1,5 +1,20 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ✨ ArangoRDF Now Available! ✨\n", + "**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n", + "\n", + "Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n", + "\n", + "[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n", + "\n", + "\n", + "Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information." + ] + }, { "cell_type": "code", "execution_count": null, @@ -19,21 +34,6 @@ "!pip install rdflib" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# ✨ ArangoRDF Now Available! ✨\n", - "**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n", - "\n", - "Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n", - "\n", - "[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n", - "\n", - "\n", - "Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information." - ] - }, { "cell_type": "code", "execution_count": null,