qiime2 / provenance-lib

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

Replay Does not Accept Symlink Files #94

Open cherman2 opened 2 years ago

cherman2 commented 2 years ago

Replay can not be handed a folder of symlinked files. This error occurs when handed a folder of symlinked files.

 replay provenance --i-in-fp ../for-replay/ --o-out-fp test
Parsing ../for-replay/duo-faiths.qzv
Traceback (most recent call last):
  File "/scratch/crh423/conda/envs/qiime2-2022.2/bin/replay", line 8, in <module>
    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 66, in provenance
    replay_provenance(payload=i_in_fp,
  File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/replay.py", line 173, in replay_provenance
    dag = ProvDAG(
  File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/parse.py", line 108, in __init__
    parser_results = parse_provenance(cfg, artifact_data)
  File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/parse.py", line 443, in parse_provenance
    return parser.parse_prov(cfg, payload)
  File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/site-packages/provenance_lib/parse.py", line 382, in parse_prov
    with zipfile.ZipFile(archive) as zf:
  File "/scratch/crh423/conda/envs/qiime2-2022.2/lib/python3.8/zipfile.py", line 1251, in __init__
    self.fp = io.open(file, filemode)
OSError: [Errno 40] Too many levels of symbolic links: '../for-replay/duo-faiths.qzv'

This would be beneficial if a user had a bunch of files that were stored in different places that they want to rerun without taking up additional storage to copy those files into a input directory.