Skip to content

Commit

Permalink
bump v0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gschoeni committed Mar 6, 2024
1 parent f990f68 commit 97ca3ad
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions oxen/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions oxen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxen"
version = "0.12.0"
version = "0.12.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -16,7 +16,7 @@ pyo3-log = "0.9.0"
tokio = { version = "1", features = ["full"] }
pyo3-polars = "0.10.0"
serde_json = "1.0.106"
liboxen = "0.12.0"
liboxen = "0.12.2"
# liboxen = { path = "../../Oxen/src/lib" }

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions oxen/python/oxen/df_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from oxen import df_utils
# load a data frame
data_frame = df_utils.load("path/to/data.csv")
df = df_utils.load("path/to/data.csv")
# save a data frame
df_utils.save(data_frame, "path/to/save.csv")
df_utils.save(df, "path/to/save.csv")
```
"""

Expand Down
14 changes: 7 additions & 7 deletions oxen/python/oxen/diff/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def get(self):
"""
Resolves the diff type and returns the appropriate diff object.
"""
match self._py_diff.format:
case "tabular":
return TabularDiff(self._py_diff.tabular)
case "text":
return TextDiff(self._py_diff.text)
case "unknown":
raise ValueError("The diff type is unknown.")
format = self._py_diff.format
if "tabular" == format:
return TabularDiff(self._py_diff.tabular)
elif "text" == format:
return TextDiff(self._py_diff.text)
else:
raise ValueError("The diff type is unknown.")
22 changes: 11 additions & 11 deletions oxen/python/oxen/diff/line_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ def modification(self) -> ChangeType:
"""
Returns the modification of the line diff.
"""
match self._diff.modification:
case PyChangeType.Added:
return ChangeType.ADDED
case PyChangeType.Removed:
return ChangeType.REMOVED
case PyChangeType.Modified:
return ChangeType.MODIFIED
case PyChangeType.Unchanged:
return ChangeType.UNCHANGED
case _:
raise ValueError(f"Invalid modification: {self._diff.modification}")
mod_type = self._diff.modification
if PyChangeType.Added == mod_type:
return ChangeType.ADDED
elif PyChangeType.Removed == mod_type:
return ChangeType.REMOVED
elif PyChangeType.Modified == mod_type:
return ChangeType.MODIFIED
elif PyChangeType.Unchanged == mod_type:
return ChangeType.UNCHANGED
else:
raise ValueError(f"Invalid modification: {mod_type}")

@property
def text(self) -> str:
Expand Down

0 comments on commit 97ca3ad

Please sign in to comment.