Skip to content

fix: make LangKit data paths configurable#327

Open
extrasmall0 wants to merge 1 commit into
whylabs:mainfrom
extrasmall0:fix-configurable-data-home
Open

fix: make LangKit data paths configurable#327
extrasmall0 wants to merge 1 commit into
whylabs:mainfrom
extrasmall0:fix-configurable-data-home

Conversation

@extrasmall0
Copy link
Copy Markdown

Summary

  • allow LANGKIT_DATA_HOME to override where LangKit stores downloaded artifacts
  • fall back to a user cache directory when the package directory is not writable (common in containers)
  • allow LANGKIT_INJECTIONS_BASE_URL / LANGKIT_DATA_FOLDER overrides and document them in the README
  • add tests for the new path-selection behavior

Testing

  • python3 -m venv .venv && . .venv/bin/activate && pip install -q pytest whylogs pandas && pytest langkit/tests/test_config_paths.py -q

Closes #322

@extrasmall0
Copy link
Copy Markdown
Author

extrasmall0 commented May 12, 2026

Quick status refresh after another pass against current main: this is still a narrow path-selection fix for environments where the installed package directory is read-only. The default behavior stays the same when that location is writable, and the fallback only kicks in when writes there are not possible. The tests remain limited to data-path resolution rather than changing analyzer behavior. If there is a preferred config surface or naming for this, I am happy to adjust the patch quickly.

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 this pull request may close these issues.

PermissionError: [Errno 13] Permission denied: '/opt/app-root/lib/python3.9/site-packages/langkit/langkit_data'

1 participant