Skip to content

Commit

Permalink
Remove sort parameter from repair functions and update version to 0.9…
Browse files Browse the repository at this point in the history
….3.9
  • Loading branch information
legout committed Dec 9, 2024
1 parent fd42684 commit ba6cce3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
7 changes: 2 additions & 5 deletions pydala/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ def _repair_file_schemas(
ts_unit (str | None, optional): The timestamp unit to use for repairing the files. Defaults to None.
use_large_string (bool, optional): Whether to use large string type for repairing the files.
Defaults to False.
sort (bool | list[str], optional): Whether to sort the files before repairing. If a list of strings is
provided, it specifies the order in which the files should be repaired. Defaults to False.
alter_schema (bool, optional): Whether to alter the schema of the files. Defaults to True.
**kwargs: Additional keyword arguments to pass to the repair_schema function.
Expand Down Expand Up @@ -499,7 +497,7 @@ def update(
tz: str | None = None,
use_large_string: bool = False,
format_version: str | None = None,
sort: bool | list[str] = False,
# sort: bool | list[str] = False,
**kwargs,
) -> None:
"""
Expand All @@ -512,7 +510,6 @@ def update(
tz (str | None): The time zone of the data source.
use_large_string (bool): Flag to indicate whether to use large string type.
format_version (str | None): The version of the data format.
sort (bool | list[str]): Flag to indicate if sorting is required, or the list of columns to sort by.
**kwargs: Additional keyword arguments.
Returns:
Expand All @@ -534,7 +531,7 @@ def update(
tz=tz,
ts_unit=ts_unit,
use_large_string=use_large_string,
sort=sort,
# sort=sort,
)

# update metadata file
Expand Down
6 changes: 1 addition & 5 deletions pydala/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,7 @@ def repair_schema(
ts_unit (str|None): timestamp unit.
tz (str|None): timezone for timestamp fields. Defaults to "UTC".
use_large_string (bool): Convert pyarrow.large_string() to pyarrow.string().
Defaults to False.
sort (bool | list[str]): Use this, to define the field(column) order. If it is
True, the fields are sorted alphanumerically, if it is False, the field
order of firt schema is used. Otherwise, the order if the given field names is
applied.
**kwargs: Additional keyword arguments for pyarrow.parquet.write_table.
"""
if files is None:
if file_schemas is not None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name = "pydala2"
readme = "README.md"
#repository = "https://github.com/legout/pydala2"
requires-python = ">= 3.10"
version = "0.9.3.8"
version = "0.9.3.9"

[project.optional-dependencies]
legacy = ["polars-lts-cpu>=0.20.4"]
Expand Down

0 comments on commit ba6cce3

Please sign in to comment.