qiime2 / provenance-lib

QIIME 2 Provenance Replay Tools
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

q2_citation.bib for found in /conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/ #103

Closed cherman2 closed 2 years ago

cherman2 commented 2 years ago

Bug Description: I installed a clean QIIME2 2022.2 Dev and pip install . in my provenance_lib directory and then tried to run:

replay citations --i-in-fp ~/chloe-analysis/Tomatoes/its/githubdata/ --o-out-fp ~/chloe-analysis/Tomatoes/its/its-replay.bib

and got this error:

Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/alpha-rarefaction-its.qzv Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/unweighted_unifrac_distance_matrix(2).qza Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/observed_features_vector(2).qza Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/weighted_unifrac_distance_matrix(1).qza Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/shannon_vector(2).qza Parsing /home/crh423/chloe-analysis/Tomatoes/its/githubdata/jaccard_distance_matrix(1).qza Traceback (most recent call last): File "/scratch/crh423/conda/envs/qiime2-2022.2/bin/replay", line 8, in sys.exit(replay()) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/click_commands.py", line 120, in citations write_citations(dag, out_fp=o_out_fp, deduplicate=p_deduplicate, File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/replay.py", line 668, in write_citations bib_db = collect_citations(dag, deduplicate=deduplicate) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/replay.py", line 566, in collect_citations cits = dedupe_citations(cits) File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/replay.py", line 630, in dedupe_citations with open(path) as bibtex_file: FileNotFoundError: [Errno 2] No such file or directory: '/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/q2_citation.bib'

I was able to solve this issue by going into the directory ~/provenance-lib/provenance_lib and copying the q2_citation.bib from there into the directory listed in the error scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/q2_citation.bib

Steps to reproduce the behavior:

  1. Build new qiime2-2022.2 environment
  2. activate env
  3. Install from github using instructions at https://github.com/qiime2/provenance-lib/
  4. run replay citations

Computation Environment: I was able to replicate this on MacOS( thanks @lizgehret ) and a Linux based HPC.

thermokarst commented 2 years ago

Hey @cherman2 & @lizgehret - can you confirm what git commit you currently have checked out when you ran into this? I just pulled down the latest main and I've got that missing file sitting in my site-packages:

ls -l ~/.conda/envs/q2dev/lib/python3.8/site-packages/provenance_lib            main 7ce4e35
total 176
drwxr-sr-x 2 matthew matthew  4096 Jun  1 14:00 __pycache__
drwxr-sr-x 2 matthew matthew  4096 Jun  1 14:00 assets
drwxr-sr-x 3 matthew matthew  4096 Jun  1 14:00 tests
-rw-r--r-- 1 matthew matthew  1046 Jun  1 14:00 __init__.py
-rw-r--r-- 1 matthew matthew 29791 Jun  1 14:00 _archive_parser.py
-rw-r--r-- 1 matthew matthew  8395 Jun  1 14:00 _checksum_validator.py
-rw-r--r-- 1 matthew matthew 25335 Jun  1 14:00 _usage_drivers.py
-rw-r--r-- 1 matthew matthew  4774 Jun  1 14:00 _yaml_constructors.py
-rw-r--r-- 1 matthew matthew  9834 Jun  1 14:00 click_commands.py
-rw-r--r-- 1 matthew matthew 20485 Jun  1 14:00 parse.py
-rw-r--r-- 1 matthew matthew  2755 Jun  1 14:00 q2_citation.bib
-rw-r--r-- 1 matthew matthew 32751 Jun  1 14:00 replay.py
-rw-r--r-- 1 matthew matthew  1576 Jun  1 14:00 util.py
-rw-r--r-- 1 matthew matthew  2324 Jun  1 14:00 version_parser.py
thermokarst commented 2 years ago

xref to https://github.com/qiime2/provenance-lib/commit/13cf277fcc138e7becb2b0909641cc33db175b73

cherman2 commented 2 years ago

@thermokarst , Yup, Sorry it was an old commit. My bad.

thermokarst commented 2 years ago

No problem, I'm glad it was an easy fix!

lizgehret commented 2 years ago

@thermokarst circling back here for MacOS - I had an old commit as well, everything works as expected after pulling the latest from main!