Skip to content

Commit 3fb5a3e

Browse files
Merge pull request #332 from nasa/release/1.14.0
Release/1.14.0
2 parents 5186311 + 3283140 commit 3fb5a3e

31 files changed

Lines changed: 3593 additions & 3049 deletions

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
tests/data/icesat-2-ATL06/ATL06_20230816161508_08782002_006_02.h5 filter=lfs diff=lfs merge=lfs -text
2-
tests/data/icesat-2-ATL06/ATL06_20230816234629_08822013_006_01.h5 filter=lfs diff=lfs merge=lfs -text

.github/workflows/build-pipeline.yml

Lines changed: 0 additions & 136 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish on Release
2+
3+
on:
4+
release:
5+
types: [published] # This ensures the workflow runs only after a release is finalized
6+
7+
env:
8+
PYTHON_VERSION: "3.11"
9+
10+
jobs:
11+
build-and-publish:
12+
environment: pypi
13+
permissions:
14+
id-token: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 0 # Fetch all history for accurate versioning/changelogs
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v6
24+
with:
25+
python-version: ${{ env.PYTHON_VERSION }}
26+
27+
- name: Set up uv
28+
uses: astral-sh/setup-uv@v7
29+
with:
30+
enable-cache: true
31+
32+
- name: Verify version matches git tag
33+
run: scripts/verify_tag.sh
34+
35+
- name: Install dependencies
36+
run: uv sync --no-dev --frozen
37+
38+
- name: Build package
39+
run: uv build
40+
41+
- name: Publish to PyPI
42+
run: uv publish

.github/workflows/pull-request-received.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches: [ feature/**, issue/**, issues/** ]
99

1010
jobs:
11-
run_test:
12-
uses: ./.github/workflows/reusable_run_tests.yml
11+
run_tests:
12+
uses: ./.github/workflows/run_tests.yml
1313
secrets:
1414
codecov_token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release_created.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/reusable_run_tests.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/run_tests.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow will install Python dependencies, run tests,
2+
# and report test results and code coverage as artifacts. It will
3+
# be called by the workflow that runs tests against new PRs and as
4+
# a first step in the workflow that publishes new Docker images.
5+
6+
name: A reusable workflow to build and run the unit test suite
7+
8+
on:
9+
workflow_call:
10+
secrets:
11+
codecov_token:
12+
required: true
13+
EARTHDATA_USERNAME:
14+
description: 'NASA Earthdata username'
15+
required: true
16+
EARTHDATA_PASSWORD:
17+
description: 'NASA Earthdata password'
18+
required: true
19+
workflow_dispatch:
20+
21+
jobs:
22+
build_and_test:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
27+
28+
name: Python ${{ matrix.python-version }} tests
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v6
32+
33+
- name: Override .python-version for matrix testing
34+
run: echo "${{ matrix.python-version }}" > .python-version
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v6
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
41+
- name: Install uv
42+
uses: astral-sh/setup-uv@v7
43+
with:
44+
enable-cache: true
45+
46+
- name: Install package
47+
run: uv sync --frozen
48+
49+
- name: Run linting
50+
run: uv run ruff check ncompare
51+
52+
- name: Run unit tests with coverage
53+
run: |
54+
uv run pytest -v -m "not integration" --cov=ncompare --cov-report=
55+
56+
- name: Run integration tests with coverage
57+
env:
58+
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
59+
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
60+
run: |
61+
uv run pytest -v -m integration --cov=ncompare --cov-append --cov-report=
62+
63+
- name: Generate combined coverage report
64+
run: |
65+
uv run coverage xml -o build/reports/coverage${{ matrix.python-version }}.xml
66+
uv run coverage report
67+
68+
- name: Upload coverage reports to Codecov
69+
uses: codecov/codecov-action@v5
70+
with:
71+
token: ${{ secrets.CODECOV_TOKEN }}
72+
files: build/reports/coverage${{ matrix.python-version }}.xml
73+
flags: python-${{ matrix.python-version }}
74+
name: python-${{ matrix.python-version }}
75+
verbose: true

0 commit comments

Comments
 (0)