Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix posix path conversion on Windows in DatasetStatsHook #1843

Merged
merged 9 commits into from
Apr 8, 2024
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Please follow the established format:
- Increase Kedro-Viz timeout. (#1803)
- Remove demo data source and update feature hints. (#1804)
- Add markdown support for backticks in the pop-up reminder. (#1826)
- Fix posix path conversion on Windows in DatasetStatsHook. (#1843)

# Release 8.0.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def aggregate_company_data(typed_companies: pd.DataFrame) -> pd.DataFrame:

working_companies = typed_companies.groupby(["id"]).agg(
{
"company_rating": np.mean,
"company_rating": "mean",
"company_location": lambda x: list(set(x))[0], # Take first item
"total_fleet_count": max,
"total_fleet_count": "max",
"iata_approved": any,
}
)
Expand Down
3 changes: 2 additions & 1 deletion package/kedro_viz/integrations/kedro/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import json
import logging
from collections import defaultdict
from pathlib import Path
from typing import Any, Union

from kedro.framework.hooks import hook_impl
Expand Down Expand Up @@ -134,7 +135,7 @@ def get_file_size(self, dataset: Any) -> Union[int, None]:
return None

try:
file_path = get_filepath_str(dataset._filepath, dataset._protocol)
file_path = get_filepath_str(Path(dataset._filepath), dataset._protocol)
return dataset._fs.size(file_path)

except Exception as exc:
Expand Down
Loading