diff --git a/.gitattributes b/.gitattributes index 01fe5009..affcecd7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ notebooks/** linguist-documentation docs/** linguist-documentation -tests/unit/fixtures/vcr_cassettes/** linguist-documentation \ No newline at end of file +tests/unit/fixtures/vcr_cassettes/** linguist-documentation diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e596ad29..9506aa4f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,10 +7,25 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: + # Validate format - id: check-yaml - - id: trailing-whitespace - id: check-toml - id: check-json + # Check for common mistakes + - id: check-added-large-files + - id: check-case-conflict + # - id: check-illegal-windows-names # TODO: Enable in next release + - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-vcs-permalinks + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: mixed-line-ending + - id: no-commit-to-branch # protects `main` by default + - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.0 diff --git a/binder/postBuild b/binder/postBuild old mode 100644 new mode 100755 index 254815af..bcf7589f --- a/binder/postBuild +++ b/binder/postBuild @@ -4,4 +4,3 @@ set -ex poetry config virtualenvs.create false poetry install --no-dev - diff --git a/docs/howto/access-data.md b/docs/howto/access-data.md index 22f19521..f87a87f2 100644 --- a/docs/howto/access-data.md +++ b/docs/howto/access-data.md @@ -41,5 +41,3 @@ And that's it in just one line of code! This same piece of code will also work f > More examples coming soon! - - diff --git a/docs/howto/cloud.md b/docs/howto/cloud.md index d3557f72..ebfccf03 100644 --- a/docs/howto/cloud.md +++ b/docs/howto/cloud.md @@ -1,3 +1,3 @@ # Direct S3 access for cloud-based datasets -Coming soon \ No newline at end of file +Coming soon diff --git a/docs/howto/edl.ipynb b/docs/howto/edl.ipynb index d26503dc..5949ddb5 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. This line is commented out for security reasons. " ] }, { "cell_type": "code", - "execution_count": 3, - "id": "3108ff21-1ea2-449b-b2f5-b442dd3b61f5", + "execution_count": 2, + "id": "f1f45172-c9c3-4f25-ad7e-acf94fba8b1d", "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": "c76e3afc58a84118a04144f2f08ff6bc", "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, diff --git a/docs/howto/search-collections.md b/docs/howto/search-collections.md index 9b4ee282..517b8629 100644 --- a/docs/howto/search-collections.md +++ b/docs/howto/search-collections.md @@ -1,3 +1,3 @@ # how to search for data collections using spatial, temporal, keyword filters -Coming soon \ No newline at end of file +Coming soon diff --git a/docs/howto/search-granules.md b/docs/howto/search-granules.md index 06286eb9..2926dfa2 100644 --- a/docs/howto/search-granules.md +++ b/docs/howto/search-granules.md @@ -32,5 +32,3 @@ results = earthaccess.search_data( ``` Now that we have our results we can do multiple things: We can iterate over them to get HTTP (or S3) links, we can download the files to a local folder, or we can open these files and stream their content directly to other libraries e.g. xarray. - - diff --git a/docs/howto/storage-location.md b/docs/howto/storage-location.md index f68773d1..83eac95a 100644 --- a/docs/howto/storage-location.md +++ b/docs/howto/storage-location.md @@ -1,3 +1,3 @@ # Determine if a data set is on-prem or in the cloud -Coming soon \ No newline at end of file +Coming soon diff --git a/docs/resources.md b/docs/resources.md index 2421c7c2..341d8d7d 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -5,5 +5,3 @@ * [earthaccess @ AGU poster](https://docs.google.com/presentation/d/1OOSZzbHv6Ck4lzOE01FQdI4kX0VCfcVBS4pWCc7dtBo/edit?usp=sharing) * [NSIDC Cloud Data Access Guide](https://nsidc.org/data/user-resources/help-center/nasa-earthdata-cloud-data-access-guide) - - diff --git a/docs/user-reference/collections/collections-query.md b/docs/user-reference/collections/collections-query.md index e554278f..a59e6926 100644 --- a/docs/user-reference/collections/collections-query.md +++ b/docs/user-reference/collections/collections-query.md @@ -7,4 +7,3 @@ show_source: false inherited_members: true show_source: false - diff --git a/docs/user-reference/collections/collections.md b/docs/user-reference/collections/collections.md index c877360b..e83628b9 100644 --- a/docs/user-reference/collections/collections.md +++ b/docs/user-reference/collections/collections.md @@ -5,4 +5,3 @@ inherited_members: true show_root_heading: true show_source: false - diff --git a/docs/user-reference/granules/granules-query.md b/docs/user-reference/granules/granules-query.md index 78120c0d..75f1adb2 100644 --- a/docs/user-reference/granules/granules-query.md +++ b/docs/user-reference/granules/granules-query.md @@ -8,4 +8,3 @@ inherited_members: true show_root_heading: true show_source: false - diff --git a/docs/user-reference/granules/granules.md b/docs/user-reference/granules/granules.md index 788949ef..e0bbd2c2 100644 --- a/docs/user-reference/granules/granules.md +++ b/docs/user-reference/granules/granules.md @@ -5,6 +5,3 @@ inherited_members: true show_root_heading: true show_source: false - - - diff --git a/poetry.lock b/poetry.lock index 00d277a3..10e0260f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiobotocore" @@ -462,13 +462,13 @@ test = ["coverage", "freezegun", "pre-commit", "pytest", "pytest-cov", "pytest-m [[package]] name = "certifi" -version = "2024.6.2" +version = "2024.7.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, - {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, + {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, + {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] [[package]]