Skip to content

Commit

Permalink
Merge pull request #96 from EURODEO/coveragecollection-parameters
Browse files Browse the repository at this point in the history
Fix CoverageCollection parameters
  • Loading branch information
lukas-phaf authored Mar 26, 2024
2 parents aaecdcf + 00d82da commit 34f88fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/formatters/covjson.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import math
import operator
from collections import namedtuple
from datetime import timezone
from functools import reduce
from itertools import groupby

from covjson_pydantic.coverage import Coverage
Expand Down Expand Up @@ -88,9 +90,8 @@ def convert_to_covjson(response):
elif len(coverages) == 1:
return coverages[0]
else:
return CoverageCollection(
coverages=coverages, parameters=coverages[0].parameters
) # HACK to take parameters from first one
parameter_union = reduce(operator.ior, (c.parameters for c in coverages), {})
return CoverageCollection(coverages=coverages, parameters=dict(sorted(parameter_union.items())))


def _collect_data(ts_mdata, obs_mdata):
Expand Down

1 comment on commit 34f88fd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%24–69
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
grpc_getter.py201145%15–16, 20–23, 27–29, 33–35
locustfile.py15150%1–31
main.py34585%41, 51–52, 62–63
metadata_endpoints.py552555%42–51, 55, 72–151, 155
utilities.py683154%33, 40, 62–65, 73–80, 85–92, 104–123
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   \_\_init\_\_.py110100% 
   covjson.py53198%75
   geojson.py15193%42
routers
   \_\_init\_\_.py00100% 
   edr.py972673%59–134, 214–215, 259–260
   feature.py451958%70–103, 113–118, 124–146
TOTAL52020361% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
17 0 💤 0 ❌ 0 🔥 1.796s ⏱️

Please sign in to comment.