Skip to content

Commit

Permalink
Fix data.py tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-phaf committed Jun 7, 2024
1 parent 0312764 commit bc72318
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_variables():


def get_variable(var_id: str) -> Variable | None:
vars = list(filter(lambda x: x.id == var_id, get_variables()))[0]
vars = list(filter(lambda x: x.id == var_id, get_variables()))
return vars[0] if len(vars) == 1 else None


Expand Down Expand Up @@ -124,10 +124,12 @@ def get_temporal_extent():
print(get_variables())

print(get_station("06260"))
print(get_station("06209"))
print(get_variable("ff"))
print(get_data("06260", "ff"))

print(get_temporal_extent())

print(len(get_variables_for_station("06260")))
print(len(get_variables_for_station("06229")))
print(len(get_variables_for_station("06209")))
print(list(map(lambda x: x.id, get_variables_for_station("06209"))))

0 comments on commit bc72318

Please sign in to comment.