Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/nsidc/earthaccess into kerc…
Browse files Browse the repository at this point in the history
…hunk
  • Loading branch information
jrbourbeau committed Dec 1, 2023
2 parents 980cc76 + cbc3bc4 commit 4828ff9
Show file tree
Hide file tree
Showing 34 changed files with 384 additions and 380 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
groups:
pip-dependencies:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
gha-dependencies:
patterns:
- "*"
67 changes: 0 additions & 67 deletions .github/workflows/documentation.yml

This file was deleted.

22 changes: 15 additions & 7 deletions .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@ name: "Issue Manager"

on:
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"
issue_comment:
types:
- "created"
issues:
types:
- "labeled"
pull_request_target:
types:
- "labeled"

jobs:
issue-manager:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
steps:
- uses: tiangolo/issue-manager@master
- uses: "tiangolo/issue-manager@0.4.0"
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: "${{ secrets.GITHUB_TOKEN }}"
config: >
{
"answered": {
"users": ["betolink"],
"feedback requested": {
"delay": 864000,
"message": "Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues."
"message": "Closing after 10 days of waiting for feedback. If you feel this was in error, please re-open, `@` a maintainer, or create new issues."
}
}
27 changes: 27 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint and Format with Ruff

on: push

jobs:
check-with-ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Ruff linting check
run: |
ruff check --output-format=github .
- name: Ruff format check
run: |
ruff format --diff .
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ name: Unit Tests

on:
push:
paths:
- earthaccess/**
- tests/**
pull_request:
paths:
- earthaccess/**
- tests/**
types: [opened, synchronize]

jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build/
*.egg-info/
docs/tutorials/data
tests/integration/data
.ruff_cache

# OS X
.DS_Store
Expand Down
29 changes: 18 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
ci:
autoupdate_schedule: "monthly" # Like dependabot
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_prs: false # Comment "pre-commit.ci autofix" on a PR to trigger

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: check-toml
- id: check-json
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: check-toml
- id: check-json
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# Changelog

## [unreleased]
* bug fixes:
## [v0.8.0] 2023-11-29
* Bug fixes:
* Fix zero granules being reported for restricted datasets.
* Enhancements:
* earthaccess will `raise` errors instead of `print`ing them in more cases.
* `daac` and `provider` parameters are now normalized to uppercase, since lowercase
characters are never valid.

## [v0.7.1] 2023-11-08
* Bug Fixes:
* Treat granules without `RelatedUrls` as not cloud-hosted.

## [v0.7.0] 2023-10-31
* Bug Fixes:
* Fix spelling mistake in `access` variable assignment (`direc` -> `direct`)
in `earthaccess.store._get_granules`.
* Pass `threads` arg to `_open_urls_https` in
`earthaccess.store._open_urls`, replacing the hard-coded value of 8.
* Return S3 data links by default when in region.
* Enhancements:
* `earthaccess.download` now accepts a single granule as input in addition to a list of granules.
* `earthaccess.download` now returns fully qualified local file paths.
* New Features:
* Earthaccess will now automatically search for Earthdata authentication. ``earthaccess.login()``
still works as before, but is no longer required if you have a ``~/.netrc`` file for have set
``EARTHDATA_USERNAME`` and ``EARTHDATA_PASSWORD`` environment variables.
* Add `earthaccess.auth_environ()` utility for getting Earthdata authentication environment variables.

## [v0.6.0] 2023-09-20
* bug fixes:
Expand Down
8 changes: 6 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ keywords:
url: "https://earthaccess.readthedocs.io"
repository-code: "https://github.com/nsidc/earthaccess"

version: "0.6.1"
date-released: "2023-09-20"
version: "0.8.0"
date-released: "2023-11-29"

authors:
- family-names: "Barrett"
Expand All @@ -43,6 +43,10 @@ authors:
given-names: "Matt"
orcid: "https://orcid.org/0000-0003-3260-5445"
website: "https://mfisher87.github.io/"
- family-names: "Kaufman"
given-names: "Daniel"
orcid: "https://orcid.org/0000-0002-1487-7298"
website: "https://github.com/danielfromearth"
- family-names: "Kennedy"
given-names: "Joseph"
orcid: "https://orcid.org/0000-0002-9348-693X"
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please note we have a code of conduct, please follow it in all your interactions
## Development environment


`earthaccess` is a Python library that uses Poetry to build and publish the package to PyPI, the defacto Python repository. In order to develop new features or patch bugs etc. we need to set up a virtual environment and install the library locally. We can accomplish this with both Poetry or/and Conda.
`earthaccess` is a Python library that uses Poetry to build and publish the package to PyPI, the defacto Python repository. In order to develop new features or patch bugs etc. we need to set up a virtual environment and install the library locally. We can accomplish this with both Poetry or/and Conda.

### Using Conda

Expand Down Expand Up @@ -75,7 +75,7 @@ scripts/format.sh
3. Update the documentation and the README.md with details of changes to the interface,
this includes new environment variables, function names, decorators, etc.
3. Update `CHANGELOG.md` with details about your change in a section titled
`Unreleased`. If one does not exist, please create one.
`Unreleased`. If one does not exist, please create one.
4. You may merge the Pull Request in once you have the sign-off of another developers,
or if you do not have permission to do that, you may request the reviewer to merge it
for you.
Expand All @@ -89,7 +89,7 @@ scripts/format.sh
1. Use `bump-my-version` to increase the version number in all needed places, e.g. to
increase the minor version (`1.2.3` to `1.3.0`):
```
bumpversion bump minor
bump-my-version bump minor
```
2. Push a tag on the new commit containing the version number, prefixed with `v`, e.g.
`v1.3.0`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ earthaccess.login()
```

Note you can pass `persist=True` to `earthaccess.login()` to have the EDL account credentials you enter
automatically saved to a `~/.netrc` file for future use.
automatically saved to a `~/.netrc` file for future use.


Once you are authenticated with NASA EDL you can:
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/cloud.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Direct S3 access for cloud-based datasets

Coming soon
Coming soon
2 changes: 1 addition & 1 deletion docs/howto/onprem.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Download data for on-prem datasets
# Download data for on-prem datasets

Import the `earthaccess` library, search for granules in an on-prem dataset and download to a local computer.
The Sea Ice Concentrations from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data, Version 2, dataset is used.
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/search-collections.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# how to search for data collections using spatial, temporal, keyword filters
# how to search for data collections using spatial, temporal, keyword filters

Coming soon
2 changes: 1 addition & 1 deletion docs/howto/search-granules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import earthaccess
results = earthaccess.search_data(
short_name = "ATL06",
version = "005",
cloud_hosted = True,
cloud_hosted = True,
bounding_box = (-10,20,10,50),
temporal = ("2020-02", "2020-03"),
count = 100
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/storage-location.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Determine if a data set is on-prem or in the cloud
# Determine if a data set is on-prem or in the cloud

Coming soon
1 change: 0 additions & 1 deletion earthaccess/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import threading
from importlib.metadata import version
from typing import Any

from .api import (
auth_environ,
Expand Down
Loading

0 comments on commit 4828ff9

Please sign in to comment.