Skip to content

Commit 4a72f79

Browse files
committed
issue/190: upgrade python version, gdal image, CMA, gh actions, etc.
1 parent 3ebc800 commit 4a72f79

19 files changed

Lines changed: 291 additions & 544 deletions

.github/workflows/bump-develop-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ jobs:
1212
if:
1313
${{ startsWith(github.ref, 'refs/heads/release/') }}
1414
steps:
15-
- uses: getsentry/action-github-app-token@v3
15+
- uses: getsentry/action-github-app-token@v4.0.0
1616
name: CICD Token
1717
id: cicd-app
1818
with:
1919
app_id: ${{ secrets.CICD_APP_ID }}
2020
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
2121
# Checks-out the develop branch
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v7
2323
with:
2424
ref: 'refs/heads/develop'
2525
repository: ${{ github.repository }}
2626
token: ${{ steps.cicd-app.outputs.token }}
2727
- name: Install Poetry
2828
uses: abatilo/actions-poetry@v3
2929
with:
30-
poetry-version: 1.8.2
30+
poetry-version: 2.1.3
3131
- name: Bump minor version
3232
run: |
3333
poetry version ${GITHUB_REF#refs/heads/release/}

.github/workflows/cicd-pipeline.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ on:
2727
- SIT
2828
- UAT
2929
env:
30-
POETRY_VERSION: "1.8.2"
31-
PYTHON_VERSION: "3.10"
30+
POETRY_VERSION: "2.1.3"
31+
PYTHON_VERSION: "3.12"
3232
TERRAFORM_VERSION: "1.14.0"
3333
REGISTRY: ghcr.io
3434
jobs:
@@ -44,17 +44,17 @@ jobs:
4444
pyproject_name: ${{ steps.poetry-build.outputs.pyproject_name }}
4545
tf_module_artifact_name: ${{ steps.poetry-build.outputs.tf_module_artifact_name }}
4646
steps:
47-
- uses: getsentry/action-github-app-token@v3
47+
- uses: getsentry/action-github-app-token@v4.0.0
4848
name: CICD Token
4949
id: cicd-app
5050
with:
5151
app_id: ${{ secrets.CICD_APP_ID }}
5252
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v7
5454
with:
5555
repository: ${{ github.repository }}
5656
token: ${{ steps.cicd-app.outputs.token }}
57-
- uses: actions/setup-python@v5
57+
- uses: actions/setup-python@v6
5858
with:
5959
python-version: ${{ env.PYTHON_VERSION }}
6060
- name: Install Poetry
@@ -65,7 +65,7 @@ jobs:
6565
run: |
6666
poetry config virtualenvs.create true --local
6767
poetry config virtualenvs.in-project true --local
68-
- uses: actions/cache@v4
68+
- uses: actions/cache@v6
6969
name: Define a cache for the virtual environment based on the dependencies lock file
7070
with:
7171
path: ./.venv
@@ -135,7 +135,7 @@ jobs:
135135
run: |
136136
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
137137
- name: Install micromamba
138-
uses: mamba-org/setup-micromamba@v2
138+
uses: mamba-org/setup-micromamba@v3
139139
with:
140140
environment-file: conda-environment.yaml
141141
- name: Install package
@@ -147,7 +147,7 @@ jobs:
147147
- name: Test and coverage
148148
run: |
149149
poetry run pytest --junitxml=build/reports/pytest.xml --cov=bignbit --cov-report=xml:build/reports/coverage.xml tests/
150-
- uses: hashicorp/setup-terraform@v3
150+
- uses: hashicorp/setup-terraform@v4
151151
with:
152152
terraform_version: ${{ env.TERRAFORM_VERSION }}
153153
terraform_wrapper: false
@@ -157,7 +157,7 @@ jobs:
157157
terraform init -backend=false -upgrade
158158
terraform validate -no-color
159159
- name: SonarCloud Scan
160-
uses: sonarsource/sonarqube-scan-action@v6
160+
uses: sonarsource/sonarqube-scan-action@v8.2.0
161161
env:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163163
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -179,7 +179,7 @@ jobs:
179179
echo "the_version=$(poetry version | awk '{print $2}')" >> $GITHUB_OUTPUT
180180
echo "pyproject_name=$(poetry version | awk '{print $1}')" >> $GITHUB_OUTPUT
181181
echo "tf_module_artifact_name=$(poetry version | awk '{print $1}')-${{ env.software_version }}-cumulus-tf" >> $GITHUB_OUTPUT
182-
- uses: actions/upload-artifact@v4
182+
- uses: actions/upload-artifact@v7
183183
with:
184184
name: ${{ steps.poetry-build.outputs.pyproject_name }}-dist
185185
path: dist/*
@@ -189,7 +189,7 @@ jobs:
189189
cp terraform/* build/${{ steps.poetry-build.outputs.tf_module_artifact_name }}/
190190
cd build
191191
zip ${{ steps.poetry-build.outputs.tf_module_artifact_name }}.zip ${{ steps.poetry-build.outputs.tf_module_artifact_name }}/* -r -j
192-
- uses: actions/upload-artifact@v4
192+
- uses: actions/upload-artifact@v7
193193
with:
194194
name: ${{ steps.poetry-build.outputs.tf_module_artifact_name }}
195195
path: build/${{ steps.poetry-build.outputs.tf_module_artifact_name }}.zip
@@ -238,26 +238,26 @@ jobs:
238238
THE_VERSION: ${{ needs.build.outputs.version }}
239239
PYPROJECT_NAME: ${{ needs.build.outputs.pyproject_name }}
240240
steps:
241-
- uses: actions/checkout@v4
241+
- uses: actions/checkout@v7
242242
with:
243243
repository: ${{ github.repository }}
244244
- name: Set up Docker Buildx
245-
uses: docker/setup-buildx-action@v3
245+
uses: docker/setup-buildx-action@v4
246246
- name: Log in to the Container registry
247-
uses: docker/login-action@v3
247+
uses: docker/login-action@v4
248248
with:
249249
registry: ${{ env.REGISTRY }}
250250
username: ${{ github.actor }}
251251
password: ${{ secrets.GITHUB_TOKEN }}
252252
- name: Extract metadata (tags, labels) for Docker
253253
id: meta
254-
uses: docker/metadata-action@v5
254+
uses: docker/metadata-action@v6
255255
with:
256256
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{env.PYPROJECT_NAME}}
257257
tags: |
258258
type=pep440,pattern={{version}},value=${{ env.THE_VERSION }}
259259
- name: Build and push Docker image
260-
uses: docker/build-push-action@v5
260+
uses: docker/build-push-action@v7
261261
with:
262262
context: .
263263
file: docker/Dockerfile
@@ -286,16 +286,16 @@ jobs:
286286
startsWith(github.ref, 'refs/heads/release') ||
287287
github.event_name == 'workflow_dispatch'
288288
steps:
289-
- uses: actions/checkout@v4
289+
- uses: actions/checkout@v7
290290
with:
291291
repository: ${{ github.repository }}
292-
- uses: hashicorp/setup-terraform@v3
292+
- uses: hashicorp/setup-terraform@v4
293293
with:
294294
terraform_version: ${{ env.TERRAFORM_VERSION }}
295295
terraform_wrapper: false
296296

297297
- name: Configure AWS credentials
298-
uses: aws-actions/configure-aws-credentials@v4
298+
uses: aws-actions/configure-aws-credentials@v6.1.0
299299
with:
300300
aws-region: us-west-2
301301
role-session-name: GitHubActions
@@ -310,7 +310,7 @@ jobs:
310310
terraform validate -no-color
311311
312312
- name: Log in to the Container registry
313-
uses: docker/login-action@v3
313+
uses: docker/login-action@v4
314314
with:
315315
registry: ${{ env.REGISTRY }}
316316
username: ${{ github.actor }}

.github/workflows/org-add-to-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Add to project
16-
uses: actions/add-to-project@v0.5.0
16+
uses: actions/add-to-project@v2
1717
with:
1818
project-url: https://github.com/orgs/podaac/projects/75
1919
github-token: ${{ secrets.PROJECTS_PAT }}
2020

2121
- name: Set status to needs:triage
22-
uses: actions/github-script@v7
22+
uses: actions/github-script@v9
2323
with:
2424
github-token: ${{ secrets.PROJECTS_PAT }}
2525
script: |

.github/workflows/org-close-pr-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Set status to closed
14-
uses: actions/github-script@v7
14+
uses: actions/github-script@v9
1515
with:
1616
github-token: ${{ secrets.PROJECTS_PAT }}
1717
script: |

.github/workflows/org-team-assignment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Process team label
15-
uses: actions/github-script@v7
15+
uses: actions/github-script@v9
1616
with:
1717
github-token: ${{ secrets.PROJECTS_PAT }}
1818
script: |

.pylintrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ persistent=yes
3838

3939
# When enabled, pylint would attempt to guess common misconfiguration and emit
4040
# user-friendly hints instead of false-positive error messages.
41-
suggestion-mode=yes
41+
#suggestion-mode=yes
4242

4343
# Allow loading of arbitrary C extensions. Extensions are imported into the
4444
# active Python interpreter and may run arbitrary code.
@@ -458,7 +458,10 @@ valid-metaclass-classmethod-first-arg=cls
458458
[DESIGN]
459459

460460
# Maximum number of arguments for function / method.
461-
max-args=5
461+
max-args=12
462+
463+
# Maximum number of positional arguments (see R0917).
464+
max-positional-arguments = 12
462465

463466
# Maximum number of attributes for a class (see R0902).
464467
max-attributes=10

bignbit/apply_opera_hls_treatment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def the_opera_hls_treatment(source_image_filepath: pathlib.Path, working_dirpath
177177
List[pathlib.Path]
178178
Absolute paths to each transformed output tif file
179179
"""
180+
gdal.UseExceptions()
180181
try:
181182
# Need to strip off the leading 'T' from the actual grid code in order to look it up in the json data
182183
# this is done using a slice on the string mgrs_grid_code[1:]
@@ -292,7 +293,7 @@ def lambda_handler(event, context):
292293
}
293294

294295
logging_level = os.environ.get('LOGGING_LEVEL', 'info')
295-
CUMULUS_LOGGER.logger.level = levels.get(logging_level, 'info')
296+
CUMULUS_LOGGER.logger.setLevel(levels.get(logging_level, 'info'))
296297
CUMULUS_LOGGER.setMetadata(event, context)
297298

298299
return CMA.cumulus_handler(event, context=context)

bignbit/get_collection_concept_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def lambda_handler(event, context):
104104
}
105105

106106
logging_level = os.environ.get('LOGGING_LEVEL', 'info')
107-
CUMULUS_LOGGER.logger.level = levels.get(logging_level, 'info')
107+
CUMULUS_LOGGER.logger.setLevel(levels.get(logging_level, 'info'))
108108
CUMULUS_LOGGER.setMetadata(event, context)
109109

110110
return CMA.cumulus_handler(event, context=context)

bignbit/get_dataset_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def lambda_handler(event, context):
104104
}
105105

106106
logging_level = os.environ.get('LOGGING_LEVEL', 'info')
107-
CUMULUS_LOGGER.logger.level = levels.get(logging_level, 'info')
107+
CUMULUS_LOGGER.logger.setLevel(levels.get(logging_level, 'info'))
108108
CUMULUS_LOGGER.setMetadata(event, context)
109109

110110
return CMA.cumulus_handler(event, context=context)

bignbit/get_granule_umm_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def lambda_handler(event, context):
6565
}
6666

6767
logging_level = os.environ.get('LOGGING_LEVEL', 'info')
68-
CUMULUS_LOGGER.logger.level = levels.get(logging_level, 'info')
68+
CUMULUS_LOGGER.logger.setLevel(levels.get(logging_level, 'info'))
6969
CUMULUS_LOGGER.setMetadata(event, context)
7070

7171
return CMA.cumulus_handler(event, context=context)

0 commit comments

Comments
 (0)