Skip to content

Commit ddd143e

Browse files
authored
feat(release)!: update colormaps, update default collection assets, update readme, fix pagination, add eoapi-auth-util keycloak (#476)
## Changed/Updated - #467 (Keycloak) - #470 ## Fixed - #466 - #468 - #469 - #472
2 parents 55bb64e + 089e0c1 commit ddd143e

File tree

18 files changed

+137
-169
lines changed

18 files changed

+137
-169
lines changed

.example.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ VEDA_CLIENT_ID=
3232
VEDA_CLIENT_SECRET=secret
3333
VEDA_DATA_ACCESS_ROLE_ARN=
3434
VEDA_COGNITO_DOMAIN=
35+
VEDA_OPENID_CONFIGURATION_URL=
36+
VEDA_KEYCLOAK_CLIENT_ID=
3537

3638
STAC_BROWSER_BUCKET=
3739
STAC_URL=

.github/actions/cdk-deploy/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ runs:
1717
using: "composite"
1818
steps:
1919

20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
- name: Set up Python
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2323
with:
2424
python-version: '3.11'
2525
cache: 'pip'
@@ -28,11 +28,11 @@ runs:
2828
${{ inputs.dir }}/setup.cfg
2929
3030
- name: Setup Node
31-
uses: actions/setup-node@v4
32-
with:
31+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e4 #v4.3.0
32+
with:
3333
node-version: 20
3434

35-
- uses: actions/cache@v4
35+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
3636
with:
3737
path: ~/.npm
3838
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
@@ -41,7 +41,7 @@ runs:
4141
shell: bash
4242
run: npm install -g aws-cdk@2
4343

44-
- uses: actions/cache@v4
44+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
4545
with:
4646
path: ${{ env.pythonLocation }}
4747
key: ${{ env.pythonLocation }}-${{ hashFiles('${{ inputs.dir }}/setup.py') }}

.github/workflows/cicd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jobs:
3434
needs: [define-environment]
3535
environment: ${{ needs.define-environment.outputs.env_name }}
3636
concurrency: ${{ needs.define-environment.outputs.env_name }}
37-
37+
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141
with:
4242
lfs: "true"
4343
submodules: "false"
4444

4545
- name: Configure AWS Credentials
46-
uses: aws-actions/configure-aws-credentials@v4
46+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4.1.0
4747
with:
4848
role-to-assume: ${{ secrets.DEPLOYMENT_ROLE_ARN }}
4949
role-session-name: "veda-backend-github-${{ needs.define-environment.outputs.env_name }}-deployment"

.github/workflows/pr.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1010
- name: Set up Python
11-
uses: actions/setup-python@v5
11+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
1212
with:
1313
python-version: '3.11'
1414

15-
- uses: actions/cache@v4
15+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
1616
with:
1717
path: ${{ env.pythonLocation }}
1818
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
@@ -28,16 +28,16 @@ jobs:
2828
lint-conventional-pr:
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v4
32-
- uses: amannn/action-semantic-pull-request@v5
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 #v5.5.3
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535

3636
test:
3737
needs: [lint, lint-conventional-pr]
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141

4242
- name: Launch services
4343
run: |
@@ -46,11 +46,11 @@ jobs:
4646
docker compose up --build -d
4747
4848
- name: Set up Python
49-
uses: actions/setup-python@v5
49+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5050
with:
5151
python-version: '3.11'
5252

53-
- uses: actions/cache@v4
53+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
5454
with:
5555
path: ${{ env.pythonLocation }}
5656
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
@@ -98,33 +98,33 @@ jobs:
9898
runs-on: ubuntu-latest
9999
steps:
100100

101-
- uses: actions/checkout@v4
101+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
102102
- name: Set up Python
103-
uses: actions/setup-python@v5
103+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
104104
with:
105105
python-version: '3.11'
106106

107107
- name: Setup Node
108-
uses: actions/setup-node@v4
108+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e4 #v4.3.0
109109
with:
110110
node-version: 20
111111

112112
- name: Configure awscli
113-
uses: aws-actions/configure-aws-credentials@v4
113+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4.1.0
114114
with:
115115
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
116116
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
117117
aws-region: us-west-2
118118

119-
- uses: actions/cache@v4
119+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
120120
with:
121121
path: ~/.npm
122122
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
123123

124124
- name: Install CDK
125125
run: npm install -g aws-cdk@2
126126

127-
- uses: actions/cache@v4
127+
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
128128
with:
129129
path: ${{ env.pythonLocation }}
130130
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
permissions:
1818
id-token: write
1919
contents: write
20-
20+
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
2424
fetch-depth: 0
2525
- name: Python Semantic Release
26-
uses: python-semantic-release/python-semantic-release@master
26+
uses: python-semantic-release/python-semantic-release@26bb37cfab71a5a372e3db0f48a6eac57519a4a6 #v9.21.0
2727
with:
2828
changelog: "false"
2929
github_token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,25 @@ These can be installed with [homebrew](https://brew.sh/) on MacOS
7979

8080
```bash
8181
brew install node
82-
brew install nvm
82+
brew install nvm # Make sure to add nvm to your path
8383
brew install jq
84+
nvm install 20 # .github/workflows/pr.yml uses node version 20
8485
```
8586

8687
#### Virtual environment example
8788

8889
```bash
90+
# `pipes` package required by the `fire` package deprecated in python >3.11
91+
pyenv install 3.11
92+
pyenv shell 3.11
8993
python3 -m venv .venv
9094
source .venv/bin/activate
9195
```
9296

9397
#### Install requirements
9498

9599
```bash
96-
nvm use --lts
100+
nvm use 20
97101
npm install --location=global aws-cdk
98102
python3 -m pip install --upgrade pip
99103
python3 -m pip install -e ".[dev,deploy,test]"

ingest_api/runtime/src/collection_publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def ingest(self, collection: DashboardCollection):
1515
and loads into the PgSTAC collection table
1616
"""
1717
creds = get_db_credentials(os.environ["DB_SECRET_ARN"])
18-
collection = [collection.to_dict()]
18+
collection = [collection.to_dict(exclude_unset=True)]
1919
with PgstacDB(dsn=creds.dsn_string, debug=True) as db:
2020
load_into_pgstac(
2121
db=db, ingestions=collection, table=IngestionType.collections

ingest_api/runtime/src/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class DashboardCollection(Collection):
6666
time_density: Optional[str] = Field(default=None, alias="dashboard:time_density")
6767
item_assets: Optional[Dict]
6868
links: Optional[List[LinkWithExtraFields]]
69-
assets: Optional[Dict]
69+
assets: Optional[Dict] = None
7070
extent: SpatioTemporalExtent
7171
model_config = ConfigDict(populate_by_name=True)
7272
# workaround for https://github.com/pydantic/pydantic/discussions/8211 and https://github.com/pydantic/pydantic/issues/7186 (changes expected on pydantic 3 roadmap)

local/Dockerfile.stac

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ RUN pip install --upgrade pip
1212
RUN pip install boto3
1313

1414
COPY stac_api/runtime /tmp/stac
15-
16-
COPY common/auth /tmp/stac/common/auth
17-
RUN pip install /tmp/stac/common/auth
1815
RUN pip install /tmp/stac
1916
RUN rm -rf /tmp/stac
2017

raster_api/runtime/src/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from src.algorithms import PostProcessParams
77
from src.alternate_reader import PgSTACReaderAlt
88
from src.config import ApiSettings
9-
from src.dependencies import ColorMapParams
9+
from src.dependencies import ColorMapParams, cmap
1010
from src.extensions import stacViewerExtension
1111
from src.monitoring import LoggerRouteHandler, logger, metrics, tracer
1212
from src.version import __version__ as veda_raster_version
@@ -205,7 +205,8 @@ async def lifespan(app: FastAPI):
205205
###############################################################################
206206
# Colormaps endpoints
207207
###############################################################################
208-
cmaps = ColorMapFactory()
208+
# Set supported colormaps to be the modified cmap list with added colormaps
209+
cmaps = ColorMapFactory(supported_colormaps=cmap)
209210
app.include_router(cmaps.router, tags=["ColorMaps"])
210211

211212

0 commit comments

Comments
 (0)