Skip to content

Commit

Permalink
Merge branch 'main' into update-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Barrett committed Mar 19, 2024
2 parents 02cf2ec + a86f959 commit cd67868
Show file tree
Hide file tree
Showing 13 changed files with 1,628 additions and 889 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Integration Tests

on:
pull_request:
push:
branches:
- main
Expand All @@ -10,6 +11,12 @@ on:
- docs/**
- binder/**

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

## [Unreleased]

## [v0.9.0] 2024-02-28

* Bug fixes:
* fixed #439 by implementing more trusted domains in the SessionWithRedirection
* fixed #438 by using an authenticated session for hits()
* Enhancements:
* addressing #427 by adding parameters to collection query
* added user-agent in the request to track usage, closes #436

## [v0.8.2] 2023-12-06
* Bug fixes:
Expand Down Expand Up @@ -175,10 +178,17 @@
- Add basic classes to interact with NASA CMR, EDL and cloud access.
- Basic object formatting.

[Unreleased]: https://github.com/nsidc/earthaccess/compare/v0.8.2...HEAD
[Unreleased]: https://github.com/nsidc/earthaccess/compare/v0.9.0...HEAD
[v0.8.2]: https://github.com/nsidc/earthaccess/releases/tag/v0.8.2
[v0.8.1]: https://github.com/nsidc/earthaccess/releases/tag/v0.8.1
[v0.8.0]: https://github.com/nsidc/earthaccess/releases/tag/v0.8.0
[v0.7.1]: https://github.com/nsidc/earthaccess/releases/tag/v0.7.1
[v0.7.0]: https://github.com/nsidc/earthaccess/releases/tag/v0.7.0
[v0.6.0]: https://github.com/nsidc/earthaccess/releases/tag/v0.6.0
[v0.5.3]: https://github.com/nsidc/earthaccess/releases/tag/v0.5.3
[v0.5.2]: https://github.com/nsidc/earthaccess/releases/tag/v0.5.2
[v0.5.1]: https://github.com/nsidc/earthaccess/releases/tag/v0.5.1
[v0.5.0]: https://github.com/nsidc/earthaccess/releases/tag/v0.4.0
[v0.5.0]: https://github.com/nsidc/earthaccess/releases/tag/v0.5.0
[v0.4.7]: https://github.com/nsidc/earthaccess/releases/tag/v0.4.7
[v0.4.6]: https://github.com/nsidc/earthaccess/releases/tag/v0.4.6
[v0.4.1]: https://github.com/nsidc/earthaccess/releases/tag/v0.4.1
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ keywords:
url: "https://earthaccess.readthedocs.io"
repository-code: "https://github.com/nsidc/earthaccess"

version: "0.8.2"
date-released: "2023-12-06"
version: "0.9.0"
date-released: "2024-02-28"

authors:
- family-names: "Barrett"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Please note we have a code of conduct, please follow it in all your interactions
If we have `mamba` (or conda) installed, we can use the environment file included in the binder folder, this will install all the libraries we need (including Poetry) to start developing `earthaccess`

```bash
>mamba env update -f binder/environment-dev.yml
>mamba env update -f ci/environment-dev.yml
>mamba activate earthaccess-dev
>poetry install
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ earthaccess is licensed under the MIT license. See [LICENSE](LICENSE.txt).

<div><img src="https://raw.githubusercontent.com/nsidc/earthdata/main/docs/nsidc-logo.png" width="84px" align="left" text-align="middle"/>
<br>
This repository is not actively supported by NSIDC but we welcome issue submissions and pull requests in order to foster community contribution.
This repository is supported by a joint effort of NSIDC, NASA DAACs, and the Earth science community, and we welcome any contribution in the form of issue submissions, pull requests, or discussions. Issues labeled as https://github.com/nsidc/earthaccess/labels/good%20first%20issue are a great place to get started.
</div>

File renamed without changes.
1,028 changes: 810 additions & 218 deletions docs/tutorials/getting-started.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion earthaccess/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class SessionWithHeaderRedirection(requests.Session):
"urs.earthdata.nasa.gov",
"cumulus.asf.alaska.edu",
"sentinel1.asf.alaska.edu",
"nisar.asf.alaska.edu",
"datapool.asf.alaska.edu",
]

Expand Down
4 changes: 3 additions & 1 deletion earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _open_urls(
def get(
self,
granules: Union[List[DataGranule], List[str]],
local_path: Optional[Path] = None,
local_path: Union[Path, str, None] = None,
provider: Optional[str] = None,
threads: int = 8,
) -> List[str]:
Expand All @@ -468,6 +468,8 @@ def get(
today = datetime.datetime.today().strftime("%Y-%m-%d")
uuid = uuid4().hex[:6]
local_path = Path.cwd() / "data" / f"{today}-{uuid}"
elif isinstance(local_path, str):
local_path = Path(local_path)

if len(granules):
files = self._get(granules, local_path, provider, threads)
Expand Down
1,424 changes: 769 additions & 655 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "earthaccess"
version = "0.8.2"
version = "0.9.0"
homepage = "https://github.com/nsidc/earthaccess"
description = "Client library for NASA Earthdata APIs"
authors = ["earthaccess contributors"]
Expand Down Expand Up @@ -36,8 +36,8 @@ classifiers = [
python = ">=3.8,<4.0"
python-cmr = ">=0.9.0"
pqdm = ">=0.1"
requests = ">=2.26,<3.0.0"
s3fs = ">=2022.11, <2024"
requests = ">=2.26"
s3fs = ">=2022.11"
fsspec = ">=2022.11"
tinynetrc = "^1.3.1"
multimethod = ">=1.8"
Expand Down Expand Up @@ -110,7 +110,7 @@ combine-as-imports = true


[tool.bumpversion]
current_version = "0.8.2"
current_version = "0.9.0"
commit = false
tag = false

Expand Down
11 changes: 7 additions & 4 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
- asdf plugin add poetry
- asdf install poetry latest
- asdf global poetry latest
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry env info
- pip freeze

mkdocs:
configuration: mkdocs.yml
12 changes: 12 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pytest

ACCEPTABLE_FAILURE_RATE = 10


@pytest.hookimpl()
def pytest_sessionfinish(session, exitstatus):
if exitstatus == 0:
return
failure_rate = (100.0 * session.testsfailed) / session.testscollected
if failure_rate <= ACCEPTABLE_FAILURE_RATE:
session.exitstatus = 0

0 comments on commit cd67868

Please sign in to comment.