From a0dacd952e22b31f1131d170f77cd88276c2400b Mon Sep 17 00:00:00 2001 From: asteiker Date: Wed, 3 Jul 2024 16:56:39 +0000 Subject: [PATCH 1/5] removed s3credentials print --- docs/howto/edl.ipynb | 81 +++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 53 deletions(-) diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index d26503dc..21313b77 100644 --- a/docs/howto/edl.ipynb +++ b/docs/howto/edl.ipynb @@ -17,17 +17,7 @@ "execution_count": 1, "id": "ce723d6f-8b5f-43e1-9531-19ee08a056fe", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "You're now authenticated with NASA Earthdata Login\n", - "Using token with expiration date: 09/25/2023\n", - "Using environment variables for EDL\n" - ] - } - ], + "outputs": [], "source": [ "import earthaccess\n", "\n", @@ -40,32 +30,17 @@ "metadata": {}, "source": [ "### Data in AWS\n", - "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs" + "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. " ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "3108ff21-1ea2-449b-b2f5-b442dd3b61f5", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'accessKeyId': 'ASIA2D3OGJNTE2UAIDHR',\n", - " 'secretAccessKey': '9+6D3m76HTuNi3qvbgUMBFlJECsCgPyJ4ur2CfZL',\n", - " 'sessionToken': 'FwoGZXIvYXdzEPL//////////wEaDIVnMBd6zBaEKmG58CLpAXrPN52vpRHvs+0y960kNwGOdFHPD81WVsdeUciP/vQvsU/xX4Cg+iLH/OXDlH/PBWCmSgfk4vgXD9k6r2JRmnpkwyF4v4K4+ciIuUHNG43ZegSFtkzZoLHShLtEnNu/OIT0TlcrOLJIY+TnjEDcKkXiLSsLYB7qDKZIeg654oPCkjeXyDuoWOumJa7utBEwHmakOGdGJTthOfbfJ6RJ9sbPbmsEXg0bHF5PY9h3/Eoq0rjyRmlb1WYuopw5YK8dL5N9IwSKlKiu19Cj0nd04XVNuiB02+fLDubsnKK1b3j0jR53qAU3FxobKLHgj6YGMi0kDN7xWP6yqI7Ry69Lf5EEcDRVp4UVz6llGYoDpsKr9s3cXaBljkhEjH7N5dQ=',\n", - " 'expiration': '2023-07-28 17:43:29+00:00'}" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "s3_credentials = auth.get_s3_credentials(\"NSIDC\")\n", - "s3_credentials" + "s3_credentials = auth.get_s3_credentials(\"NSIDC\")" ] }, { @@ -88,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 3, "id": "a7bb1a93-6f85-40cd-93b4-ce821a03a8b5", "metadata": {}, "outputs": [], @@ -102,7 +77,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 4, "id": "c0f4e286-8ce9-4cde-b3a2-631b361a0d51", "metadata": {}, "outputs": [ @@ -112,7 +87,7 @@ "'�HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00���������HUn\\x00\\x00\\x00\\x00��������\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR\\x02'" ] }, - "execution_count": 15, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -133,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "id": "1e5f5f7a-0643-42cb-b70c-4ac982824ff9", "metadata": {}, "outputs": [], @@ -143,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 6, "id": "fbc7bc5f-b984-4324-b095-3648a437fba2", "metadata": {}, "outputs": [ @@ -153,7 +128,7 @@ "b'\\x89HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xd7HUn\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR'" ] }, - "execution_count": 11, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -166,19 +141,19 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 7, "id": "07433a9f-f276-4d2b-9ed3-f556df2884af", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f68d214c1c4b4d0fb0b44d878a003a33", + "model_id": "ac15458d5f9e4b8aac40f2e5417b22c7", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "QUEUEING TASKS | : 0it [00:00, ?it/s]" + "QUEUEING TASKS | : 0%| | 0/1 [00:00
<xarray.Dataset>\n",
+       "
<xarray.Dataset> Size: 3kB\n",
        "Dimensions:           (bands: 285)\n",
        "Dimensions without coordinates: bands\n",
        "Data variables:\n",
-       "    wavelengths       (bands) float32 ...\n",
-       "    fwhm              (bands) float32 ...\n",
-       "    good_wavelengths  (bands) float32 ...
" + " wavelengths (bands) float32 1kB ...\n", + " fwhm (bands) float32 1kB ...\n", + " good_wavelengths (bands) float32 1kB ...
" ], "text/plain": [ - "\n", + " Size: 3kB\n", "Dimensions: (bands: 285)\n", "Dimensions without coordinates: bands\n", "Data variables:\n", - " wavelengths (bands) float32 ...\n", - " fwhm (bands) float32 ...\n", - " good_wavelengths (bands) float32 ..." + " wavelengths (bands) float32 1kB ...\n", + " fwhm (bands) float32 1kB ...\n", + " good_wavelengths (bands) float32 1kB ..." ] }, - "execution_count": 13, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -638,7 +613,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.10.14" } }, "nbformat": 4, From a63f04fc6231b5c00b0a83afe9ab9dd1e88c8908 Mon Sep 17 00:00:00 2001 From: asteiker Date: Wed, 3 Jul 2024 17:00:52 +0000 Subject: [PATCH 2/5] comment s3credential line --- docs/howto/edl.ipynb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index 21313b77..84a60948 100644 --- a/docs/howto/edl.ipynb +++ b/docs/howto/edl.ipynb @@ -30,17 +30,11 @@ "metadata": {}, "source": [ "### Data in AWS\n", - "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. " - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "3108ff21-1ea2-449b-b2f5-b442dd3b61f5", - "metadata": {}, - "outputs": [], - "source": [ - "s3_credentials = auth.get_s3_credentials(\"NSIDC\")" + "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs:\n", + "\n", + "```\n", + "s3_credentials = auth.get_s3_credentials(\"NSIDC\")\n", + "```" ] }, { From 4de295b81a0cd81a6c39456365f1c9a4cda50feb Mon Sep 17 00:00:00 2001 From: asteiker Date: Wed, 3 Jul 2024 17:06:45 +0000 Subject: [PATCH 3/5] remove s3credential line --- docs/howto/edl.ipynb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index 84a60948..ce9b967c 100644 --- a/docs/howto/edl.ipynb +++ b/docs/howto/edl.ipynb @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "a7bb1a93-6f85-40cd-93b4-ce821a03a8b5", "metadata": {}, "outputs": [], @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "c0f4e286-8ce9-4cde-b3a2-631b361a0d51", "metadata": {}, "outputs": [ @@ -81,7 +81,7 @@ "'�HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00���������HUn\\x00\\x00\\x00\\x00��������\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR\\x02'" ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -102,7 +102,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "1e5f5f7a-0643-42cb-b70c-4ac982824ff9", "metadata": {}, "outputs": [], @@ -112,7 +112,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "fbc7bc5f-b984-4324-b095-3648a437fba2", "metadata": {}, "outputs": [ @@ -122,7 +122,7 @@ "b'\\x89HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xd7HUn\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR'" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -135,14 +135,14 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "07433a9f-f276-4d2b-9ed3-f556df2884af", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ac15458d5f9e4b8aac40f2e5417b22c7", + "model_id": "9e8e316215154002afe0c89ccc174a04", "version_major": 2, "version_minor": 0 }, @@ -156,7 +156,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "100cb212635146bab6548c8bf171d970", + "model_id": "ff1c8adf11a04dc4aa799fe45aa7460d", "version_major": 2, "version_minor": 0 }, @@ -170,7 +170,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3754ed8d0297407cade522b651c59ead", + "model_id": "77eac7c793e7416bb91196733769f3fe", "version_major": 2, "version_minor": 0 }, @@ -185,8 +185,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 2.73 s, sys: 241 ms, total: 2.97 s\n", - "Wall time: 10.9 s\n" + "CPU times: user 1.37 s, sys: 207 ms, total: 1.58 s\n", + "Wall time: 11.8 s\n" ] }, { @@ -561,7 +561,7 @@ "Data variables:\n", " wavelengths (bands) float32 1kB ...\n", " fwhm (bands) float32 1kB ...\n", - " good_wavelengths (bands) float32 1kB ..." + " good_wavelengths (bands) float32 1kB ..." ], "text/plain": [ " Size: 3kB\n", @@ -573,7 +573,7 @@ " good_wavelengths (bands) float32 1kB ..." ] }, - "execution_count": 7, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } From 9c75e7d16f84919db11d3ffcb11f9d6b52993d9e Mon Sep 17 00:00:00 2001 From: asteiker Date: Wed, 3 Jul 2024 18:19:18 +0000 Subject: [PATCH 4/5] comment s3credential line --- docs/howto/edl.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index ce9b967c..dcc7727a 100644 --- a/docs/howto/edl.ipynb +++ b/docs/howto/edl.ipynb @@ -30,7 +30,7 @@ "metadata": {}, "source": [ "### Data in AWS\n", - "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs:\n", + "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. This line is commented out for security reasons. Please copy the following line into a new code block in order to obtain your credentials. \n", "\n", "```\n", "s3_credentials = auth.get_s3_credentials(\"NSIDC\")\n", From 5bc9fb95494f25302ffe40e7f20eedfc2953a8f6 Mon Sep 17 00:00:00 2001 From: asteiker Date: Wed, 3 Jul 2024 19:10:47 +0000 Subject: [PATCH 5/5] move s3credential to commented code cell --- docs/howto/edl.ipynb | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index dcc7727a..5949ddb5 100644 --- a/docs/howto/edl.ipynb +++ b/docs/howto/edl.ipynb @@ -30,11 +30,17 @@ "metadata": {}, "source": [ "### Data in AWS\n", - "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. This line is commented out for security reasons. Please copy the following line into a new code block in order to obtain your credentials. \n", - "\n", - "```\n", - "s3_credentials = auth.get_s3_credentials(\"NSIDC\")\n", - "```" + "If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. This line is commented out for security reasons. " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "f1f45172-c9c3-4f25-ad7e-acf94fba8b1d", + "metadata": {}, + "outputs": [], + "source": [ + "#s3_credentials = auth.get_s3_credentials(\"NSIDC\")" ] }, { @@ -57,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "a7bb1a93-6f85-40cd-93b4-ce821a03a8b5", "metadata": {}, "outputs": [], @@ -71,7 +77,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "c0f4e286-8ce9-4cde-b3a2-631b361a0d51", "metadata": {}, "outputs": [ @@ -81,7 +87,7 @@ "'�HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00���������HUn\\x00\\x00\\x00\\x00��������\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR\\x02'" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -102,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "1e5f5f7a-0643-42cb-b70c-4ac982824ff9", "metadata": {}, "outputs": [], @@ -112,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "fbc7bc5f-b984-4324-b095-3648a437fba2", "metadata": {}, "outputs": [ @@ -122,7 +128,7 @@ "b'\\x89HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xd7HUn\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR'" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -135,14 +141,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "07433a9f-f276-4d2b-9ed3-f556df2884af", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "9e8e316215154002afe0c89ccc174a04", + "model_id": "c76e3afc58a84118a04144f2f08ff6bc", "version_major": 2, "version_minor": 0 }, @@ -156,7 +162,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ff1c8adf11a04dc4aa799fe45aa7460d", + "model_id": "98f4219952eb4e9bb8f60ad67f438454", "version_major": 2, "version_minor": 0 }, @@ -170,7 +176,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "77eac7c793e7416bb91196733769f3fe", + "model_id": "9451a7fda27e4569968054028576999d", "version_major": 2, "version_minor": 0 }, @@ -185,8 +191,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 1.37 s, sys: 207 ms, total: 1.58 s\n", - "Wall time: 11.8 s\n" + "CPU times: user 1.4 s, sys: 179 ms, total: 1.58 s\n", + "Wall time: 10.5 s\n" ] }, { @@ -561,7 +567,7 @@ "Data variables:\n", " wavelengths (bands) float32 1kB ...\n", " fwhm (bands) float32 1kB ...\n", - " good_wavelengths (bands) float32 1kB ..." + " good_wavelengths (bands) float32 1kB ..." ], "text/plain": [ " Size: 3kB\n", @@ -573,7 +579,7 @@ " good_wavelengths (bands) float32 1kB ..." ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" }