Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing folder configuration #11

Closed
bgyori opened this issue May 10, 2021 · 1 comment · Fixed by #12
Closed

Confusing folder configuration #11

bgyori opened this issue May 10, 2021 · 1 comment · Fixed by #12

Comments

@bgyori
Copy link

bgyori commented May 10, 2021

In the README, the instructions say

Data gets stored in ~/.data by default. If you want to change the name of the directory,
set the environment variable PYSTOW_NAME. If you want to change the default parent directory
to be other than the home directory, set PYSTOW_HOME.

I interpreted this to say that PYSTOW_HOME can be configured to /path to make it create its .data folder in /path/.data. However, this made it put the individual project folders into /path/project1, /path/project2, etc. I think it would make sense to either interpret PYSTOW_HOME as the parent of .data and PYSTOW_NAME as the name for the .data folder, or change the instructions above to describe the current behavior (i.e., instead of "default parent directory to be other than the home directory" say "default pystow data directory to be other than ~/.data")

@bgyori
Copy link
Author

bgyori commented May 11, 2021

The code here

def get_home(ensure_exists: bool = True) -> Path:
"""Get the PyStow home directory."""
default = Path.home() / get_name()
return getenv_path(PYSTOW_HOME_ENVVAR, default, ensure_exists=ensure_exists)
confirms that the current interpretation of PYSTOW_HOME is as an alternative to ~/.data, not as an alternative to ~.

cthoyt added a commit that referenced this issue May 11, 2021
@cthoyt cthoyt mentioned this issue May 11, 2021
cthoyt added a commit that referenced this issue May 11, 2021
* Rewrite configuration with examples

Closes #11

* Update docs

* Automatically make README in data directory

Closes #5

* Update module.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant