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

Bug in version up on pip and conda #107

Closed
BenKaehler opened this issue Aug 16, 2021 · 5 comments
Closed

Bug in version up on pip and conda #107

BenKaehler opened this issue Aug 16, 2021 · 5 comments

Comments

@BenKaehler
Copy link
Contributor

There seems to be a bug in the redbiom that is available on pip or conda (conda-forge). An example follows. If I clone the repo and pip install it, it works. I note that the versions are the same (0.3.5), so I'm note sure what's gone wrong.

This is all in the context of the current qiime2 installation.

Thanks!

$ redbiom search metadata "where empo_3 == 'Plant surface'"
Traceback (most recent call last):
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/bin/redbiom", line 10, in <module>
    sys.exit(cli())
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/redbiom/commands/search.py", line 120, in search_metadata
    for i in redbiom.search.metadata_full(query, categories):
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/redbiom/search.py", line 60, in metadata_full
    obs = set(redbiom.where_expr.whereeval(q, get=get).index)
  File "/home/ben/miniconda3/envs/qiime2-update-clawback/lib/python3.8/site-packages/redbiom/where_expr.py", line 178, in whereeval
    result = eval(ast.dump(formed))
  File "<string>", line 1, in <module>
NameError: name 'Constant' is not defined
@wasade
Copy link
Member

wasade commented Aug 16, 2021

I believe this was observed and fixed in #94, could you verify?

@BenKaehler
Copy link
Contributor Author

Thanks @wasade, it looks like the same bug, but the only fix I can see in #94 is limiting the Python version, which is a pain if you want to use the latest QIIME 2 release.

The fix that I found (and I've confirmed it works for the same queries they were having trouble with in #94) is to pip-install redbiom from source, for some reason. That works with Python 3.8.8.

I tried to rebuild the conda package to see if that might help but I ran out of time after the n-th broken conda build.

@wasade
Copy link
Member

wasade commented Aug 18, 2021

Good point, I didn't catch that Q2 moved to py38. Doesn't #97 solve this (granted we need to unpin CI)? It sounds like the path of least resistance is a rebuild of the conda package?

@BenKaehler
Copy link
Contributor Author

Thanks, I didn't notice #97. I would guess that #97 is why it works when I install from source, so hopefully a conda rebuild will fix it. I will try again when I get a chance. We should increment the third version number as well.

@wasade
Copy link
Member

wasade commented Aug 18, 2021 via email

@wasade wasade closed this as completed in 0970894 Oct 1, 2021
wasade added a commit to wasade/redbiom that referenced this issue Oct 21, 2021
antgonza added a commit that referenced this issue Oct 21, 2021
* TST: bulk get index test

* Batch index requests

* A little cleanup on debug items

* Additional comments

* sty

* Update redbiom/admin.py

Co-authored-by: Antonio Gonzalez <[email protected]>

* BUG: fixes #108, thanks @cotillau!

* VER: actually bump it, partially resolves #107, thanks @BenKaehler

* tentative py3738 support

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* update actions

* BUG: fixes #93

* BUG: fixes #92

* remove unhelpful print

* Bump version

* Force json (#113)

* TST: sample id content type bug

* MAINT: fix issue where samples with .raw as a suffix were triggering unexpected returns

* Don't suffix twice

* Adjsut to account for force of json

* Address @antgonza's comments

* use the right variable name

* Verify data appear count

* Verify data appear count

Co-authored-by: Antonio Gonzalez <[email protected]>
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

No branches or pull requests

2 participants