biocommons.seqrepo icon indicating copy to clipboard operation
biocommons.seqrepo copied to clipboard

`seqrepo pull` expects existing `seqrepo` dir

Open jsstevenson opened this issue 10 months ago • 0 comments

Describe the bug I'm getting set up on a fresh machine, and pulling the 2024 snapshot seems to expect a /usr/local/seqrepo directory to exist already:

[ main ⚙ .venv] ~/code/biocommons.seqrepo % seqrepo pull -i 2024-02-20
Traceback (most recent call last):
  File "/Users/jss009/code/biocommons.seqrepo/.venv/bin/seqrepo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/jss009/code/biocommons.seqrepo/src/biocommons/seqrepo/cli.py", line 730, in main
    opts.func(opts)
  File "/Users/jss009/code/biocommons.seqrepo/src/biocommons/seqrepo/cli.py", line 548, in pull
    local_instances = _get_local_instances(opts)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jss009/code/biocommons.seqrepo/src/biocommons/seqrepo/cli.py", line 68, in _get_local_instances
    return sorted(list(filter(instance_name_re.match, os.listdir(opts.root_directory))))
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/seqrepo'

To Reproduce See above -- seqrepo pull -i <a snapshot> on a machine that doesn't have a seqrepo dir at the default location already

Expected behavior I'd expect this to work, or at least give a specific error that a user needs to make this directory themselves if necessary. Tbh, I wonder more broadly whether seqrepo snapshots should install outside of user space by default at all.

Additional context n/a

jsstevenson avatar Apr 20 '24 14:04 jsstevenson