Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/nsidc/earthaccess into py-312
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed Dec 22, 2023
2 parents ac21c77 + ae9d7c2 commit c0a3715
Show file tree
Hide file tree
Showing 37 changed files with 2,641 additions and 1,905 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ updates:
schedule:
interval: "monthly"
groups:
all-dependencies:
pip-dependencies:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
gha-dependencies:
patterns:
- "*"
11 changes: 0 additions & 11 deletions .github/workflows/binder-badge.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/documentation.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, "3.10", "3.11"]
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get full python version
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v1
uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -52,4 +52,4 @@ jobs:
EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }}
run: poetry run bash scripts/integration-test.sh
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
26 changes: 17 additions & 9 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
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
- uses: "tiangolo/issue-manager@0.4.0"
with:
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."
}
}
21 changes: 21 additions & 0 deletions .github/workflows/pr-rtd-link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The ReadTheDocs preview link is "hidden" within the GitHub "Checks"
# interface. For users who don't know this, finding the preview link may be
# very difficult or frustrating. This workflow makes the link more
# findable by updating PR descriptions to include it.
name: "Add ReadTheDocs preview link to PR descriptions"

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: "write"

jobs:
autolink-rtd-previews:
runs-on: "ubuntu-latest"
steps:
- uses: "readthedocs/actions/preview@v1"
with:
project-slug: "earthaccess"
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: verify version matches git tag
run: scripts/verify_tag.sh
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.8
uses: JRubics/poetry-publish@v1.17
with:
python_version: "3.9"
pypi_token: ${{ secrets.PYPI_TOKEN }}
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 .
49 changes: 49 additions & 0 deletions .github/workflows/test-mindeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test minimum dependencies

on:
push:
pull_request:
workflow_dispatch:

# 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

# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout source
uses: actions/checkout@v4.1.1
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2.2.0
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
channel-priority: strict
environment-file: ci/environment-mindeps.yaml
activate-environment: test-environment
auto-activate-base: false

- name: Install
run: python -m pip install --no-deps -e .

- name: mamba list
run: mamba list

- name: Test
run: bash scripts/test.sh

- name: Upload coverage
uses: codecov/codecov-action@v1
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get full python version
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v1
uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test
run: poetry run bash scripts/test.sh
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
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
39 changes: 26 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
ci:
autoupdate_schedule: "monthly" # Like dependabot
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
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: 23.10.1
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.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
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
types_or: [yaml]
- repo: https://github.com/citation-file-format/cffconvert
rev: "054bda51dbe278b3e86f27c890e3f3ac877d616c"
hooks:
- id: "validate-cff"
args:
- "--verbose"
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [v0.8.2] 2023-12-06
* Bug fixes:
* Enable AWS check with IMDSv2
* Add region to running in AWS check
* Handle opening multi-file granules
* Maintenance:
* Add CI tests with minimum supported versions
* Update poetry lockfile
* Add `python-dateutil` as a direct dependency
* Remove binder PR comments
* Add YAML formatting (prettier)

## [v0.8.1] 2023-12-01
* New Features:
* Add `kerchunk` metadata consolidation utility.
* Enhancements:
* Handle S3 credential expiration more gracefully.
* Maintenanece:
* Use dependabot to update Github Actions.
* Consolidate dependabot updates.
* Switch to `ruff` for formatting.

## [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.
Expand Down
Loading

0 comments on commit c0a3715

Please sign in to comment.