Skip to content

Commit cacff66

Browse files
Merge branch 'main' into issue-903-tutorial-for-open_virtual_dataset-using-TEMPO-data
2 parents 9b6dfda + 14f7d88 commit cacff66

11 files changed

Lines changed: 128 additions & 20 deletions

File tree

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: >
33
A bug is an issue that differs from documentation or has unexpected behavior.
44
title: "[BUG] {{ title }}"
55
labels:
6-
- Bug
7-
- Needs Triage
6+
- "type: bug"
7+
- "needs: triage"
88
body:
99
- type: checkboxes
1010
attributes:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: '🗺️ Experience report'
2+
description: 'Help us level up Earthaccess by sharing your unfiltered experiences, wins, and struggles'
3+
labels:
4+
- 'type: experience report'
5+
body:
6+
- type: 'textarea'
7+
attributes:
8+
label: 'Description'
9+
description: |
10+
Provide detailed feedback on your Earthaccess experience, including successes, challenges, and suggestions for improvement.
11+
Your insights will inform our development roadmap and community efforts.
12+
validations:
13+
required: true

.github/workflows/integration-test-review.yml

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,76 @@ jobs:
1919
require: write
2020
username: ${{ github.triggering_actor }}
2121

22-
- name: Add PR comment when user does not have write permission
22+
# The remaining steps are run only if the triggering actor (user) does NOT have
23+
# write permission for the repo, in which case, the purpose of the remaining
24+
# steps is to add a comment to the PR indicating that the actor (user) does
25+
# NOT have permissions to run integration tests, and thus a maintainer must
26+
# make sure the PR is "safe", and if so, re-run the "failed" integration tests
27+
# (because maintainers DO have the necessary write permission).
28+
29+
- name: Download PR number artifact
2330
# The name of the output require-result is a bit confusing, but when its value
2431
# is 'false', it means that the triggering actor does NOT have the required
2532
# permission.
26-
if: steps.permission.outputs.require-result == 'false'
33+
if: ${{ !env.ACT && steps.permission.outputs.require-result == 'false' }}
34+
uses: actions/github-script@v7
35+
with:
36+
# Download the PR artifact that was uploaded in integration-test.yml
37+
script: |
38+
const { owner, repo } = context.repo;
39+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
40+
owner, repo, run_id: context.payload.workflow_run.id,
41+
});
42+
const prNumberArtifact = artifacts.data.artifacts.filter(
43+
(artifact) => artifact.name == "pr_number"
44+
)[0];
45+
const download = await github.rest.actions.downloadArtifact({
46+
owner, repo, artifact_id: prNumberArtifact.id, archive_format: 'zip',
47+
});
48+
49+
const fs = require('fs');
50+
const path = require('path');
51+
const temp = '${{ runner.temp }}/artifacts';
52+
53+
if (!fs.existsSync(temp)) {
54+
fs.mkdirSync(temp);
55+
}
56+
57+
fs.writeFileSync(path.join(temp, 'pr_number.zip'), Buffer.from(download.data));
58+
59+
- name: Unzip downloaded PR number artifact
60+
if: ${{ !env.ACT && steps.permission.outputs.require-result == 'false' }}
61+
run: unzip pr_number.zip -d "${{ runner.temp }}/artifacts"
62+
63+
- name: Add PR comment
64+
# The name of the output require-result is a bit confusing, but when its value
65+
# is 'false', it means that the triggering actor does NOT have the required
66+
# permission.
67+
if: ${{ !env.ACT && steps.permission.outputs.require-result == 'false' }}
2768

2869
# If the triggering actor does not have write permission, then we want to add
2970
# a PR comment indicating a security review is required because we know that
3071
# the integration tests "failed" due to lack of permission (i.e., they were
3172
# actually "aborted" without running any tests).
3273
uses: actions/github-script@v7
3374
with:
75+
github-token: ${{ secrets.GITHUB_TOKEN }}
3476
script: |
35-
const { html_url } = await github.rest.issues.get({
36-
owner: context.repo.owner,
37-
repo: context.repo.repo,
38-
issue_number: context.issue.number,
39-
});
77+
const fs = require('fs');
78+
const path = require('path');
79+
const temp = '${{ runner.temp }}/artifacts';
80+
const { owner, repo } = context.repo;
81+
82+
// Read the PR number from the downloaded and unzipped artifact.
83+
const issue_number = Number(fs.readFileSync(path.join(temp, 'pr_number')));
84+
85+
// Get the URL of the PR so we can add a link in the PR comment.
86+
const { html_url } = await github.rest.issues.get({ owner, repo, issue_number });
4087
4188
github.rest.issues.createComment({
42-
owner: context.repo.owner,
43-
repo: context.repo.repo,
44-
issue_number: context.issue.number,
89+
owner,
90+
repo,
91+
issue_number,
4592
body: "User [${{ github.triggering_actor }}](${{ github.event.workflow_run.head_repository.owner.html_url }})"
4693
+ " does not have permission to run integration tests. A maintainer must perform a security review of the"
4794
+ ` [code changes in this pull request](${html_url}/files) and re-run the`

.github/workflows/integration-test.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,39 @@ jobs:
5858
runs-on: ubuntu-latest
5959
strategy:
6060
matrix:
61-
python-version: ["3.11", "3.12", "3.13"]
61+
include:
62+
- python-version: 3.11
63+
# We must save the PR number only once, and this also prevents
64+
# "duplicate artifact" errors caused when attempting to save the same
65+
# artifact for every python version we're running with. More specifically,
66+
# save-pr-number must be set to 'true' for 1 (and only 1) matrix combo
67+
# (it doesn't matter which combo).
68+
save-pr-number: true
69+
- python-version: 3.12
70+
save-pr-number: false
71+
- python-version: 3.13
72+
save-pr-number: false
6273
fail-fast: false
6374

6475
steps:
76+
# The first 2 steps will save the PR number to a file and upload the file as an
77+
# artifact, which we can then download if the workflow run fails (due to
78+
# insufficient permissions), which is handled in integration-test-review.yml.
79+
# See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#using-data-from-the-triggering-workflow
80+
- name: Save PR number
81+
if: matrix.save-pr-number
82+
env:
83+
PR_NUMBER: ${{ github.event.number }}
84+
run: |
85+
mkdir -p ./pr
86+
echo $PR_NUMBER > ./pr/pr_number
87+
88+
- uses: actions/upload-artifact@v4
89+
if: matrix.save-pr-number
90+
with:
91+
path: pr/
92+
name: pr_number
93+
6594
- name: Fetch user permission
6695
if: github.event_name == 'pull_request_target'
6796
id: permission
@@ -127,4 +156,4 @@ jobs:
127156
- name: Upload coverage report
128157
# Don't upload coverage when using the `act` tool to run the workflow locally
129158
if: ${{ !env.ACT }}
130-
uses: codecov/codecov-action@v4
159+
uses: codecov/codecov-action@v5

.github/workflows/test-mindeps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@v4.1.1
2525

2626
- name: Install uv
27-
uses: astral-sh/setup-uv@v3.2.2
27+
uses: astral-sh/setup-uv@v6.0.1
2828
with:
2929
enable-cache: true
3030

@@ -42,4 +42,4 @@ jobs:
4242
- name: Upload coverage
4343
# Don't upload coverage when using the `act` tool to run the workflow locally
4444
if: ${{ !env.ACT }}
45-
uses: codecov/codecov-action@v4
45+
uses: codecov/codecov-action@v5

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
- name: Upload coverage
3535
# Don't upload coverage when using the `act` tool to run the workflow locally
3636
if: ${{ !env.ACT }}
37-
uses: codecov/codecov-action@v4
37+
uses: codecov/codecov-action@v5

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ repos:
2828
- id: trailing-whitespace
2929

3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.11.4
31+
rev: v0.11.8
3232
hooks:
3333
- id: ruff
3434
args: ["--fix", "--exit-non-zero-on-fix"]
3535
- id: ruff-format
3636

3737
- repo: https://github.com/astral-sh/uv-pre-commit
38-
rev: "0.6.13"
38+
rev: "0.7.2"
3939
hooks:
4040
# Asserts that the lockfile is valid for pyproject.toml.
4141
# If it fails, update the lockfile by running:

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
2020
([#602](https://github.com/nsidc/earthaccess/issues/602))
2121
([@rwegener2](https://github.com/rwegener2))
2222

23+
### Changed
24+
25+
- By default, _disable_ progress bars during downloading.
26+
([#612](https://github.com/nsidc/earthaccess/issues/612))
27+
([@Sherwin-14](https://github.com/Sherwin-14))
28+
29+
### Fixed
30+
- Corrected Harmony typo in notebooks/Demo.ipynb([#995](https://github.com/nsidc/earthaccess/issues/995))([stelios-c](https://github.com/stelios-c))
31+
32+
### Changed
33+
- Updated bug and triage label names in bug Issue template.
34+
([#998](https://github.com/nsidc/earthaccess/pull/998))
35+
([@asteiker](https://github.com/asteiker))
2336

2437
## [v0.14.0] - 2025-02-11
2538

docs/quick-start.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,6 @@ files = earthaccess.download(results, "./local_folder")
101101

102102
Data can also be opened in-memory with `earthaccess.open()`. See [our API
103103
docs](user-reference/api/api.md) for more.
104+
105+
106+
We value your feedback! We want to hear all about your experience using earthaccess. Even if you're not noticing any issues or bugs, we want to know... what annoys you? What feels great? We'd love if you would share an experience [report](https://github.com/nsidc/earthaccess/issues/new/choose) with us!

earthaccess/store.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def multi_thread_open(data: tuple[str, Optional[DataGranule]]) -> EarthAccessFil
7373
pqdm_kwargs = {
7474
"exception_behaviour": "immediate",
7575
"n_jobs": 8,
76+
"disable": True,
7677
**(pqdm_kwargs or {}),
7778
}
7879

@@ -529,6 +530,7 @@ def get(
529530

530531
pqdm_kwargs = {
531532
"n_jobs": threads,
533+
"disable": True,
532534
**(pqdm_kwargs or {}),
533535
}
534536

@@ -738,6 +740,7 @@ def _download_onprem_granules(
738740

739741
pqdm_kwargs = {
740742
"exception_behaviour": "immediate",
743+
"disable": True,
741744
**(pqdm_kwargs or {}),
742745
# We don't want a user to be able to override the following kwargs,
743746
# which is why they appear *after* spreading pqdm_kwargs above.

0 commit comments

Comments
 (0)