Skip to content

Commit

Permalink
Use openapi metadata in ladingpage metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy-1000 committed Dec 9, 2024
1 parent 281d6c7 commit aadaee4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions api/metadata_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
from utilities import seconds_to_iso_8601_duration
from utilities import convert_cm_to_m

from openapi.openapi_metadata import openapi_metadata


logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

Expand Down Expand Up @@ -58,9 +61,8 @@ def datetime_to_iso_string(value: datetime) -> str:

def get_landing_page(request):
return LandingPageModel(
title="EDR Observations API Europe EUMETNET",
description="OGC EDR API data service for European environmental observations from EUMETNET,"
" co-funded by the European Union.",
title=openapi_metadata["title"],
description=openapi_metadata["description"],
keywords=[
"weather",
"temperature",
Expand All @@ -70,8 +72,11 @@ def get_landing_page(request):
"clouds",
"radiation",
],
provider=Provider(name="RODEO", url="https://rodeo-project.eu/"),
contact=Contact(email="[email protected]"),
provider=Provider(
name=openapi_metadata["contact"]["name"],
url=openapi_metadata["contact"]["url"],
),
contact=Contact(email=openapi_metadata["contact"]["email"]),
links=[
Link(
href=f"{request.url}",
Expand Down

1 comment on commit aadaee4

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Unit Test Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
datastore_pb2.py614821%34–81
datastore_pb2_grpc.py542750%15–16, 19, 65–80, 121–123, 128–130, 135–137, 142–144, 148–173, 219, 246, 273, 300
export_metrics.py100100% 
grpc_getter.py201145%15–19, 23–26, 30–32, 36–38
locustfile.py15150%1–31
main.py45784%51, 56, 66, 76–77, 87–88
metadata_endpoints.py693254%50–59, 63, 115, 130–257, 261
response_classes.py50100% 
utilities.py1803978%21, 39, 46, 68–71, 79–90, 95–102, 122, 126, 128, 156, 162, 180, 238–244, 248–250, 280, 284, 306, 311
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   __init__.py110100% 
   covjson.py60198%91
   geojson.py21290%27, 52
openapi
   custom_dimension_examples.py40100% 
   edr_query_parameter_descriptions.py110100% 
   openapi_examples.py130100% 
   openapi_metadata.py10100% 
routers
   __init__.py00100% 
   edr.py101496%348–349, 438–439
   feature.py471960%99–132, 148–153, 159–181
TOTAL73420572% 

Title Coverage Tests Skipped Failures Errors Time
API Unit Tests Coverage 40 0 💤 0 ❌ 0 🔥 2.017s ⏱️
Ingest Unit Tests Coverage 16 0 💤 0 ❌ 0 🔥 11.694s ⏱️

Please sign in to comment.