Skip to content

core/config: resolve MY_CONFIG path before warning unrelatedness#486

Open
yutotakano wants to merge 1 commit into
karlicoss:masterfrom
yutotakano:allow-relative-config-dir
Open

core/config: resolve MY_CONFIG path before warning unrelatedness#486
yutotakano wants to merge 1 commit into
karlicoss:masterfrom
yutotakano:allow-relative-config-dir

Conversation

@yutotakano
Copy link
Copy Markdown

@yutotakano yutotakano commented May 22, 2026

PR #336 added a warning for when the detected my.config module is not in a subpath of MY_CONFIG. This was to help diagnose bad setups.

This warning is currently faulty. Because the paths aren't resolved before comparison, setting MY_CONFIG to a relative value like ./config will fail the check despite the config module existing within the current working directory. (Using relative values for the env might be seen with a directory-sandboxed HPI setup, using something like direnv)

Expected my.config to be located at ./config, but instead its path is <someabsolutepath>\config\my\config\__init__.py.
This will likely cause issues down the line -- double check ./config structure.

The pull request resolves both paths used in the comparison to the absolute path. The problem described above is fixed, which I verified with a locally editable install.

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.

1 participant