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 changes #178

Merged
merged 108 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
464edfc
Not yet working...
moradology Jan 4, 2023
7ec766d
Working collection search function
moradology Jan 4, 2023
e2d93f3
Add to stac-fastapi implementation to enable collection-search
moradology Jan 5, 2023
1c3f3db
Lint
moradology Jan 5, 2023
129d606
Split collection search from dashboard functions
moradology Jan 9, 2023
a62f295
Rename function to make it clear that only IDs are returned
moradology Jan 9, 2023
8bd00df
Avoid returning feature collection
moradology Jan 9, 2023
642fd82
Use pgstac schema to make stac-fastapi integration simpler
moradology Jan 10, 2023
17ff0a0
Add models to improve API docs
moradology Jan 10, 2023
6183146
Assuage mypy with some weird edge cases
moradology Jan 10, 2023
b84008d
Handle null values for datetimes in collections
moradology Jan 11, 2023
cf8b7e3
Update pydantic validations for collection id search
moradology Jan 11, 2023
219e890
Lint
moradology Jan 17, 2023
80a482b
Fix comments for new endpoint methods
moradology Jan 17, 2023
fd84616
Search for collections via items
moradology Jan 18, 2023
7a17de3
Use updated function name
moradology Jan 18, 2023
80ff31f
Fix mangum db connection pool
ividito Jan 13, 2023
5307460
lint
ividito Jan 18, 2023
0433813
Use new key for collection id on records
moradology Jan 30, 2023
5e8787c
Merge pull request #140 from NASA-IMPACT/feature/coll-search
moradology Feb 7, 2023
78fa3d0
Update deploying_to_existing_environments.md
anayeaye Feb 17, 2023
8d88312
Merge pull request #153 from NASA-IMPACT/fix-docs-link
anayeaye Feb 22, 2023
13c7c5a
support optional use of AWS_REQUEST_PAYER variable in raster-api lamb…
anayeaye Mar 9, 2023
733bf04
lint
anayeaye Mar 9, 2023
ce053de
upgrade python 3.8 to 3.9
anayeaye Mar 9, 2023
595ca2d
update test env setup
anayeaye Mar 9, 2023
3932b35
try update python version github runner
anayeaye Mar 9, 2023
fe7bcf1
try use-pep517 and rollback python version in runner
anayeaye Mar 9, 2023
246417c
try use-pep517
anayeaye Mar 9, 2023
90faf89
try use-pep517
anayeaye Mar 9, 2023
8b0bc97
try backwards compatible pypgstac 0.7.1
anayeaye Mar 9, 2023
2136e1b
try backwards compatible pypgstac 0.7.1
anayeaye Mar 9, 2023
a5467a6
try backwards compatible pypgstac 0.7.1
anayeaye Mar 9, 2023
d3b2d8c
isort upgrade in pre-commit
anayeaye Mar 9, 2023
d3c2493
update pgstac version for testing
vincentsarago Mar 10, 2023
a2239dc
remove pghost
vincentsarago Mar 10, 2023
0c2e266
gives a bit more time to stac
vincentsarago Mar 10, 2023
0851790
possible fix
vincentsarago Mar 10, 2023
560d374
update plpygis
vincentsarago Mar 13, 2023
1d688ed
wait more
vincentsarago Mar 13, 2023
5324ccd
use public.ecr.aws/sam/build-python3.9:latest
anayeaye Mar 13, 2023
beddb6d
port some fixes from requester pays pr to test github actions in py 3.9
anayeaye Mar 13, 2023
0e8bed5
typo in pre commit config
anayeaye Mar 13, 2023
1f9c054
use previous fastapi version
vincentsarago Mar 14, 2023
26ead17
Merge pull request #159 from NASA-IMPACT/feature/raster-aws-request-p…
anayeaye Mar 15, 2023
6a8b37f
catch up to develop
anayeaye Mar 15, 2023
ad039b7
use correct python 3.9 image in stac api dockerfile
anayeaye Mar 15, 2023
fde75b4
Merge pull request #160 from NASA-IMPACT/feature/python-3_9
anayeaye Mar 28, 2023
2f7f167
update python version in lambda constructs
anayeaye Mar 29, 2023
2ebcee5
Merge pull request #167 from NASA-IMPACT/fix/python_3_9
anayeaye Mar 29, 2023
f42264e
Point README to veda-docs (#171)
jsignell Apr 20, 2023
1cff316
Upgrade titiler and titiler-pgstac
ividito Jan 25, 2023
a6a6c14
Fix br/gzip header test
ividito Jan 30, 2023
5619e86
Remove factory (it's included in new titiler-pgstac version)
ividito Mar 28, 2023
3646036
Remove pin on cramjam
ividito Mar 28, 2023
1988752
Load test data in container (actions not updated)
ividito Mar 28, 2023
47d22ac
fix actions tests
ividito Mar 28, 2023
02800f1
adjust container strategy
ividito Mar 28, 2023
91b50a9
actions connections fix
ividito Mar 29, 2023
d93c9ed
remove -it flag (it broke actions)
ividito Mar 29, 2023
12380b2
re-enable lint, propagate test changes to other actions
ividito Mar 29, 2023
7e111c1
docker-compose -> docker compose
ividito Mar 30, 2023
36c34ee
Fix template import
ividito Apr 18, 2023
55c305a
include private subnet config
smohiudd Apr 25, 2023
6299c4f
fix subnet type
smohiudd Apr 25, 2023
04cf6e8
format changes
smohiudd Apr 26, 2023
b0ad279
pub accessible default true
smohiudd Apr 28, 2023
db842fa
remove publicly accessible variable
smohiudd May 2, 2023
8186576
Merge pull request #173 from NASA-IMPACT/rds-private-subnet
smohiudd May 2, 2023
3d69ff8
Add sql connection and execution abstraction
moradology May 15, 2023
2dd4b2d
Add sql logic to fix projection extension types
moradology May 15, 2023
0353c93
add script to delete null stac_extensions
moradology May 16, 2023
864118b
Lint and move sql command scripts to support_scripts dir
moradology May 16, 2023
d5fb29a
Use pythonic naming conventions
moradology May 17, 2023
74ad08a
pgstac readme change
smohiudd May 17, 2023
25312b7
Merge pull request #180 from NASA-IMPACT/pgstac-upgrade
smohiudd May 22, 2023
9d208cb
pin to urllib3<2
smohiudd May 23, 2023
be246ee
pin urllib3 in test
smohiudd May 23, 2023
29f9d8c
format
smohiudd May 23, 2023
93cb4d8
revert
smohiudd May 23, 2023
01cdd3c
pin httpx
smohiudd May 23, 2023
ebc5161
revert
smohiudd May 23, 2023
6dbf0b3
docker compose pgstac version
smohiudd May 23, 2023
d595aed
pre-deploy action fix
ividito May 23, 2023
3fd852f
Merge pull request #182 from NASA-IMPACT/urllib3-fix
smohiudd May 23, 2023
33d61f3
RDS Proxy initial implementation
ividito May 22, 2023
dd07c26
proxy secret + urlllib fix
ividito May 23, 2023
c407045
use pgstac 0.7.4
smohiudd May 23, 2023
298ba11
Merge pull request #183 from NASA-IMPACT/urllib3-fix
smohiudd May 24, 2023
656ba1c
Merge pull request #175 from NASA-IMPACT/feature/sql-scripts
moradology Jun 1, 2023
5d74fed
use titiler custom JSONResponse to handle NaN values
vincentsarago Jun 12, 2023
01a7814
Merge pull request #188 from NASA-IMPACT/fixJSONresponseForValidate
anayeaye Jun 12, 2023
8bd4670
change db search path
smohiudd Jun 27, 2023
f7cc17c
Merge pull request #190 from NASA-IMPACT/fix/db-search-path
smohiudd Jun 27, 2023
6db8330
hacky fix
Jul 10, 2023
f816599
try exporting os env vars
Jul 10, 2023
a90a483
export os env vars
Jul 10, 2023
c4cebb8
lint
anayeaye Jul 10, 2023
42d3dd8
comment
anayeaye Jul 10, 2023
f2cae04
move to APISettings check
Jul 11, 2023
41aa5a6
black changes
Jul 11, 2023
2fae434
Merge pull request #194 from NASA-IMPACT/issue-192
ranchodeluxe Jul 11, 2023
c141705
hide route
anayeaye Jul 13, 2023
a2a6142
Merge pull request #196 from NASA-IMPACT/feature/hide-endpoint
anayeaye Jul 13, 2023
5ffb1b2
Pin pydantic for now
ividito Jul 14, 2023
37ee00a
put raster assume role config in lambda construct
anayeaye Jul 17, 2023
933ff7c
pass lambda env variable bool as string
anayeaye Jul 17, 2023
22bb657
Merge pull request #200 from NASA-IMPACT/fix/put-exp-session-variable…
anayeaye Jul 17, 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
5 changes: 4 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ VEDA_DOMAIN_ALT_HOSTED_ZONE_ID=[OPTIONAL SECOND HOSTED ZONE]
VEDA_DOMAIN_ALT_HOSTED_ZONE_NAME=[OPTIONAL SECOND DOMAIN]

VEDA_RASTER_ENABLE_MOSAIC_SEARCH=TRUE
VEDA_RASTER_DATA_ACCESS_ROLE_ARN=[OPTIONAL ARN OF IAM ROLE TO BE ASSUMED BY RASTER API]
VEDA_RASTER_DATA_ACCESS_ROLE_ARN=[OPTIONAL ARN OF IAM ROLE TO BE ASSUMED BY RASTER API]
VEDA_RASTER_EXPORT_ASSUME_ROLE_CREDS_AS_ENVS=False

VEDA_DB_PUBLICLY_ACCESSIBLE=TRUE
19 changes: 9 additions & 10 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
Expand All @@ -36,8 +36,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
Expand All @@ -47,24 +47,23 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev,deploy,test]

- name: Launch services
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker-compose up --build -d stac raster
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker compose up --build -d

- name: Ingest Stac Items/Collection
run: |
pypgstac pgready --dsn postgresql://username:[email protected]:5432/postgis
pypgstac load collections .github/workflows/data/noaa-emergency-response.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
pypgstac load items .github/workflows/data/noaa-eri-nashville2020.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
./scripts/load-data-container.sh

- name: Sleep for 10 seconds
run: sleep 10s
shell: bash

- name: Integrations tests
run: python -m pytest .github/workflows/tests/ -vv -s

- name: Stop services
run: docker-compose stop
run: docker compose stop

deploy:
needs: [test]
Expand All @@ -76,7 +75,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Setup Node
uses: actions/setup-node@v1
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
Expand All @@ -36,8 +36,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
Expand All @@ -47,24 +47,23 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev,deploy,test]

- name: Launch services
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker-compose up --build -d stac raster
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker compose up --build -d

- name: Ingest Stac Items/Collection
run: |
pypgstac pgready --dsn postgresql://username:[email protected]:5432/postgis
pypgstac load collections .github/workflows/data/noaa-emergency-response.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
pypgstac load items .github/workflows/data/noaa-eri-nashville2020.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
./scripts/load-data-container.sh

- name: Sleep for 10 seconds
run: sleep 10s
shell: bash

- name: Integrations tests
run: python -m pytest .github/workflows/tests/ -vv -s

- name: Stop services
run: docker-compose stop
run: docker compose stop

deploy:
needs: [test]
Expand All @@ -76,7 +75,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Setup Node
uses: actions/setup-node@v1
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
Expand All @@ -24,7 +24,7 @@ jobs:

- name: Run pre-commit
run: pre-commit run --all-files

test:
needs: [lint]
runs-on: ubuntu-latest
Expand All @@ -33,8 +33,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
Expand All @@ -44,41 +44,41 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev,deploy,test]

- name: Launch services
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker-compose up --build -d stac raster
run: AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} docker compose up --build -d

- name: Ingest Stac Items/Collection
run: |
pypgstac pgready --dsn postgresql://username:[email protected]:5432/postgis
pypgstac load collections .github/workflows/data/noaa-emergency-response.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
pypgstac load items .github/workflows/data/noaa-eri-nashville2020.json --dsn postgresql://username:[email protected]:5432/postgis --method insert
./scripts/load-data-container.sh

- name: Sleep for 10 seconds
run: sleep 10s
shell: bash

- name: Integrations tests
run: python -m pytest .github/workflows/tests/ -vv -s

- name: Stop services
run: docker-compose stop
predeploy:
run: docker compose stop

predeploy:
needs: [test]

runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Setup Node
uses: actions/setup-node@v1
with:
with:
node-version: 17

- name: Configure awscli
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -90,24 +90,24 @@ jobs:
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

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

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev,deploy,test]
python -m pip install -e .[dev,deploy,test]

- name: Get dev environment configuration for develop branch
run: ./scripts/get-env.sh "veda-backend-uah-dev-env"

- name: Pre deployment CDK diff
- name: Pre deployment CDK diff
run: |
echo $STAGE
cdk diff veda-backend-uah-dev
cdk diff veda-backend-uah-dev
2 changes: 1 addition & 1 deletion .github/workflows/tests/test_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_raster_api():
)
assert resp.status_code == 200
assert resp.headers["content-type"] == "application/json"
assert resp.headers["content-encoding"] == "br"
assert resp.headers["content-encoding"] in ["br", "gzip"]


def test_mosaic_api():
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
language_version: python

- repo: https://github.com/PyCQA/isort
rev: 5.4.2
rev: 5.12.0
hooks:
- id: isort
language_version: python
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To retrieve the variables for a stage that has been previously deployed, the sec
| --- | --- |
| `APP_NAME` | Optional app name used to name stack and resources, defaults to `veda-backend` |
| `STAGE` | **REQUIRED** Deployment stage used to name stack and resources, i.e. `dev`, `staging`, `prod` |
| `VEDA_DB_PGSTAC_VERSION` | **REQUIRED** version of PgStac database, i.e. 0.5 |
| `VEDA_DB_PGSTAC_VERSION` | **REQUIRED** version of PgStac database, i.e. 0.7.6 |
| `VEDA_DB_SCHEMA_VERSION` | **REQUIRED** The version of the custom veda-backend schema, i.e. 0.1.1 |
| `VEDA_DB_SNAPSHOT_ID` | **Once used always REQUIRED** Optional RDS snapshot identifier to initialize RDS from a snapshot |
> **Note** See [Advanced Configuration](docs/advanced_configuration.md) for details about custom configuration options.
Expand Down Expand Up @@ -114,11 +114,11 @@ Support scripts are provided for manual system operations.
| [**veda-ui**](https://github.com/NASA-IMPACT/veda-ui) | Dashboard UI for viewing and analysing VEDA assets |
| [**veda-stac-ingestor**](https://github.com/NASA-IMPACT/veda-stac-ingestor) | Entry-point for users/services to add new records to database |
| [**veda-data-pipelines**](https://github.com/NASA-IMPACT/veda-data-pipelines) | Cloud optimize data assets and submit records for publication to veda-stac-ingestor |
| [**veda-documentation**](https://github.com/NASA-IMPACT/veda-documentation) | Documentation repository for end users of VEDA ecosystem data and tools |
| [**veda-docs**](https://github.com/NASA-IMPACT/veda-docs) | Documentation repository for end users of VEDA ecosystem data and tools |

## VEDA usage examples

### [VEDA documentation](https://nasa-impact.github.io/veda-documentation/)
### [VEDA documentation](https://nasa-impact.github.io/veda-docs)

### [VEDA dashboard](https://www.earthdata.nasa.gov/dashboard)

Expand All @@ -128,4 +128,4 @@ Support scripts are provided for manual system operations.
Radiant Earth's [stac-browser](https://github.com/radiantearth/stac-browser) is a browser for STAC catalogs. The demo version of this browser [radiantearth.github.io/stac-browser](https://radiantearth.github.io/stac-browser/#/) can be used to browse the contents of the veda-backend STAC catalog, paste the veda-backend stac-api URL deployed by this project in the demo and click load. Read more about the recent developments and usage of stac-browser [here](https://medium.com/radiant-earth-insights/the-exciting-future-of-the-stac-browser-2351143aa24b).

# License
This project is licensed under **Apache 2**, see the [LICENSE](LICENSE) file for more details.
This project is licensed under **Apache 2**, see the [LICENSE](LICENSE) file for more details.
1 change: 0 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:

# TODO this conditional supports deploying a second set of APIs to a separate custom domain and should be removed if no longer necessary
if veda_app_settings.alt_domain():

alt_domain = DomainConstruct(
veda_stack,
"alt-domain",
Expand Down
10 changes: 6 additions & 4 deletions database/infrastructure/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ class vedaDBSettings(BaseSettings):
"**Once used always REQUIRED**"
),
)
private_subnets: Optional[bool] = Field(
False,
description="Boolean deploy database to private subnets",
publicly_accessible: Optional[bool] = Field(
True, description="Boolean if the RDS should be publicly accessible"
)

# RDS custom postgres parameters
max_locks_per_transaction: Optional[str] = Field(
"1024",
Expand All @@ -55,6 +53,10 @@ class vedaDBSettings(BaseSettings):
description="maximum number of temporary buffers used by each session",
regex=r"^[1-9]\d*$",
)
use_rds_proxy: Optional[bool] = Field(
False,
description="Boolean if the RDS should be accessed through a proxy",
)

class Config:
"""model config."""
Expand Down
Loading