Skip to content

Commit

Permalink
merge main into issue-554 branch, resolving conflicts in CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Jul 8, 2024
2 parents 8bf7d5e + 30ddd87 commit dd49a7a
Show file tree
Hide file tree
Showing 42 changed files with 2,001 additions and 3,895 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
notebooks/** linguist-documentation
docs/** linguist-documentation
tests/unit/fixtures/vcr_cassettes/** linguist-documentation
tests/unit/fixtures/vcr_cassettes/** linguist-documentation
27 changes: 20 additions & 7 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ concurrency:
group: integration-tests-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
test:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand All @@ -35,22 +39,29 @@ jobs:
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
uses: abatilo/actions-poetry@v3
- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
poetry self add setuptools
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install Dependencies
if: ${{ !env.ACT }}
run: poetry install
- name: Install Dependencies
if: ${{ env.ACT }}
# When using `act` to run the workflow locally, the `poetry install` command
# may fail due to network issues when running multiple Docker containers.
run: poetry install || poetry install || poetry install
- name: Test
env:
EARTHDATA_USERNAME: ${{ secrets.EDL_USERNAME }}
Expand All @@ -59,4 +70,6 @@ jobs:
EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }}
run: poetry run bash scripts/integration-test.sh
- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v4
42 changes: 42 additions & 0 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'

permissions:
contents: read

jobs:
build:
name: issue metrics
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: read
steps:
- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:${{ github.repository }} is:issue created:${{ env.last_month }} -reason:"not planned"'

- name: Create issue
uses: peter-evans/create-issue-from-file@v5
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
2 changes: 2 additions & 0 deletions .github/workflows/test-mindeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ jobs:
run: bash scripts/test.sh

- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v4
27 changes: 20 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ on:
pull_request:
types: [opened, synchronize]

defaults:
run:
shell: bash -l {0}

jobs:
test:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand All @@ -23,23 +27,32 @@ jobs:
id: full-python-version
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
uses: abatilo/actions-poetry@v3
- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
poetry self add setuptools
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install Dependencies
if: ${{ !env.ACT }}
run: poetry install
- name: Install Dependencies
if: ${{ env.ACT }}
# When using `act` to run the workflow locally, the `poetry install` command
# may fail due to network issues when running multiple Docker containers.
run: poetry install || poetry install || poetry install
- name: Test
run: poetry run bash scripts/test.sh
- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v4
23 changes: 19 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,41 @@ 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.4.3
rev: v0.5.0
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format
- repo: https://github.com/google/yamlfmt
rev: v0.12.1
rev: v0.13.0
hooks:
- id: yamlfmt
types_or: [yaml]
exclude: ".*/vcr_cassettes/.*\\.yaml"

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.4"
rev: "v2.3.0"
hooks:
- id: "codespell"
exclude: ".codespellignore|tests/.*"
Expand Down
35 changes: 22 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,23 @@
([#511](https://github.com/nsidc/earthaccess/issues/511))
([**@botanical**](https://github.com/botanical),[**@chuckwondo**](https://github.com/chuckwondo),
[**@mfisher87**](https://github.com/mfisher87))
- Correct and enhance static type hints for functions and methods that make CMR queries
or handle CMR query results ([#508](https://github.com/nsidc/earthaccess/issues/508))
([**@mfisher87**](https://github.com/mfisher87),[**@jhkennedy**](https://github.com/jhkennedy),
[**@chuckwondo**](https://github.com/chuckwondo),[**@betolink**](https://github.com/betolink))
- Create destination path prior to direct S3 downloads, if it doesn't already
exist ([#562](https://github.com/nsidc/earthaccess/issues/562))
([**@itcarroll**](https://github.com/itcarroll),[**@mfisher87**](https://github.com/mfisher87),
[**@chuckwondo**](https://github.com/chuckwondo))

### Added

- Use [Search After](https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#search-after)
for collection and granule searches to support deep-paging through large result sets
([#483](https://github.com/nsidc/earthaccess/issues/483))
([**@doug-newman-nasa**](https://github.com/doug-newman-nasa),[**@chuckwondo**](https://github.com/chuckwondo),
[**@mfisher87**](https://github.com/mfisher87),[**@betolink**](https://github.com/betolink))
- Enable queries to Earthdata User Acceptance Testing (UAT) system for authenticated accounts
([#421](https://github.com/nsidc/earthaccess/issues/421))
([**@danielfromearth**](https://github.com/danielfromearth),[**@mfisher87**](https://github.com/mfisher87),
[**@jhkennedy**](https://github.com/jhkennedy),[**@chuckwondo**](https://github.com/chuckwondo),
[**@betolink**](https://github.com/betolink))
- Add support for Python 3.12
([#457](https://github.com/nsidc/earthaccess/issues/457))
([**@chuckwondo**](https://github.com/chuckwondo),[**@mfisher87**](https://github.com/mfisher87))

### Removed

- **Breaking:** Remove support for Python 3.8
([#457](https://github.com/nsidc/earthaccess/issues/457))
([**@mfisher87**](https://github.com/mfisher87),[**@chuckwondo**](https://github.com/chuckwondo))
- **Breaking:** Remove the
`get_user_profile` method and the `email_address` and `profile` attributes
from the `Auth` class. Calling the EDL API to get user profile information
Expand All @@ -44,6 +37,22 @@
[**@jhkennedy**](https://github.com/jhkennedy),[**@chuckwondo**](https://github.com/chuckwondo),
[**@betolink**](https://github.com/betolink))

### Fixed

- Use [Search After](https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#search-after)
for collection and granule searches to support deep-paging through large result sets
([#483](https://github.com/nsidc/earthaccess/issues/483))
([**@doug-newman-nasa**](https://github.com/doug-newman-nasa),[**@chuckwondo**](https://github.com/chuckwondo),
[**@mfisher87**](https://github.com/mfisher87),[**@betolink**](https://github.com/betolink))
- Correct and enhance static type hints for functions and methods that make CMR queries
or handle CMR query results ([#508](https://github.com/nsidc/earthaccess/issues/508))
([**@mfisher87**](https://github.com/mfisher87),[**@jhkennedy**](https://github.com/jhkennedy),
[**@chuckwondo**](https://github.com/chuckwondo),[**@betolink**](https://github.com/betolink))
- Create destination path prior to direct S3 downloads, if it doesn't already
exist ([#562](https://github.com/nsidc/earthaccess/issues/562))
([**@itcarroll**](https://github.com/itcarroll),[**@mfisher87**](https://github.com/mfisher87),
[**@chuckwondo**](https://github.com/chuckwondo))

## [0.9.0] - 2024-02-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
1 change: 0 additions & 1 deletion binder/postBuild
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ set -ex

poetry config virtualenvs.create false
poetry install --no-dev

1 change: 1 addition & 0 deletions ci/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- mkdocs>=1.2
- mkdocs-material>=7.1,<9.0
- markdown-include>=0.6
- mkdocs-redirects>=1.2.1
- mkdocstrings>=0.19.0
- mkdocstrings-python
- mkdocs-jupyter>=0.19.0
Expand Down
2 changes: 1 addition & 1 deletion ci/environment-mindeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channels:
- conda-forge
dependencies:
# required dependencies
- python=3.8
- python=3.9
- python-cmr=0.10.0
- pqdm=0.1
- requests=2.26
Expand Down
1 change: 1 addition & 0 deletions docs/contributing/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CODE_OF_CONDUCT.md"
2 changes: 1 addition & 1 deletion docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ with the community and maintainers via
[a GitHub Discussion](https://github.com/nsidc/earthaccess/discussions),
or [any other method](our-meet-ups.md).

Please note that we have a [code of conduct](/CODE_OF_CONDUCT.md). Please follow it in all of your interactions with the project.
Please note that we have a [code of conduct](./code-of-conduct.md). Please follow it in all of your interactions with the project.

## First Steps to contribute

Expand Down
58 changes: 58 additions & 0 deletions docs/contributing/maintainers-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Maintainers Guide

This page offers guidance to project maintainers regarding our setup procedures, release processes, package creation, and other related tasks.

## Maintainer Onboarding and Best Practices

### Becoming a Maintainer or Triager

If you are interested in becoming a maintainer, you can join our community. Maintainers have several important responsibilities, so please read on to understand the role.

Also, if you're interested in helping managing issues with labels and interacting with incoming requests, you can have a "triager" role!

To get permissions, please start by participating on GitHub by answering questions, reviewing PRs, or contributing code or documentation. Once you're feeling comfortable, you can ask any of our maintainers for permissions by `@`ing them on GitHub.

### Maintainer Responsibilities and Expectations

1. As a maintainer, there is no strict time obligation, as we understand that everyone's ability to commit can fluctuate. However, we do expect maintainers to communicate openly and transparently with the team and the community.

2. As a maintainer, you are expected to uphold a positive and inclusive team culture. This includes following the guidelines outlined in the [Openscapes team culture page](https://openscapes.github.io/series/core-lessons/team-culture.html) and the [recorded psychological safety talk](https://www.youtube.com/watch?v=rzi-qkl8u5M) . By doing so, you can help ensure that all team members and contributors feel safe, respected, and valued.


### Maintainer Processes Beyond Regular Contributing

1. As a maintainer, label issues clearly and consistently to help contributors identify issue types and priority. Use 'good first issue' for contributor-friendly issues.

2. As a maintainer, create welcoming environment when communicating with contributors (issue / PR / discussion posters).

3. As a maintainer reviewing and merging contributions is critical. Here are some best practices:

3a. Review contributions thoroughly.

3b. Provide constructive feedback.

3c. Communicate clearly and respectfully.

3d. Merge contributions promptly.

4. As a maintainer, you will be releasing different versions. More on this in [here](./releasing.md).

## Branches

main: This is the main branch, which is consistently tested and prepared for release as a new version. Avoid pushing changes directly to this branch. Instead, create a new branch and submit a pull request for any modifications.


## Continuous Integration & Delivery

The GitHub Actions CI services handle the project's building, testing, and management across Linux, macOS, and Windows platforms. The CI configuration files can be found in the `./.github/workflows/`. Here we briefly summarize the functions of the files in the `./ci/` directory.

`environment-dev.yml` - The environment configuration file specifies dependencies for Python development.

`environment-mindeps.yaml`- Specifies an environment with the minimum supported dependency versions to detect backwards-incompatible code.

## Continuous Documentation

[ReadTheDocs](https://readthedocs.org/projects/earthaccess/) is used to generate and host [our documentation website](https://earthaccess.readthedocs.io/) as well as the preview for documentation changes made in pull requests. This service uses a configuration file in the root of the project, `.readthedocs.yml`.



2 changes: 0 additions & 2 deletions docs/howto/access-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

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
Loading

0 comments on commit dd49a7a

Please sign in to comment.