conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
143 stars 46 forks source link

Store the state and database files in ~/.conda-store by default #639

Closed nkaretnikov closed 10 months ago

nkaretnikov commented 11 months ago

This work is part of #513. Original PR: #554.

netlify[bot] commented 11 months ago

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
Latest commit d412a2b1684c718baa124d0ff63419a8c2e748db
Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/653984ab861696000843d697
nkaretnikov commented 10 months ago

This should land only once Windows lands (#640), to make sure this is compatible.

nkaretnikov commented 10 months ago

Rebased on the Windows PR to be able to test on Windows, will remove redundant commits later.

nkaretnikov commented 10 months ago

Contents of CONDA_STORE_DIR:

% ls ~/.conda-store
celerybeat-schedule.bak  celerybeat-schedule.dat  celerybeat-schedule.dir  conda-store.sqlite  state  storage

% ls ~/.conda-store/state
default

% ls ~/.conda-store/state/default
a54148c1d1d435985989ea232bc982f0eb877991f6c70c4de1390dd76e7ef564-20231025-184722-649393-2-test-env  envs

ls ~/.conda-store/storage
archive  docker  lockfile  logs  yaml
nkaretnikov commented 10 months ago

Tested on Windows and Linux with this env. No files are created in current dir anymore, as expected.

channels:
- conda-forge
dependencies:
- python
- pip:
  - nothing
- ipykernel
- pytest
- requests
description: ''
name: test-env
prefix: null
variables: null
nkaretnikov commented 10 months ago

This change shouldn't affect Nebari since it uses a config file, which sets database_url, storage_class, and store_directory.

jaimergp commented 10 months ago

I wonder if we are on time to instead use well accepted standards like XDG on Linux, or %LOCALAPPDATA% on Windows.

nkaretnikov commented 10 months ago

@jaimergp I'm not quite sure that is better. Also, on Windows, I see this:

Screen Shot 2023-11-01 at 08 50 58

Conda and vscode (which is developed by MS) use /Users/<User>.

jaimergp commented 10 months ago

.conda needs to change too but that ship sailed too long ago and people's environments may live there, so it's tricky to change now. .vscode's issue is inherited from Electron (see lengthy thread). We don't have a good excuse I'm afraid :D

nkaretnikov commented 10 months ago

Yeah, I've changed my mind after reading relevant threads from other projects. We should use well-accepted standards.