Skip to content

seqrepo pull expects existing seqrepo dir #146

@jsstevenson

Description

@jsstevenson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions