diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 63b70d1..4de8ef2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,8 @@ "TZ": "Etc/UTC", "POETRY_HOME": "/opt/poetry", "VIRTUAL_ENV": "/home/vscode/.venv", - "POETRY_VIRTUALENVS_CREATE": "false" + "POETRY_VIRTUALENVS_CREATE": "false", + "PYTHONPATH": "${containerWorkspaceFolder}" }, "postCreateCommand": "git config --global --add safe.directory \"$(pwd)\" && poetry install --with dev --no-interaction", "customizations": { diff --git a/README.md b/README.md index 2b1544b..f87cfaa 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,9 @@ devcontainer exec --workspace-folder . poetry run pytest -q The container installs project dependencies with Poetry and uses `/home/vscode/.venv`, so it does not reuse a host operating system's `.venv`. -Poetry itself is kept in a separate `/opt/poetry` environment. Use the container -for changes involving time zones, paths, native libraries, or other -operating-system-dependent behavior. Standard Python 3.9 and Python 3.12 -installations remain covered by the existing CI matrix. +Poetry itself is kept in a separate `/opt/poetry` environment. The workspace +root is also added to `PYTHONPATH`, so the checked-out source and local test +modules are available throughout a Codespace without copying them into the +image. Use the container for changes involving time zones, paths, native +libraries, or other operating-system-dependent behavior. Standard Python 3.9 +and Python 3.12 installations remain covered by the existing CI matrix.