Hi,

More immediate fix is attached but I guess there is a more elegant
way by changing the code in _ids_to_keep_from_taxonomy() function.

Please note I only ran pytest against q2_taxa/tests/test_methods.py
because q2-types are uninstallable ATM and the testing ops are a pain
after pandas added some breaks that heavy impact on qiime's plugin
dependency chain.
Reference link are below.

Thanks again for considering.

Kind Regards


[1] https://github.com/pandas-dev/pandas/issues/42825
[2] https://github.com/pandas-dev/pandas/pull/45052


On Sat, 17 Feb 2024 17:56:37 +0100 Andreas Tille <andr...@an3as.eu> wrote:
> Control: tags -1 help
>
> Am Sat, Feb 17, 2024 at 06:35:41AM +0100 schrieb s3v:
> > Attached patch makes autopkg tests pass in unstable on a basis of
> > your work/references and [1] (iteritems() was deprecated since version
> > 1.5.0 in favor of items()).
>
> Cool. This is uploaded (but not yet in incoming due to some routing
> issue in Debian infrastructure.)
>
> > Please note that autopkg test fail with python 3.12 as default because
> > qiime2, I guess. (log attached).
>
> Thanks for the additional hint - I've forwarded the issue upstream.
>
> > Thanks for all your work!
>
> ... which is possible thanks to the help of kind people like you.
>
>
> The next problem is with q2-taxa, which throws some errors
>
> "Passing a set as an indexer is not supported. Use a list instead."
> E TypeError: Passing a set as an indexer is not supported. Use a list instead.
>
> Again I had some vague feeling what to do but failed finding an actual
> patch after poking around a bit.
>
> Any further help would be really great
> Andreas.
>
> --
> http://fam-tille.de
>
>
--- a/q2_taxa/_method.py
+++ b/q2_taxa/_method.py
@@ -79,7 +79,7 @@
             # becomes an issue, this is a target for refactoring.
             ids_to_keep -= set(taxonomy.get_ids(where=query))
 
-    return ids_to_keep
+    return list(ids_to_keep)
 
 
 def filter_table(table: pd.DataFrame, taxonomy: qiime2.Metadata,

Reply via email to