Skip to content

Commit 24dc59f

Browse files
authored
Merge pull request #1480 from RS-PYTHON/feat-324/stac-view-of-prip-products
Feat 324/stac view of prip products
2 parents 7dc2e23 + cbba989 commit 24dc59f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9254
-225
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ updates:
2727
directories:
2828
- "/"
2929
- "/services/adgs"
30+
- "/services/prip"
3031
- "/services/cadip"
3132
- "/services/catalog"
3233
- "/services/common"

.github/workflows/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Regenerate lock files
3434
run: |
35-
for dir in services/adgs services/cadip services/catalog services/frontend services/staging; do
35+
for dir in services/adgs services/prip services/cadip services/catalog services/frontend services/staging; do
3636
cd $dir
3737
poetry lock
3838
cd -

.github/workflows/publish-binaries.yml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,23 @@ jobs:
145145
with:
146146
package_directory: services/adgs
147147

148+
services-prip-whl:
149+
if: github.actor != 'dependabot[bot]'
150+
runs-on: ubuntu-latest
151+
name: "'services/prip' wheel"
152+
outputs:
153+
version_name: ${{ steps.build-wheel.outputs.version_name }}
154+
package_name: ${{ steps.build-wheel.outputs.package_name }}
155+
continue-on-error: false
156+
steps:
157+
- uses: actions/checkout@v5
158+
with:
159+
fetch-depth: 0 # so that Dunamai produce the correct version
160+
- id: build-wheel
161+
uses: ./.github/actions/build-wheel
162+
with:
163+
package_directory: services/prip
164+
148165
services-cadip-whl:
149166
if: github.actor != 'dependabot[bot]'
150167
runs-on: ubuntu-latest
@@ -230,7 +247,7 @@ jobs:
230247
if: github.actor != 'dependabot[bot]'
231248
runs-on: ubuntu-latest
232249
name: "Publish wheels and sdists"
233-
needs: [services-common-whl, services-adgs-whl, services-cadip-whl, services-staging-whl, services-catalog-whl, services-frontend-whl]
250+
needs: [services-common-whl, services-adgs-whl, services-prip-whl, services-cadip-whl, services-staging-whl, services-catalog-whl, services-frontend-whl]
234251
permissions:
235252
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
236253
steps:
@@ -298,6 +315,53 @@ jobs:
298315
branch_name: ${{ needs.set-env.outputs.branch_name }}
299316
debug_mode: ${{ needs.set-env.outputs.debug_mode }}
300317

318+
services-prip-img:
319+
if: github.actor != 'dependabot[bot]'
320+
runs-on: ubuntu-latest
321+
name: "'services/prip' Docker image"
322+
needs: [set-env, services-common-whl, services-prip-whl]
323+
permissions: write-all
324+
outputs:
325+
docker_image: ${{ steps.publish-docker.outputs.docker_image}}
326+
steps:
327+
- uses: actions/checkout@v5
328+
329+
# Download .whl files into a local dir
330+
- name: Download .whl dependencies
331+
uses: actions/download-artifact@v5
332+
with:
333+
name: ${{ needs.services-common-whl.outputs.package_name }}
334+
path: ./build_context_path
335+
336+
- name: Download .whl dependencies
337+
uses: actions/download-artifact@v5
338+
with:
339+
name: ${{ needs.services-prip-whl.outputs.package_name }}
340+
path: ./build_context_path
341+
342+
- name: Copy layer-cleanup.sh script
343+
run: cp -t ./build_context_path ./.github/scripts/layer-cleanup.sh
344+
shell: bash
345+
346+
- name: Copy debug mode dependencies
347+
if: ${{ needs.set-env.outputs.debug_mode }} == true
348+
run: cp -t ./build_context_path ./.github/scripts/git_debug_image.sh
349+
shell: bash
350+
351+
- id: publish-docker
352+
uses: ./.github/actions/publish-docker
353+
with:
354+
dockerfile: ./services/prip/.github/Dockerfile
355+
build_context_path: ./build_context_path
356+
image_suffix: -prip
357+
version_name: ${{ needs.services-prip-whl.outputs.version_name }}
358+
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
359+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
360+
github_token: ${{ secrets.GITHUB_TOKEN }}
361+
docker_tag: ${{ needs.set-env.outputs.docker_tag }}
362+
branch_name: ${{ needs.set-env.outputs.branch_name }}
363+
debug_mode: ${{ needs.set-env.outputs.debug_mode }}
364+
301365
services-cadip-img:
302366
if: github.actor != 'dependabot[bot]'
303367
runs-on: ubuntu-latest
@@ -536,7 +600,7 @@ jobs:
536600
if: github.actor != 'dependabot[bot]'
537601
runs-on: ubuntu-latest
538602
name: "Test rs-demo"
539-
needs: [set-env, services-adgs-img, services-cadip-img, services-catalog-img, services-frontend-img]
603+
needs: [set-env, services-adgs-img, services-prip-img, services-cadip-img, services-catalog-img, services-frontend-img]
540604
steps:
541605
- name: Log into Docker registry
542606
uses: docker/login-action@v3

poetry.lock

Lines changed: 85 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ packages = [
6464
[tool.poetry.dependencies]
6565
python = "^3.11"
6666
rs-server-adgs = {path = "services/adgs", develop = true}
67+
rs-server-prip = {path = "services/prip", develop = true}
6768
rs-server-cadip = {path = "services/cadip", develop = true}
6869
rs-server-catalog = {path = "services/catalog", develop = true}
6970
rs-server-common = {path = "services/common", develop = true}

resources/sync_config_files.py

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def update(self, station: str):
6363
elif any(station == s for s in ("lta",)):
6464
self.lta = True
6565
self.value = station
66-
elif any(station == s for s in ("s1a", "s2a")):
66+
elif any(station == s for s in ("s1a", "s2b")):
6767
self.prip = True
6868
self.value = station
6969

@@ -669,6 +669,9 @@ def update_single_value(input_value: Any, output_value: str) -> str:
669669
"services/cadip/config/cadip_ws_config.template.yaml",
670670
"services/cadip/config/cadip_ws_config.template_session.yaml",
671671
],
672+
["services/prip/config/prip_search_config.template.yaml"],
673+
["services/prip/config/prip_ws_config_token_module.template.yaml"],
674+
["services/prip/config/prip_ws_config.template.yaml"],
672675
):
673676
create_from_template(templates)
674677

@@ -677,8 +680,10 @@ def update_single_value(input_value: Any, output_value: str) -> str:
677680
"services/common/config/rs-server.yaml",
678681
"services/adgs/config/adgs_ws_config.yaml",
679682
"services/cadip/config/cadip_ws_config.yaml",
683+
"services/prip/config/prip_ws_config.yaml",
680684
"services/adgs/config/adgs_ws_config_token_module.yaml",
681685
"services/cadip/config/cadip_ws_config_token_module.yaml",
686+
"services/prip/config/prip_ws_config_token_module.yaml",
682687
):
683688
copy_to_demo(config_path_relative)
684689

@@ -701,7 +706,6 @@ def remove_session_stations(output_config: dict):
701706
remove_session_stations,
702707
)
703708
copy_to_helm_or_infra([station_params], rs_helm_dir / "charts/rs-server-station-secrets/values.yaml")
704-
copy_to_helm_or_infra([station_params], rs_deploy_dir / "apps/01-rs-server-station-secrets/values.yaml")
705709

706710
copy_to_helm_or_infra(
707711
[
@@ -792,3 +796,37 @@ def remove_session_stations(output_config: dict):
792796
],
793797
rs_helm_dir / "charts/rs-server-cadip/templates/configmap.yaml",
794798
)
799+
800+
copy_to_helm_or_infra(
801+
[
802+
HelmOrInfraParams(
803+
"services/prip/config/prip_ws_config.yaml",
804+
["s1a"], # use the first input station values for all other stations
805+
[ # where to write in the output file
806+
"data",
807+
f"{DCB_OPEN} .Values.app.eodagConfigFile {DCB_CLOSE}",
808+
f"{DCB_OPEN}- range $k, $v := .Values.app.station {DCB_CLOSE}",
809+
f"{DCB_OPEN} $k {DCB_CLOSE}",
810+
],
811+
0, # output doc index
812+
),
813+
HelmOrInfraParams(
814+
"services/prip/config/prip_ws_config_token_module.yaml",
815+
["s1a"], # use the first input station values for all other stations
816+
[ # where to write in the output file
817+
"data",
818+
f"{DCB_OPEN} .Values.app.eodagConfigFileTokenModule {DCB_CLOSE}",
819+
f"{DCB_OPEN}- range $k, $v := .Values.app.station {DCB_CLOSE}",
820+
f"{DCB_OPEN} $k {DCB_CLOSE}",
821+
],
822+
1,
823+
),
824+
HelmOrInfraParams(
825+
"services/prip/config/prip_search_config.yaml",
826+
[],
827+
["data", f"{DCB_OPEN} .Values.app.pripSearchConfigFile {DCB_CLOSE}"],
828+
2,
829+
),
830+
],
831+
rs_helm_dir / "charts/rs-server-prip/templates/configmap.yaml",
832+
)

0 commit comments

Comments
 (0)