From 7fe369087794ffa03065b89edcf3a587309e3717 Mon Sep 17 00:00:00 2001 From: andonij Date: Tue, 16 Jul 2024 13:51:42 +0200 Subject: [PATCH] Correct binder and delete token --- README.md | 2 +- notebooks/tutorial_DR1.ipynb | 8 +++++--- notebooks/tutorial_DR1_xmatch.ipynb | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 659c989..d4bc666 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # DR1 tutorials -[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fgloton.ugr.es%2Fgitlab%2Fcavity%2Fdr1-tutorials) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fgloton.ugr.es%2Fgitlab%2Fcavity%2Fdr1-tutorials/HEAD) This repository contains basic tutorials showing the CAVITY TAP service functionalities. \ No newline at end of file diff --git a/notebooks/tutorial_DR1.ipynb b/notebooks/tutorial_DR1.ipynb index d1438f1..d729596 100644 --- a/notebooks/tutorial_DR1.ipynb +++ b/notebooks/tutorial_DR1.ipynb @@ -37,7 +37,7 @@ "outputs": [], "source": [ "url = \"https://cavity.caha.es/tap\"\n", - "token = 'cf16899d345b765aba64b63ec0a92700a00beb36'" + "token = ''" ] }, { @@ -56,8 +56,10 @@ ], "source": [ "# Setup authorization\n", - "tap_session = requests.Session()\n", - "tap_session.headers['Authorization'] = f'Token {token}'\n", + "tap_session = None\n", + "if len(token)>0:\n", + " tap_session = requests.Session()\n", + " tap_session.headers['Authorization'] = f'Token {token}'\n", "\n", "# Init service\n", "tap_service = pyvo.dal.TAPService(url, session=tap_session)\n", diff --git a/notebooks/tutorial_DR1_xmatch.ipynb b/notebooks/tutorial_DR1_xmatch.ipynb index 4c50d9c..172c56b 100644 --- a/notebooks/tutorial_DR1_xmatch.ipynb +++ b/notebooks/tutorial_DR1_xmatch.ipynb @@ -41,7 +41,7 @@ "outputs": [], "source": [ "url = \"https://cavity.caha.es/tap\"\n", - "token = 'cf16899d345b765aba64b63ec0a92700a00beb36'" + "token = ''" ] }, { @@ -60,8 +60,10 @@ ], "source": [ "# Setup authorization\n", - "tap_session = requests.Session()\n", - "tap_session.headers['Authorization'] = f'Token {token}'\n", + "tap_session = None\n", + "if len(token)>0:\n", + " tap_session = requests.Session()\n", + " tap_session.headers['Authorization'] = f'Token {token}'\n", "\n", "# Init service\n", "tap_service = pyvo.dal.TAPService(url, session=tap_session)\n", -- GitLab