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

Update Json Response #12

Merged
merged 7 commits into from
Apr 30, 2024
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
4 changes: 2 additions & 2 deletions dev_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dependencies:
- dask

# For catalog access
- intake
- intake-xarray
- intake=0.7.0
- intake-xarray=0.7.0
- pystac

# For API access and data formats
Expand Down
4 changes: 1 addition & 3 deletions src/catalog_to_xpublish/routers/stac_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def get_catalog_as_yaml(self) -> PlainTextResponse:
def get_catalog_as_json(self) -> JSONResponse:
"""Returns the catalog as JSON."""
return JSONResponse(
content=json.dumps(
self.catalog_endpoint_obj.catalog_obj.to_dict(),
),
content=self.catalog_endpoint_obj.catalog_obj.to_dict(),
media_type='application/json',
status_code=200,
)
Expand Down
26 changes: 7 additions & 19 deletions test_catalogs/intake_zarr_catalog_osn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,36 @@ sources:

nwis-streamflow-usgs-gages-osn:
driver: zarr
description: "subset of NWIS streamflow - OSN pod storage, 275 MB, 40 years of daily data, CONUS extent point data, 1 real variable (streamflow)"
description: "Streamflow from NWIS, extracted and rechunked into time series (NWM2.1 time period)"
args:
urlpath: 's3://rsignellbucket2/hytest/nwm/nwis_chanobs.zarr'
urlpath: 's3://hytest/tutorials/evaluation/nwm/nwis_chanobs.zarr'
consolidated: true
storage_options:
anon: true
requester_pays: false
client_kwargs:
endpoint_url: https://renc.osn.xsede.org

red-river-subset-osn:
driver: zarr
description: "Sample subset - OSN pod storage, 470M, Very High-Resolution Dynamic Downscaling of Regional Climate for Use in Long-term Hydrologic Planning along the Red River Valley System"
args:
urlpath: 's3://rsignellbucket2/nhgf/sample_data/red_river_2020.zarr'
consolidated: true
storage_options:
anon: true
requester_pays: false
client_kwargs:
endpoint_url: https://renc.osn.xsede.org
endpoint_url: https://usgs.osn.mghpcc.org

alaska-et-2020-subset-osn:
driver: zarr
description: "Sample subset - OSN pod storage, 863M, Gridded 20km Daily Reference Evapotranspiration for the State of Alaska from 1979 to 2017/CCSM4 historical simulation"
args:
urlpath: 's3://rsignellbucket2/nhgf/sample_data/ccsm4.zarr'
urlpath: 's3://mdmf/gdp/alaska_et_2020_ccsm4_historical_simulation.zarr'
consolidated: true
storage_options:
anon: true
requester_pays: false
client_kwargs:
endpoint_url: https://renc.osn.xsede.org
endpoint_url: https://usgs.osn.mghpcc.org

prism-v2-osn:
driver: zarr
description: "USGS THREDDS Holdings/Parameter-elevation Regressions on Independent Slopes Model Monthly Climate Data for the Continental United States"
args:
urlpath: 's3://rsignellbucket2/nhgf/sample_data/prism_v2.zarr'
urlpath: 's3://mdmf/gdp/PRISM_v2.zarr'
consolidated: true
storage_options:
anon: true
requester_pays: false
client_kwargs:
endpoint_url: https://renc.osn.xsede.org
endpoint_url: https://usgs.osn.mghpcc.org
15 changes: 3 additions & 12 deletions test_catalogs/intake_zarr_catalog_s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,16 @@ sources:
driver: zarr
description: "Sample subset - s3 storage, 863M, Gridded 20km Daily Reference Evapotranspiration for the State of Alaska from 1979 to 2017/CCSM4 historical simulation"
args:
urlpath: 's3://nhgf-development/workspace/testing/sample-zarr/ccsm4.zarr'
urlpath: 's3://nhgf-development/workspace/DataConversion/alaska_et_2020_ccsm4_historical_simulation.zarr'
consolidated: true
storage_options:
requester_pays: true

red-river-subset-s3:
driver: zarr
description: "Sample subset - s3 storage, 470M, Very High-Resolution Dynamic Downscaling of Regional Climate for Use in Long-term Hydrologic Planning along the Red River Valley System"
args:
urlpath: 's3://nhgf-development/workspace/testing/sample-zarr/red_river_2020.zarr'
consolidated: true
storage_options:
requester_pays: true

conus404-hourly-s3:
conus404-daily-s3:
driver: zarr
description: "CONUS404 - s3 storage, 70 TB, 40 years of hourly data, CONUS extent with 4 km gridded spatial resolution, 157 variables"
args:
urlpath: 's3://nhgf-development/conus404/conus404_hourly_202209.zarr'
urlpath: 's3://nhgf-development/conus404/conus404_daily_202210.zarr'
consolidated: true
storage_options:
requester_pays: true
Expand Down
Loading
Loading