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

Combine LLM_*_PATH variables into one #76

Closed
simonw opened this issue Jul 1, 2023 · 2 comments
Closed

Combine LLM_*_PATH variables into one #76

simonw opened this issue Jul 1, 2023 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Jul 1, 2023

These are getting messy:

llm/tests/conftest.py

Lines 29 to 31 in a597a9e

monkeypatch.setenv("LLM_KEYS_PATH", str(keys_path))
monkeypatch.setenv("LLM_LOG_PATH", str(log_path))
monkeypatch.setenv("LLM_TEMPLATES_PATH", str(templates_path))

Especially since I now need to add yet another one for the path used for the file that stores the default model:

@simonw simonw added the refactor label Jul 1, 2023
@simonw
Copy link
Owner Author

simonw commented Jul 1, 2023

I'm going to call it LLM_USER_PATH and have it control the return value for this function:

llm/llm/cli.py

Lines 516 to 517 in a597a9e

def user_dir():
return pathlib.Path(click.get_app_dir("io.datasette.llm"))

simonw added a commit that referenced this issue Jul 1, 2023
simonw added a commit that referenced this issue Jul 1, 2023
@simonw
Copy link
Owner Author

simonw commented Jul 1, 2023

@simonw simonw closed this as completed Jul 1, 2023
simonw added a commit that referenced this issue Jul 10, 2023
simonw added a commit that referenced this issue Jul 10, 2023
simonw added a commit that referenced this issue Jul 10, 2023
simonw added a commit that referenced this issue Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant