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

Feature/issue 216 #219

Merged
merged 9 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Install Poetry
uses: abatilo/[email protected]
with:
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
-Dsonar.projectVersion=${{ env.software_version }}
-Dsonar.python.version=3.8,3.9,3.10
- name: Run Snyk as a blocking step
uses: snyk/actions/python-3.8@master
uses: snyk/actions/python-3.10@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
Expand All @@ -135,7 +135,7 @@ jobs:
--severity-threshold=high
--fail-on=all
- name: Run Snyk on Python
uses: snyk/actions/python-3.8@master
uses: snyk/actions/python-3.10@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
- name: Build Python Artifact
run: |
poetry build
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: python-artifact
path: dist/*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
${{ startsWith(github.ref, 'refs/heads/release/') }}
steps:
# Checks-out the develop branch
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: 'refs/heads/develop'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'
- name: Install Poetry
uses: abatilo/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
### Changed
- [pull/216](https://github.com/podaac/l2ss-py/pull/216): Updated all python to `python3.10-slim` and update all depencency versions
### Deprecated
### Removed
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion cmr/cmr.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# such information to foreign countries or providing access to foreign
# persons.

FROM python:3.8-slim
FROM python:3.10-slim

## Create a new user
RUN adduser --quiet --disabled-password --shell /bin/sh --home /home/dockeruser --gecos "" --uid 300 dockeruser
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# such information to foreign countries or providing access to foreign
# persons.

FROM python:3.9-slim
FROM python:3.10-slim

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
Expand Down
4 changes: 3 additions & 1 deletion podaac/subsetter/group_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,16 @@ def _rename_variables(dataset: xr.Dataset, base_dataset: nc.Dataset, start_date,
elif variable.dtype in ['|S1', '|S2']:
var_group.createVariable(new_var_name, variable.dtype, var_dims, fill_value=fill_value)
else:
if np.issubdtype(variable.dtype, np.unicode_):
comp_args["zlib"] = False
var_group.createVariable(new_var_name, variable.dtype, var_dims, fill_value=fill_value, **comp_args)

# Copy attributes
var_group.variables[new_var_name].setncatts(var_attrs)

# Copy data
var_group.variables[new_var_name].set_auto_maskandscale(False)
if variable.dtype in ['|S1', '|S2', '|S27']:
if variable.dtype in ['|S1', '|S2', '|S27'] or np.issubdtype(variable.dtype, np.unicode_):
var_group.variables[new_var_name][:] = variable.values
else:
var_group.variables[new_var_name][:] = var_data
Expand Down
2 changes: 1 addition & 1 deletion podaac/subsetter/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def translate_coordinates(coords):
return translate_point(geometry) if isinstance(geometry, Point) else translate_polygon(geometry)
elif isinstance(geometry, MultiPolygon):
# Translate each polygon in the MultiPolygon
translated_polygons = [translate_longitude(subgeometry) for subgeometry in geometry]
translated_polygons = [translate_longitude(subgeometry) for subgeometry in geometry.geoms]
return MultiPolygon(translated_polygons)
else:
# Handle other geometry types as needed
Expand Down
Loading
Loading