scverse / scverse/scanpy

Scanpy does not work with with few permissions

Open
#50 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

I'm running scanpy in a docker container with few privileges, e.g. the guest user.
Unfortunately, scanpy tries to create a folder in the local working directory:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/scanpy/__init__.py", line 14, in <module>
    from . import settings
  File "/usr/local/lib/python3.6/site-packages/scanpy/settings.py", line 13, in <module>
    os.makedirs('.scanpy/')
  File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '.scanpy/'

Could you use a tempdir alternativley?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scanpy/settings.py and reproduce importing scanpy as a user who cannot write to the current working directory. Check that initialization no longer fails with the shown PermissionError and that its required directory is created in a temporary location instead.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.