Skip to content

Commit

Permalink
Merge pull request #203 from d33bs/sqlite-read-performance
Browse files Browse the repository at this point in the history
SQLite Utils: clean_like_nulls and More!
  • Loading branch information
d33bs authored Jun 9, 2022
2 parents 02d0522 + 6e9eab4 commit 3a69511
Show file tree
Hide file tree
Showing 6 changed files with 995 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ master, develop ]

jobs:
build:
Expand Down
9 changes: 9 additions & 0 deletions pycytominer/cyto_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@
aggregate_fields_count,
aggregate_image_features,
)
from .sqlite import (
clean_like_nulls,
collect_columns,
contains_conflicting_aff_storage_class,
contains_str_like_null,
engine_from_str,
update_columns_to_nullable,
update_values_like_null_to_null,
)
3 changes: 2 additions & 1 deletion pycytominer/cyto_utils/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
extract_image_features,
aggregate_fields_count,
aggregate_image_features,
engine_from_str,
)

default_compartments = get_default_compartments()
Expand Down Expand Up @@ -148,7 +149,7 @@ def __init__(
self.set_subsample_n(self.subsample_n)

# Connect to sqlite engine
self.engine = create_engine(self.sql_file)
self.engine = engine_from_str(self.sql_file)
self.conn = self.engine.connect()

# Throw an error if both subsample_frac and subsample_n is set
Expand Down
Loading

0 comments on commit 3a69511

Please sign in to comment.