Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.3.0 #140

Merged
merged 47 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f7e7a9b
/version 2.2.0-alpha.0
Aug 29, 2022
794fcf1
Feature/issue 85 (#112)
dkauf42 Aug 29, 2022
0c0d46a
/version 2.2.0-alpha.1
Aug 29, 2022
3c0a89a
Adding collections UAT: C1242387621-POCLOUD
Sep 2, 2022
5e460a3
/version 2.2.0-alpha.2
Sep 2, 2022
20caad0
/version 2.2.0-alpha.0
Sep 6, 2022
e17bc75
Merge branch 'main' of github-frankinspace:podaac/l2ss-py into develop
frankinspace Sep 6, 2022
d167b42
/version 2.2.0-alpha.1
Sep 6, 2022
4bcab56
/version 2.2.0-alpha.2
Sep 6, 2022
900207e
/version 2.2.0-alpha.3
Sep 6, 2022
d6e6481
Adding collections UAT: C1238658389-POCLOUD
Sep 6, 2022
72d4f1f
/version 2.2.0-alpha.4
Sep 6, 2022
b0c6815
Feature/issue 115 (#116)
dkauf42 Sep 7, 2022
7846433
/version 2.2.0-alpha.5
Sep 7, 2022
dbe3aa8
Merge branch 'main' into develop
Sep 8, 2022
71b091d
/version 2.2.0-alpha.6
Sep 8, 2022
d1452f6
Adding collections OPS: C2152045877-POCLOUD
Sep 14, 2022
f01dc81
Feature/issue-110 (#117)
nlenssen2013 Sep 15, 2022
c8dbf09
Feature/issue 119 (#120)
nlenssen2013 Sep 15, 2022
1160205
/version 2.2.0-alpha.7
Sep 15, 2022
8214a13
Feature/issue 122 (#123)
nlenssen2013 Sep 26, 2022
f6c08f4
/version 2.2.0-alpha.8
Sep 26, 2022
007e8ee
/version 2.3.0-alpha.0
Oct 18, 2022
8ceae18
Merge branch 'main' into develop
Oct 18, 2022
27b5ce9
/version 2.3.0-alpha.1
Oct 18, 2022
aaf7021
Adding collections OPS: C1940471193-POCLOUD
Oct 24, 2022
674fbc7
/version 2.3.0-alpha.2
Oct 24, 2022
7309694
Upload the automated notebook used for testing
frankinspace Oct 25, 2022
07e5e7c
/version 2.3.0-alpha.3
Oct 25, 2022
bd4e2cf
Adding collections OPS: C2205121315-POCLOUD
Nov 9, 2022
091a4a8
/version 2.3.0-alpha.4
Nov 9, 2022
8c2d9e8
feature/PODAAC-5065 (#129)
sliu008 Dec 8, 2022
8fe0f41
/version 2.3.0-alpha.5
Dec 8, 2022
ef5c636
feature/issue 126 (#131)
nlenssen2013 Dec 12, 2022
ddac85c
/version 2.3.0-alpha.6
Dec 12, 2022
98b131a
Update build-pipeline.yml
frankinspace Dec 13, 2022
13c5eeb
/version 2.3.0-alpha.7
Dec 13, 2022
e36f1e7
Issues/127: Updates to compute_coordinate_variable_names for grouped …
frankinspace Dec 13, 2022
3151eca
/version 2.3.0-alpha.8
Dec 13, 2022
41cc840
Snyk blocking step (#137)
jonathansmolenski Jan 5, 2023
f28525d
/version 2.3.0-alpha.9
Jan 5, 2023
f4b700d
Feature/issue 136 (#138)
danielfromearth Jan 25, 2023
d2bf9b5
/version 2.3.0-alpha.10
Jan 25, 2023
0193ffb
Updated CHANGELOG
Jan 25, 2023
307a1a6
/version 2.3.0-alpha.11
Jan 25, 2023
e55e03e
Release 2.3.0
Jan 25, 2023
d24867b
/version 2.3.0-rc.1
Jan 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 36 additions & 17 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build
on:
# Triggers the workflow on push events
push:
branches: [ develop, release/**, main, feature/** ]
branches: [ develop, release/**, main, feature/**, issue/**, issues/**, dependabot/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -36,7 +36,10 @@ jobs:
echo "pyproject_name=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
- name: Bump pre-alpha version
# If triggered by push to a feature branch
if: ${{ startsWith(github.ref, 'refs/heads/feature/') }}
if: |
${{ startsWith(github.ref, 'refs/heads/issue') }} ||
${{ startsWith(github.ref, 'refs/heads/dependabot/') }} ||
${{ startsWith(github.ref, 'refs/heads/feature/') }}
run: |
new_ver="${{ steps.get-version.outputs.current_version }}+$(git rev-parse --short ${GITHUB_SHA})"
poetry version $new_ver
Expand Down Expand Up @@ -97,6 +100,17 @@ jobs:
-Dsonar.projectName=l2ss-py
-Dsonar.projectVersion=${{ env.software_version }}
-Dsonar.python.version=3.7,3.8,3.9
- name: Run Snyk as a blocking step
uses: snyk/actions/python-3.8@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: >
--org=${{ secrets.SNYK_ORG_ID }}
--project-name=${{ github.repository }}
--severity-threshold=high
--fail-on=all
- name: Run Snyk on Python
uses: snyk/actions/python-3.8@master
env:
Expand Down Expand Up @@ -160,6 +174,7 @@ jobs:
name: python-artifact
path: dist/*
- name: Publish to test.pypi.org
id: pypi-test-publish
if: |
github.ref == 'refs/heads/develop' ||
startsWith(github.ref, 'refs/heads/release')
Expand All @@ -170,34 +185,43 @@ jobs:
poetry publish -r testpypi
- name: Publish to pypi.org
if: ${{ github.ref == 'refs/heads/main' }}
id: pypi-publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}
run: |
poetry publish
- name: Log in to the Container registry
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ env.software_version }}
type=raw,value=${{ env.venue }}
- name: Wait for package
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
run: |
pip install tenacity
${GITHUB_WORKSPACE}/.github/workflows/wait-for-pypi.py ${{env.pyproject_name}}[harmony]==${{ env.software_version }}
- name: Build and push Docker image
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
uses: docker/build-push-action@v2
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
Expand All @@ -208,21 +232,16 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Run Snyk on Docker Image
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
continue-on-error: true
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.software_version }}
image: ${{ steps.meta.outputs.tags[0] }}
args: >
--severity-threshold=high
--file=./docker/Dockerfile
--sarif-file-output=docker.sarif
- name: Upload result to GitHub Code Scanning
if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ./
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security


## [2.3.0]
### Added
- [issue/126](https://github.com/podaac/l2ss-py/issues/126): Added flexibility to variable subsetting
for variables to not have leading slash in the front
- [issue/136](https://github.com/podaac/l2ss-py/issues/136): Added type annotations throughout the package code
### Changed
### Deprecated
### Removed
### Fixed
- PODAAC-5065: integration with SMAP_RSS_L2_SSS_V5, fix way xarray open granules that have `seconds since 2000-1-1 0:0:0 0` as a time unit.
- [issue/127](https://github.com/podaac/l2ss-py/issues/127): Fixed bug when subsetting variables in grouped datasets. Variable names passed to `subset` will now have `/` replaced by `GROUP_DELIM` so they can be located in flattened datasets
### Security

## [2.2.0]
### Added
### Changed
Expand Down Expand Up @@ -40,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [issue/105](https://github.com/podaac/l2ss-py/issues/105): Added function to convert np object to python native objects.
### Security


## [2.0.0]
### Added
- [issue/98](https://github.com/podaac/l2ss-py/issues/98): Added logic to handle time decoding for he5 tai93 files. Changed the min and max inputs to tai93 format and compared to the time format in the file
Expand All @@ -51,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Breaking Change** [issue/99](https://github.com/podaac/l2ss-py/issues/99): Removed support for python 3.7
### Fixed
- [issue/95](https://github.com/podaac/l2ss-py/issues/95): Fix non variable subsets for OMI since variables are not in the same group as the lat lon variables

### Security


Expand Down
2 changes: 2 additions & 0 deletions cmr/ops_associations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ C2254232941-POCLOUD
C2251464384-POCLOUD
C2247621105-POCLOUD
C2152045877-POCLOUD
C1940471193-POCLOUD
C2205121315-POCLOUD
9 changes: 6 additions & 3 deletions podaac/subsetter/dimension_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
======================
Functions which improve upon existing netCDF4 library existing functions
"""

import collections
from typing import List, Tuple

import netCDF4 as nc
import xarray as xr


def remove_duplicate_dims(nc_dataset):
def remove_duplicate_dims(nc_dataset: nc.Dataset) -> Tuple[nc.Dataset, List[str]]:
"""
xarray cannot read netCDF4 datasets with duplicate dimensions.
Function goes through a dataset to catch any variables with duplicate dimensions.
Expand Down Expand Up @@ -67,7 +70,7 @@ def remove_duplicate_dims(nc_dataset):
return nc_dataset, dup_new_varnames


def rename_dup_vars(dataset, rename_vars):
def rename_dup_vars(dataset: xr.Dataset, rename_vars: List[str]) -> xr.Dataset:
"""
NetCDF4 rename function raises and HDF error for variable in S5P files with duplicate dimensions
This method will use xarray to rename the variables
Expand Down
Loading