Skip to content

Commit

Permalink
Fixing native deps (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiewior authored Dec 18, 2024
1 parent 3777457 commit 90f202d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars_bio"
version = "0.2.10"
version = "0.2.11"
edition = "2021"

[lib]
Expand Down
1 change: 0 additions & 1 deletion polars_bio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging

from .polars_bio import FilterOp
from .range_op import ctx, nearest, overlap

logging.basicConfig()
Expand Down
2 changes: 1 addition & 1 deletion polars_bio/range_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
3 changes: 2 additions & 1 deletion polars_bio/range_op_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion polars_bio/range_op_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bioframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions tests/test_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
)

import polars_bio as pb
from polars_bio.polars_bio import FilterOp


class TestOverlapNative:
result_csv = pb.overlap(
DF_OVER_PATH1,
DF_OVER_PATH2,
output_type="pandas.DataFrame",
overlap_filter=pb.FilterOp.Weak,
overlap_filter=FilterOp.Weak,
)

def test_overlap_count(self):
Expand All @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
)

import polars_bio as pb
from polars_bio.polars_bio import FilterOp


class TestOverlapPandas:
result = pb.overlap(
PD_OVERLAP_DF1,
PD_OVERLAP_DF2,
output_type="pandas.DataFrame",
overlap_filter=pb.FilterOp.Weak,
overlap_filter=FilterOp.Weak,
)

def test_overlap_count(self):
Expand All @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions tests/test_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 90f202d

Please sign in to comment.