diff --git a/sparcl/notebooks/UNPUBLISHED/HowTo_SPARCL_Auth.ipynb b/sparcl/notebooks/UNPUBLISHED/HowTo_SPARCL_Auth.ipynb index ef4c84c..ae9277a 100644 --- a/sparcl/notebooks/UNPUBLISHED/HowTo_SPARCL_Auth.ipynb +++ b/sparcl/notebooks/UNPUBLISHED/HowTo_SPARCL_Auth.ipynb @@ -2,13 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "d5c6f1a1-5f61-4571-97dd-917b8ec0a34f", "metadata": {}, "outputs": [], "source": [ "__author__ = 'Alice Jacques , Steve Pothier , SPARCL team '\n", - "__version__ = '20240530' # yyyymmdd; \n", + "__version__ = '20240717' # yyyymmdd; \n", "__datasets__ = ['sdss_dr16', 'boss_dr16', 'desi_edr', 'sdss_dr17_test']" ] }, @@ -52,7 +52,9 @@ "metadata": {}, "source": [ "## NOTE\n", - "This notebook demonstrates how users will interact with the Auth feature in SPARCL. It is meant for internal-use only. Connection to sparc1 and sparclstage servers require VPN." + "This notebook demonstrates how users will interact with the Auth feature in SPARCL. It is meant for internal-use only. Connection to sparc1 and sparclstage servers require VPN.\n", + "\n", + "A logged-in session will only last about 30 seconds. Re-run the `client.login` cell to sign back into the specified user account." ] }, { @@ -65,14 +67,35 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 12, "id": "a4e0cfb3-0b8b-44e3-9c5a-d507b8e6e108", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting sparclclient==1.2.2b11\n", + " Downloading sparclclient-1.2.2b11-py2.py3-none-any.whl.metadata (567 bytes)\n", + "Downloading sparclclient-1.2.2b11-py2.py3-none-any.whl (113 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m113.8/113.8 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h\u001b[33mDEPRECATION: pyodbc 4.0.0-unsupported has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pyodbc or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n", + "\u001b[0mInstalling collected packages: sparclclient\n", + " Attempting uninstall: sparclclient\n", + " Found existing installation: sparclclient 1.2.2b10\n", + " Uninstalling sparclclient-1.2.2b10:\n", + " Successfully uninstalled sparclclient-1.2.2b10\n", + "Successfully installed sparclclient-1.2.2b11\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.0\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.1.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" + ] + } + ], "source": [ - "#!pip install sparclclient==1.2.2b9" + "!pip install sparclclient==1.2.2b11" ] }, { @@ -85,12 +108,21 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "e8a3b609-3fff-4497-b998-94183f021bc6", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/alice.jacques/.local/lib/python3.8/site-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (5.2.0) doesn't match a supported version!\n", + " warnings.warn(\"urllib3 ({}) or chardet ({}) doesn't match a supported \"\n" + ] + } + ], "source": [ "from sparcl.client import SparclClient\n", "from getpass import getpass" @@ -98,7 +130,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "96fae0a6-7e8f-4339-9745-4713c5f92829", "metadata": { "tags": [] @@ -107,24 +139,25 @@ { "data": { "text/plain": [ - "(sparclclient:1.2.2b9, api:11.0, https://sparc1.datalab.noirlab.edu/sparc, client_hash=, verbose=False, connect_timeout=1.1, read_timeout=5400.0)" + "(sparclclient:1.2.2b11, api:12.0, https://sparclstage.datalab.noirlab.edu/sparc, client_hash=, verbose=False, connect_timeout=1.1, read_timeout=5400.0)" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "client = SparclClient(url='https://sparc1.datalab.noirlab.edu') ## PAT\n", - "#client = SparclClient(url='https://sparclstage.datalab.noirlab.edu') ## STAGE\n", + "#client = SparclClient(url='https://sparc1.datalab.noirlab.edu') ## PAT\n", + "#client = SparclClient(url='http://sparcdev2.csdc.noirlab.edu:8050') ## DEV\n", + "client = SparclClient(url='https://sparclstage.datalab.noirlab.edu') ## STAGE\n", "#client = SparclClient() ## PROD\n", "client" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "53a44e12-3e9c-4bb1-89cb-e22f5432b5d8", "metadata": { "tags": [] @@ -155,7 +188,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "c4d907ff-7524-48cc-93c2-08be2ec97e19", "metadata": { "tags": [] @@ -196,7 +229,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "f4ad6166-04c2-4936-a20c-94f145c21784", "metadata": { "tags": [] @@ -238,7 +271,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "9e9dbb27-9c69-43a5-a1f6-fe726f60c1b9", "metadata": { "tags": [] @@ -284,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "98fe8ff9-c897-49e4-82d7-5f9798e75813", "metadata": { "tags": [] @@ -304,7 +337,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "5a7fcd64-5c55-457e-b3fc-375d3aac1c4c", "metadata": { "tags": [] @@ -320,7 +353,7 @@ " 'SDSS-DR17-test'}}" ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -331,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "id": "fa2d2a18-e68c-4e8d-b934-6b650f3171cd", "metadata": { "tags": [] @@ -360,7 +393,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "18faec44-0a03-424f-95fd-f0df7aabd6ee", "metadata": { "tags": [] @@ -380,7 +413,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "c25f9737-04af-486a-9443-4d9014cf2601", "metadata": { "tags": [] @@ -393,7 +426,7 @@ " 'Authorized_Datasets': {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}}" ] }, - "execution_count": 12, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -404,7 +437,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "id": "20fd0c36-319b-4978-92fa-255ef73eb401", "metadata": { "tags": [] @@ -433,7 +466,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "id": "ee8a2605-516d-4eb0-afd0-ece3a53549fc", "metadata": { "tags": [] @@ -453,7 +486,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "id": "1a8cbf2d-568b-4199-adde-f77fae944d70", "metadata": { "tags": [] @@ -466,7 +499,7 @@ " 'Authorized_Datasets': {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}}" ] }, - "execution_count": 15, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -477,7 +510,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "id": "56575542-11fd-4afa-b182-9d0aa288e9dd", "metadata": { "tags": [] @@ -506,7 +539,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "id": "db8ec640-4fcf-4492-a7aa-ea8c6f3c993b", "metadata": { "tags": [] @@ -519,7 +552,7 @@ " 'Authorized_Datasets': {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}}" ] }, - "execution_count": 17, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -530,7 +563,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "id": "cb0bb70c-651f-4763-83f8-d4a7f303c3c7", "metadata": { "tags": [] @@ -559,7 +592,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 24, "id": "0d5b8c6a-5371-4bcd-8773-bd9fdd7d47bf", "metadata": { "tags": [] @@ -568,10 +601,11 @@ "source": [ "# No dataset(s) specified in constraints\n", "cons = {'spectype': ['GALAXY'],\n", - " 'redshift': [0.5, 0.9]}\n", + " 'redshift': [0.299649, 0.299652]}\n", "# Private dataset specified in constraints\n", - "cons2 = {'spectype': ['STAR'],\n", - " 'data_release': ['SDSS-DR17-test', 'DESI-EDR']}\n", + "cons2 = {'spectype': ['GALAXY'],\n", + " 'redshift': [0.299649, 0.299652],\n", + " 'data_release': ['SDSS-DR17-test', 'DESI-EDR']}\n", "# Outfields\n", "out = ['sparcl_id', 'data_release']" ] @@ -587,7 +621,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 26, "id": "00f1d30e-3b65-470c-a829-c9ad6f10657b", "metadata": { "tags": [] @@ -607,7 +641,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 27, "id": "908a18f8-4a69-4a1a-9392-19e1c1ba05d4", "metadata": { "tags": [] @@ -617,10 +651,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", - "# of SDSS-DR17-test records = 19\n" + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", + "# of SDSS-DR17-test records = 1\n" ] } ], @@ -634,7 +668,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 28, "id": "9194f105-b71b-4403-8008-f69f97526be9", "metadata": { "tags": [] @@ -646,8 +680,8 @@ "text": [ "# of SDSS-DR16 records = 0\n", "# of BOSS-DR16 records = 0\n", - "# of DESI-EDR records = 2096\n", - "# of SDSS-DR17-test records = 517\n" + "# of DESI-EDR records = 3\n", + "# of SDSS-DR17-test records = 1\n" ] } ], @@ -661,7 +695,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 22, "id": "5a2d127d-6338-42ed-9cfc-892f679670af", "metadata": { "tags": [] @@ -690,7 +724,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 29, "id": "fb91c794-e261-4934-ac5f-80e0d9696fd7", "metadata": { "tags": [] @@ -710,7 +744,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 30, "id": "a960b911-ab66-4926-ad48-a5e7089b6637", "metadata": { "tags": [] @@ -720,9 +754,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -737,7 +771,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 31, "id": "1a935917-9a2e-4167-b222-b2884490ea9d", "metadata": { "tags": [] @@ -745,14 +779,14 @@ "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[26], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(unauth_found2)\n", + "Cell \u001b[0;32mIn[31], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(unauth_found2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:576\u001b[0m, in \u001b[0;36mSparclClient.find\u001b[0;34m(self, outfields, constraints, limit, sort, verbose)\u001b[0m\n\u001b[1;32m 574\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 575\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 576\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mverbose)\n\u001b[1;32m 578\u001b[0m found \u001b[38;5;241m=\u001b[39m Found(res\u001b[38;5;241m.\u001b[39mjson(), client\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m)\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose:\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -767,7 +801,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 32, "id": "5bda5d9e-da49-45a5-98aa-815fcba44771", "metadata": { "tags": [] @@ -796,7 +830,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 33, "id": "45a21b83-d1fc-4f46-a17b-685b8003077a", "metadata": { "tags": [] @@ -816,7 +850,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 34, "id": "f15bad13-0381-45fd-968d-ee5481b44a2c", "metadata": { "tags": [] @@ -826,9 +860,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -843,7 +877,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 35, "id": "c3e27bb0-2198-4447-8810-2b4ec1dcc5a1", "metadata": { "tags": [] @@ -851,14 +885,14 @@ "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[30], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(non_found2)\n", + "Cell \u001b[0;32mIn[35], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(non_found2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:576\u001b[0m, in \u001b[0;36mSparclClient.find\u001b[0;34m(self, outfields, constraints, limit, sort, verbose)\u001b[0m\n\u001b[1;32m 574\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 575\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 576\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mverbose)\n\u001b[1;32m 578\u001b[0m found \u001b[38;5;241m=\u001b[39m Found(res\u001b[38;5;241m.\u001b[39mjson(), client\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m)\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose:\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -873,7 +907,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 36, "id": "f66bbed9-bd8c-4132-a0a3-5cc67ce4bdad", "metadata": { "tags": [] @@ -902,7 +936,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 37, "id": "65042f19-7d16-4465-bd34-fc8aa2ca1d0c", "metadata": { "tags": [] @@ -912,9 +946,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -929,7 +963,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 38, "id": "3ac68b31-ce54-44b8-ac6a-6e671bb16838", "metadata": { "tags": [] @@ -937,14 +971,14 @@ "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[33], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(anon_found2)\n", + "Cell \u001b[0;32mIn[38], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Private dataset specified in constraints.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_found2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutfields\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43mconstraints\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcons2\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m count_records(anon_found2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:576\u001b[0m, in \u001b[0;36mSparclClient.find\u001b[0;34m(self, outfields, constraints, limit, sort, verbose)\u001b[0m\n\u001b[1;32m 574\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 575\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 576\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mverbose)\n\u001b[1;32m 578\u001b[0m found \u001b[38;5;241m=\u001b[39m Found(res\u001b[38;5;241m.\u001b[39mjson(), client\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m)\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose:\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -977,7 +1011,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 39, "id": "3dbf8f63-0cf8-4334-bbcb-619728a8d184", "metadata": { "tags": [] @@ -997,7 +1031,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 40, "id": "910ee4c5-5dc4-4a29-8de6-3a21e5d548c0", "metadata": { "tags": [] @@ -1007,10 +1041,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", - "# of SDSS-DR17-test records = 19\n" + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", + "# of SDSS-DR17-test records = 1\n" ] } ], @@ -1024,7 +1058,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 41, "id": "3bff72e9-77be-45c4-be2c-09b2280d673e", "metadata": { "tags": [] @@ -1036,13 +1070,14 @@ "text": [ "# of SDSS-DR16 records = 0\n", "# of BOSS-DR16 records = 0\n", - "# of DESI-EDR records = 2096\n", - "# of SDSS-DR17-test records = 517\n" + "# of DESI-EDR records = 3\n", + "# of SDSS-DR17-test records = 1\n" ] } ], "source": [ "# uuid_list includes IDs from private dataset, private dataset specified.\n", + "# This cell should produce an \"Access Not Allowed\" error.\n", "auth_ret2 = client.retrieve(uuid_list=auth_found2.ids,\n", " include=out,\n", " dataset_list=['SDSS-DR17-test', 'DESI-EDR'],\n", @@ -1052,7 +1087,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 42, "id": "da6758b1-1e8a-49f8-abfa-dcb5c68dff48", "metadata": {}, "outputs": [ @@ -1079,7 +1114,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 43, "id": "528d3df1-9824-4b53-a061-af190eac5d97", "metadata": { "tags": [] @@ -1099,7 +1134,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 44, "id": "d5bc327b-49a4-432d-a670-32f9f0e4ec1b", "metadata": {}, "outputs": [ @@ -1107,9 +1142,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -1124,7 +1159,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 45, "id": "bf2038f4-5917-4978-a1b6-5fc39155569b", "metadata": { "tags": [] @@ -1132,14 +1167,14 @@ "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[40], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43munauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(unauth_ret2)\n", + "Cell \u001b[0;32mIn[45], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43munauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(unauth_ret2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1148,14 +1183,14 @@ "# This cell should produce an \"Access Not Allowed\" error.\n", "unauth_ret2 = client.retrieve(uuid_list=unauth_found.ids,\n", " include=out,\n", - " dataset_list=['SDSS-DR17-test', 'DESI-EDR'],\n", + " dataset_list=['SDSS-DR17-test','DESI-EDR'],\n", " limit=20000)\n", "count_records(unauth_ret2)" ] }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 46, "id": "d93129fa-64c8-47a6-8702-3519e8f315cf", "metadata": {}, "outputs": [ @@ -1163,9 +1198,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] }, @@ -1173,7 +1208,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_52706/1687955117.py:4: UserWarning: Some UUIDs were not found. 4 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 4 unavailable uuids.; Some UUIDs were not found. 11 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 11 unavailable uuids.; Some UUIDs were not found. 3 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 3 unavailable uuids.; Some UUIDs were not found. 1 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", + "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_72333/1687955117.py:4: UserWarning: Some UUIDs were not found. 1 out of the 15 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", " unauth_ret3 = client.retrieve(uuid_list=auth_found.ids,\n" ] } @@ -1190,20 +1225,20 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 47, "id": "1ed30ef4-93fb-49d0-867c-7beeb24eda08", "metadata": {}, "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[42], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(unauth_ret4)\n", + "Cell \u001b[0;32mIn[47], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m unauth_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(unauth_ret4)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] test_user_2@noirlab.edu is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='test_user_2@noirlab.edu' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1212,14 +1247,14 @@ "# This cell should produce an \"Access Not Allowed\" error.\n", "unauth_ret4 = client.retrieve(uuid_list=auth_found.ids,\n", " include=out,\n", - " dataset_list=['SDSS-DR17-test', 'DESI-EDR'],\n", + " dataset_list=['SDSS-DR17-test','DESI-EDR'],\n", " limit=20000)\n", "count_records(unauth_ret4)" ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 48, "id": "d59271ae-df04-461d-84ca-cef8925c0542", "metadata": {}, "outputs": [ @@ -1246,7 +1281,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 49, "id": "1a0240cd-0efd-4e44-a443-c6035911e0fc", "metadata": {}, "outputs": [ @@ -1264,7 +1299,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 50, "id": "9769c916-492a-4560-a767-1d337b572985", "metadata": {}, "outputs": [ @@ -1272,9 +1307,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -1289,20 +1324,20 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 51, "id": "5ecbdf62-bb75-46f2-bd98-57ae4bed9a52", "metadata": {}, "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[46], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnon_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(non_ret2)\n", + "Cell \u001b[0;32mIn[51], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnon_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(non_ret2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1318,7 +1353,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 52, "id": "3c3c93ed-e18d-4f02-bd98-f0c23518032c", "metadata": {}, "outputs": [ @@ -1326,9 +1361,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] }, @@ -1336,7 +1371,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_52706/2556312795.py:4: UserWarning: Some UUIDs were not found. 4 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 4 unavailable uuids.; Some UUIDs were not found. 11 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 11 unavailable uuids.; Some UUIDs were not found. 3 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 3 unavailable uuids.; Some UUIDs were not found. 1 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", + "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_72333/2556312795.py:4: UserWarning: Some UUIDs were not found. 1 out of the 15 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", " non_ret3 = client.retrieve(uuid_list=auth_found.ids,\n" ] } @@ -1353,20 +1388,20 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 53, "id": "e9a2cbe5-d16e-41bd-b80a-0f3e39687100", "metadata": {}, "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[48], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(non_ret4)\n", + "Cell \u001b[0;32mIn[53], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m non_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(non_ret4)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1382,7 +1417,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 54, "id": "6beb9dc2-fdcf-4cf2-81b4-5615bae319e2", "metadata": {}, "outputs": [ @@ -1409,7 +1444,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 55, "id": "5be46193-94df-4e09-8324-970f1b65b4b6", "metadata": {}, "outputs": [ @@ -1417,9 +1452,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] } @@ -1434,20 +1469,20 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 56, "id": "7006ba03-8362-4791-aa92-9daebdd4fe82", "metadata": {}, "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[51], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43manon_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(anon_ret2)\n", + "Cell \u001b[0;32mIn[56], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list does not include IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_ret2 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43manon_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(anon_ret2)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1463,7 +1498,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 57, "id": "c2517eb8-be55-45d5-b960-0ed417dcee19", "metadata": {}, "outputs": [ @@ -1471,9 +1506,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "# of SDSS-DR16 records = 87\n", - "# of BOSS-DR16 records = 3071\n", - "# of DESI-EDR records = 1162\n", + "# of SDSS-DR16 records = 2\n", + "# of BOSS-DR16 records = 9\n", + "# of DESI-EDR records = 3\n", "# of SDSS-DR17-test records = 0\n" ] }, @@ -1481,7 +1516,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_52706/134315787.py:4: UserWarning: Some UUIDs were not found. 4 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 4 unavailable uuids.; Some UUIDs were not found. 11 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 11 unavailable uuids.; Some UUIDs were not found. 3 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 3 unavailable uuids.; Some UUIDs were not found. 1 out of the 500 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", + "/var/folders/6j/v2lh3ssj13g6fs_lhk8nlps40000gp/T/ipykernel_72333/134315787.py:4: UserWarning: Some UUIDs were not found. 1 out of the 15 requested uuids have no records available in the SPARCL database associated with DataSets {'BOSS-DR16', 'DESI-EDR', 'SDSS-DR16'}.Use \"client.missing()\" to get a list of the 1 unavailable uuids.\n", " anon_ret3 = client.retrieve(uuid_list=auth_found.ids,\n" ] } @@ -1498,20 +1533,20 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 58, "id": "e2cf4b8c-a7b6-423c-94b3-51680d32b453", "metadata": {}, "outputs": [ { "ename": "AccessNotAllowed", - "evalue": "[DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']", + "evalue": "[DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAccessNotAllowed\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[53], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(anon_ret4)\n", + "Cell \u001b[0;32mIn[58], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# uuid_list includes IDs from private dataset, private dataset specified.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# This cell should produce an \"Access Not Allowed\" error.\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m anon_ret4 \u001b[38;5;241m=\u001b[39m \u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43muuid_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mauth_found\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43minclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[43mdataset_list\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mSDSS-DR17-test\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mDESI-EDR\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mlimit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m20000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m count_records(anon_ret4)\n", "File \u001b[0;32m~/anaconda3/lib/python3.8/site-packages/sparcl/client.py:870\u001b[0m, in \u001b[0;36mSparclClient.retrieve\u001b[0;34m(self, uuid_list, include, dataset_list, limit, verbose)\u001b[0m\n\u001b[1;32m 868\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m res\u001b[38;5;241m.\u001b[39mjson()):\n\u001b[1;32m 869\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDBG: Server traceback=\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m{\u001b[39;00mres\u001b[38;5;241m.\u001b[39mjson()[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtraceback\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m--> 870\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ex\u001b[38;5;241m.\u001b[39mgenSparclException(res, verbose\u001b[38;5;241m=\u001b[39mverbose)\n\u001b[1;32m 872\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mformat\u001b[39m \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m 873\u001b[0m results \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mjson()\n", - "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] ANONYMOUS is declined access to datasets ['SDSS-DR17-test']" + "\u001b[0;31mAccessNotAllowed\u001b[0m: [DSDENIED] uname='ANONYMOUS' is declined access to datasets=['SDSS-DR17-test']; drs_requested=['DESI-EDR', 'SDSS-DR17-test'] my_auth=['BOSS-DR16', 'DESI-EDR', 'SDSS-DR16']" ] } ], @@ -1524,6 +1559,14 @@ " limit=20000)\n", "count_records(anon_ret4)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "133f39d1-9620-47a2-a8b6-f25227b9043a", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {