Skip to content

Commit

Permalink
Fix posix path conversion on Windows in DatasetStatsHook (#1843)
Browse files Browse the repository at this point in the history
* resolve posix path warning

Signed-off-by: ravi-kumar-pilla <[email protected]>

* debug draft

Signed-off-by: ravi-kumar-pilla <[email protected]>

* revert debugging

Signed-off-by: ravi-kumar-pilla <[email protected]>

* update release note

Signed-off-by: ravi-kumar-pilla <[email protected]>

---------

Signed-off-by: ravi-kumar-pilla <[email protected]>
  • Loading branch information
ravi-kumar-pilla authored Apr 8, 2024
1 parent 2b0a066 commit 2a6cff7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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

0 comments on commit 2a6cff7

Please sign in to comment.