Skip to content

Commit

Permalink
Better parameter filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Nov 21, 2024
1 parent b8970f7 commit 3a625ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/test_cf_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def test_cf_metadata_query(cf_client):
], "Spatial bbox is incorrect"
assert data["extent"]["spatial"]["crs"] == "EPSG:4326", "Spatial CRS is incorrect"

assert "air" in data["parameter_names"], "Air parameter should be present"
assert "lat" not in data["parameter_names"], "lat should not be present"
assert "lon" not in data["parameter_names"], "lon should not be present"


def test_cf_metadata_query_temp_smoke_test(cf_client):
response = cf_client.get("/datasets/temp/edr/")
Expand Down
2 changes: 1 addition & 1 deletion xpublish_edr/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def get_collection_metadata(dataset: xr.Dataset = Depends(deps.dataset)):

parameters = {
k: variable_description(v)
for k, v in dataset.variables.items()
for k, v in projected_ds.variables.items()
if "axis" not in v.attrs
}

Expand Down

0 comments on commit 3a625ea

Please sign in to comment.