-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- upgrade to tiledbsoma 0.5.0a6 - Unicode now supported in soma.DataFrame columns. - Removed unicode workaround, which forced all unicode values to ASCII. - Added explicit test to ensure continued support of unicode. - Fix AxisQuery import, now that class is exported by tiledbsoma - replace `somacore` imports with `soma` in notebooks
- Loading branch information
1 parent
4d8b955
commit 060a875
Showing
15 changed files
with
49 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# General unit tests for cell_census_builder. Intention is to add more fine-grained tests for builder. | ||
import os | ||
from tempfile import mkstemp, TemporaryDirectory | ||
|
||
import pandas as pd | ||
import pyarrow as pa | ||
import tiledbsoma as soma | ||
|
||
|
||
def test_unicode_support() -> None: | ||
""" | ||
Regression test that unicode is supported correctly in tiledbsoma. | ||
This test is not strictly necessary, but it validates the requirements that Cell Census | ||
support unicode in DataFrame columns. | ||
""" | ||
with TemporaryDirectory() as d: | ||
pd_df = pd.DataFrame(data={'value': ["Ünicode", "S̈upport"]}, columns=['value']) | ||
pd_df['soma_joinid'] = pd_df.index | ||
s_df = soma.DataFrame(uri=os.path.join(d, "unicode_support")).\ | ||
create(pa.Schema.from_pandas(pd_df, preserve_index=False), index_column_names=['soma_joinid']) | ||
s_df.write(pa.Table.from_pandas(pd_df, preserve_index=False)) | ||
|
||
pd_df_in = soma.DataFrame(uri=os.path.join(d, "unicode_support")).read().concat().to_pandas() | ||
|
||
assert pd_df_in['value'].to_list() == ["Ünicode", "S̈upport"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ isort | |
flake8-bugbear | ||
mypy==0.982 | ||
numpy | ||
pytest | ||
types-requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters