Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed May 10, 2024
1 parent aaa25be commit b81bc98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/howto/authenticate.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Once you are authenticated with NASA EDL you can:

### Earthdata User Acceptance Testing (UAT) environment

If your EDL account is authorized to access the User Acceptance Testing (UAT),
If your EDL account is authorized to access the User Acceptance Testing (UAT) system,
you can set earthaccess to work with its EDL and CMR endpoints
by setting the `system` argument at login, as follows:

Expand Down
4 changes: 2 additions & 2 deletions earthaccess/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ def login(strategy: str = "all", persist: bool = False, system: System = PROD) -
* **"netrc"**: retrieve username and password from ~/.netrc.
* **"environment"**: retrieve username and password from `$EARTHDATA_USERNAME` and `$EARTHDATA_PASSWORD`.
persist: will persist credentials in a .netrc file
system: the EDL endpoint to log in to Earthdata, defaults to PROD
system: the Earthdata system to access, defaults to PROD
Returns:
An instance of Auth.
"""
# Set the underlying Auth object's earthdata environment,
# Set the underlying Auth object's earthdata system,
# before triggering the getattr function for `__auth__`.
earthaccess._auth._set_earthdata_system(system)

Expand Down
3 changes: 1 addition & 2 deletions earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ class DataGranules(GranuleQuery):
_format = "umm_json"

def __init__(self, auth: Optional[Auth] = None, *args: Any, **kwargs: Any) -> None:
"""Base class for Granule and Collection CMR queries."""
super().__init__(*args, **kwargs)

if auth and auth.authenticated:
Expand Down Expand Up @@ -771,7 +770,7 @@ def _valid_state(self) -> bool:
return True

def _is_cloud_hosted(self, granule: Any) -> bool:
"""Check if a granule record, in CMR, advertises "direct access"."""
"""Check if a granule record, from CMR, advertises "direct access"."""
if "RelatedUrls" not in granule["umm"]:
return False

Expand Down

0 comments on commit b81bc98

Please sign in to comment.