Skip to content

Commit

Permalink
Add new grpc object calling
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy-1000 committed Feb 20, 2024
1 parent d183037 commit 4423691
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
import datastore_pb2 as dstore
from fastapi import HTTPException
from google.protobuf.timestamp_pb2 import Timestamp
from grpc_getter import getTSAGRequest
from grpc_getter import gRPCRequest
from pydantic import AwareDatetime
from pydantic import TypeAdapter


grpc_request = gRPCRequest()


def get_datetime_range(datetime_string: str | None) -> Tuple[Timestamp, Timestamp] | None:
if not datetime_string:
return None
Expand Down Expand Up @@ -63,7 +66,7 @@ async def get_current_parameter_names(ttl_hash=None):
async def async_helper(ttl_hash):
del ttl_hash # make linter think we used this value
unique_parameter_names = dstore.GetTSAGRequest(attrs=["parameter_name"])
unique_parameter_names = await getTSAGRequest(unique_parameter_names)
unique_parameter_names = await grpc_request.getTSAGRequest(unique_parameter_names)

return set([i.combo.standard_name for i in unique_parameter_names.groups])

Expand Down

1 comment on commit 4423691

@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.py431956%85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
dependencies.py503628%18–55, 65–73, 81–88
grpc_getter.py13469%22–23, 26–27
locustfile.py15150%1–31
main.py22386%27, 37, 47
metadata_endpoints.py19479%17, 34–67, 71
formatters
   \_\_init\_\_.py70100% 
   covjson.py462741%26–76, 82–91
routers
   \_\_init\_\_.py00100% 
   edr.py684041%41–63, 80–92, 107–122, 137–162
   records.py00100% 
TOTAL34119443% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
1 0 💤 0 ❌ 1 🔥 1.705s ⏱️

Please sign in to comment.