Skip to content
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

[python/c++] Connect libtiledbsoma to tiledbsoma readers for dataframes [WIP] #360

Closed
wants to merge 18 commits into from

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Oct 3, 2022

Status

  • Currently WIP
  • SOMADataFrame and SOMAIndexedDataFrame are on this PR
  • For reviewer mercy, SOMASparseNdArray and SOMADenseNdArray will be on a separate PR

PR context

This is the three in a group of three related PRs:

@johnkerl johnkerl changed the base branch from main to kerl/ascii October 3, 2022 04:38
@johnkerl johnkerl force-pushed the kerl/lib-sdf branch 3 times, most recently from f6bb262 to 07c55cf Compare October 3, 2022 04:48
@johnkerl johnkerl force-pushed the kerl/ascii branch 2 times, most recently from 973dc7d to 9215877 Compare October 4, 2022 14:16
@johnkerl johnkerl force-pushed the kerl/ascii branch 2 times, most recently from 0661600 to 681b743 Compare October 4, 2022 15:06
@johnkerl johnkerl force-pushed the kerl/ascii branch 2 times, most recently from c402bc0 to fa97b8b Compare October 4, 2022 15:20
@johnkerl johnkerl force-pushed the kerl/lib-sdf branch 2 times, most recently from 10d0d92 to cab89ba Compare October 4, 2022 15:21
@johnkerl johnkerl force-pushed the kerl/lib-sdf branch 2 times, most recently from 1e22705 to 2088997 Compare October 4, 2022 15:25
@johnkerl johnkerl force-pushed the kerl/lib-sdf branch 2 times, most recently from 2a60d1e to fc9fe5f Compare October 5, 2022 19:13
@johnkerl
Copy link
Member Author

The fail is here:

E           RuntimeError: TypeError: type of argument "node" must be a type; got ast.Compare instead

https://gist.github.com/johnkerl/f93ad47c4bfa29fbb929f4e2d3cd83f0

Now we are intentionally suppressing type-checking for apis/python/src/tiledbsoma/query_condition.py here:
https://github.com/single-cell-data/TileDB-SOMA/blob/main/apis/python/src/tiledbsoma/query_condition.py

However, typeguard seems to blithely bulldoze right past that, as evidenced by its surfacing type-check issues involving query_condition.py.

On the third hand, here
https://github.com/single-cell-data/TileDB-SOMA/blob/main/apis/python/tests/__init__.py#L4
I've tried this diff:

diff --git a/apis/python/tests/__init__.py b/apis/python/tests/__init__.py
index 5df0213..8817d3e 100644
--- a/apis/python/tests/__init__.py
+++ b/apis/python/tests/__init__.py
@@ -1,7 +1,16 @@
 import pyarrow as pa
-from typeguard.importhook import install_import_hook
+from typeguard.importhook import TypeguardFinder, install_import_hook

-install_import_hook("tiledbsoma")
+class CustomFinder(TypeguardFinder):
+    def should_instrument(self, module_name: str):
+        #print("\nSI >>", module_name, "<<\n")
+        if module_name == 'tiledbsoma.query_condition':
+            return False
+        if module_name == 'tiledb.query_condition':
+            return False
+        return True
+
+install_import_hook("tiledbsoma", cls=CustomFinder)

and verified that the query_condition modules are being ignored -- and still typeguard persists in its

E           RuntimeError: TypeError: type of argument "node" must be a type; got ast.Compare instead

😠

@johnkerl
Copy link
Member Author

typeguard issue resolved on this commit:
cfb14ae

@johnkerl
Copy link
Member Author

... behind that now-opened door lie more still-locked doors; upon them is written more typeguard

johnkerl added a commit that referenced this pull request Oct 12, 2022
@johnkerl
Copy link
Member Author

Closing in favor of #400

@johnkerl johnkerl closed this Oct 12, 2022
johnkerl added a commit that referenced this pull request Oct 12, 2022
johnkerl added a commit that referenced this pull request Oct 14, 2022
johnkerl added a commit that referenced this pull request Oct 14, 2022
johnkerl added a commit that referenced this pull request Oct 15, 2022
johnkerl added a commit that referenced this pull request Oct 17, 2022
johnkerl added a commit that referenced this pull request Oct 19, 2022
johnkerl added a commit that referenced this pull request Oct 20, 2022
johnkerl added a commit that referenced this pull request Oct 20, 2022
johnkerl added a commit that referenced this pull request Oct 20, 2022
@johnkerl johnkerl changed the title Connect libtiledbsoma to tiledbsoma readers for dataframes [WIP] [python/c++] Connect libtiledbsoma to tiledbsoma readers for dataframes [WIP] Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant