Skip to content

update the polars' version and fix warnings #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added gtfparse/.DS_Store
Binary file not shown.
7 changes: 4 additions & 3 deletions gtfparse/read_gtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import logging
from os.path import exists

import polars
import polars
from polars.exceptions import ShapeError # change import path

from .attribute_parsing import expand_attribute_strings
from .parsing_error import ParsingError
Expand Down Expand Up @@ -101,13 +102,13 @@ def parse_with_polars_lazy(
separator="\t",
comment_prefix="#",
null_values=".",
dtypes=DEFAULT_COLUMN_DTYPES)
schema_overrides=DEFAULT_COLUMN_DTYPES) # parameter renamed
try:
df = polars.read_csv(
filepath_or_buffer,
new_columns=REQUIRED_COLUMNS,
**kwargs).lazy()
except polars.ShapeError:
except ShapeError: #
raise ParsingError("Wrong number of columns")

df = df.with_columns([
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
polars>=0.20.2,<0.21.0
pyarrow>=14.0.2,<14.1.0
polars>=0.20.2,<=1.24.0
pyarrow>=14.0.2,<19.0.1
pandas>=2.1.0,<3.0.0
Binary file added tests/.DS_Store
Binary file not shown.