Skip to content

Commit

Permalink
apply precommit changes to ndbc
Browse files Browse the repository at this point in the history
  • Loading branch information
abdu558 committed Jul 29, 2024
1 parent 79a89f6 commit 1b5b517
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/ndbc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ The data from a specific station can be retrieved with the ``fetch_ndbc_station`
.. autofunction:: searvey._ndbc_api.fetch_ndbc_station

Use the internal method _fetch_ndbc if you want to data from multiple stations
.. autofunction:: searvey._ndbc_api._fetch_ndbc
.. autofunction:: searvey._ndbc_api._fetch_ndbc
2 changes: 1 addition & 1 deletion searvey/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"get_ndbc_stations",
"Provider",
"__version__",
]
]
8 changes: 6 additions & 2 deletions searvey/_ndbc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def _fetch_ndbc(
executor=multithreading_executor,
)

dataframes = {result.kwargs["station_id"]: pd.DataFrame(result.result) for result in results if result.kwargs is not None}
dataframes = {
result.kwargs["station_id"]: pd.DataFrame(result.result)
for result in results
if result.kwargs is not None
}
return dataframes


Expand Down Expand Up @@ -175,4 +179,4 @@ def fetch_ndbc_station(

except Exception as e:
logger.error(f"Error fetching data for station {station_id}: {str(e)}")
return pd.DataFrame()
return pd.DataFrame()
2 changes: 1 addition & 1 deletion tests/ndbc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ def test_fetch_ndbc_data_multiple_unavaliable_avaliable_data():
]
)
assert df.index[0] == pd.to_datetime("2023-01-01 10:00:00")
assert df.index[-1] == pd.to_datetime("2023-01-10 00:00:00")
assert df.index[-1] == pd.to_datetime("2023-01-10 00:00:00")

0 comments on commit 1b5b517

Please sign in to comment.