Skip to content

Commit

Permalink
Merge branch 'rh/fix_polars_column_not_found_on_not_set' into 'master'
Browse files Browse the repository at this point in the history
Rh/fix polars column not found on not set

See merge request minknow/pod5-file-format!320
  • Loading branch information
HalfPhoton committed Dec 19, 2023
2 parents 3ffafa9 + 071ff9d commit a1b924b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ All notable changes, updates, and fixes to pod5 will be documented here
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.6]

## Fixed

- Polars `ColumnNotFoundError: not_set` introduced by `polars==0.20.0`

## [0.3.5]

## Fixed
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ sphinx-rtd-theme
sphinx==v5.3.0
myst-parser
# Paths are relative to project root for ReadTheDocs and docs/Makefile
pod5==0.3.5
pod5==0.3.6
2 changes: 1 addition & 1 deletion python/pod5/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers=[
]

dependencies = [
"lib_pod5 == 0.3.5",
"lib_pod5 == 0.3.6",
"iso8601",
'importlib-metadata; python_version<"3.8"',
"more_itertools",
Expand Down
2 changes: 1 addition & 1 deletion python/pod5/src/pod5/tools/polars_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def pl_format_read_id(read_id_col: pl.Expr) -> pl.Expr:

def pl_format_empty_string(expr: pl.Expr, subst: Optional[str]) -> pl.Expr:
"""Empty strings are read as a pair of double-quotes which need to be removed"""
return pl.when(expr.str.lengths() == 0).then(subst).otherwise(expr)
return pl.when(expr.str.lengths() == 0).then(pl.lit(subst)).otherwise(expr)

0 comments on commit a1b924b

Please sign in to comment.