diff --git a/Cargo.toml b/Cargo.toml index 4a68f5f..37951f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polars_bio" -version = "0.2.10" +version = "0.2.11" edition = "2021" [lib] diff --git a/polars_bio/__init__.py b/polars_bio/__init__.py index 9ce0127..4dd35a7 100644 --- a/polars_bio/__init__.py +++ b/polars_bio/__init__.py @@ -1,6 +1,5 @@ import logging -from .polars_bio import FilterOp from .range_op import ctx, nearest, overlap logging.basicConfig() diff --git a/polars_bio/range_op.py b/polars_bio/range_op.py index 2edaf21..1676957 100644 --- a/polars_bio/range_op.py +++ b/polars_bio/range_op.py @@ -4,11 +4,11 @@ import polars as pl from typing_extensions import TYPE_CHECKING, Union -from .polars_bio import FilterOp, RangeOp, RangeOptions from .range_op_helpers import Context, _validate_overlap_input, range_operation if TYPE_CHECKING: pass +from polars_bio.polars_bio import FilterOp, RangeOp, RangeOptions DEFAULT_INTERVAL_COLUMNS = ["contig", "pos_start", "pos_end"] diff --git a/polars_bio/range_op_helpers.py b/polars_bio/range_op_helpers.py index 0ee970b..519206e 100644 --- a/polars_bio/range_op_helpers.py +++ b/polars_bio/range_op_helpers.py @@ -4,12 +4,13 @@ import pandas as pd import polars as pl -from .polars_bio import ( +from polars_bio.polars_bio import ( BioSessionContext, RangeOptions, range_operation_frame, range_operation_scan, ) + from .range_op_io import _df_to_arrow, _get_schema, _rename_columns, range_lazy_scan diff --git a/polars_bio/range_op_io.py b/polars_bio/range_op_io.py index b8dbaf5..5b5c035 100644 --- a/polars_bio/range_op_io.py +++ b/polars_bio/range_op_io.py @@ -8,7 +8,7 @@ import pyarrow.compute as pc from polars.io.plugins import register_io_source -from .polars_bio import ( +from polars_bio.polars_bio import ( BioSessionContext, RangeOptions, range_operation_frame, diff --git a/pyproject.toml b/pyproject.toml index 9d8da98..8378f16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "polars-bio" -version = "0.2.10" +version = "0.2.11" description = "Blazing fast genomic operations on large Python dataframes" authors = [] requires-python = ">=3.9" diff --git a/tests/test_bioframe.py b/tests/test_bioframe.py index f450cb4..752f97d 100644 --- a/tests/test_bioframe.py +++ b/tests/test_bioframe.py @@ -3,7 +3,7 @@ from _expected import BIO_PD_DF1, BIO_PD_DF2 import polars_bio as pb -from polars_bio import FilterOp +from polars_bio.polars_bio import FilterOp class TestOverlapBioframe: diff --git a/tests/test_native.py b/tests/test_native.py index 8ee02d2..82d20f5 100644 --- a/tests/test_native.py +++ b/tests/test_native.py @@ -9,6 +9,7 @@ ) import polars_bio as pb +from polars_bio.polars_bio import FilterOp class TestOverlapNative: @@ -16,7 +17,7 @@ class TestOverlapNative: DF_OVER_PATH1, DF_OVER_PATH2, output_type="pandas.DataFrame", - overlap_filter=pb.FilterOp.Weak, + overlap_filter=FilterOp.Weak, ) def test_overlap_count(self): @@ -35,7 +36,7 @@ class TestNearestNative: DF_NEAREST_PATH1, DF_NEAREST_PATH2, output_type="pandas.DataFrame", - overlap_filter=pb.FilterOp.Weak, + overlap_filter=FilterOp.Weak, ) def test_nearest_count(self): diff --git a/tests/test_pandas.py b/tests/test_pandas.py index 91655ae..71695a9 100644 --- a/tests/test_pandas.py +++ b/tests/test_pandas.py @@ -9,6 +9,7 @@ ) import polars_bio as pb +from polars_bio.polars_bio import FilterOp class TestOverlapPandas: @@ -16,7 +17,7 @@ class TestOverlapPandas: PD_OVERLAP_DF1, PD_OVERLAP_DF2, output_type="pandas.DataFrame", - overlap_filter=pb.FilterOp.Weak, + overlap_filter=FilterOp.Weak, ) def test_overlap_count(self): @@ -35,7 +36,7 @@ class TestNearestPandas: PD_NEAREST_DF1, PD_NEAREST_DF2, output_type="pandas.DataFrame", - overlap_filter=pb.FilterOp.Weak, + overlap_filter=FilterOp.Weak, ) def test_nearest_count(self): diff --git a/tests/test_polars.py b/tests/test_polars.py index 68edbe0..a559c4c 100644 --- a/tests/test_polars.py +++ b/tests/test_polars.py @@ -8,14 +8,15 @@ ) import polars_bio as pb +from polars_bio.polars_bio import FilterOp class TestOverlapPolars: result_frame = pb.overlap( - PL_DF1, PL_DF2, output_type="polars.DataFrame", overlap_filter=pb.FilterOp.Weak + PL_DF1, PL_DF2, output_type="polars.DataFrame", overlap_filter=FilterOp.Weak ) result_lazy = pb.overlap( - PL_DF1, PL_DF2, output_type="polars.LazyFrame", overlap_filter=pb.FilterOp.Weak + PL_DF1, PL_DF2, output_type="polars.LazyFrame", overlap_filter=FilterOp.Weak ).collect() expected = PL_DF_OVERLAP