From 958aa761b1cbf40c83172d1f04f1d04cbe333b64 Mon Sep 17 00:00:00 2001 From: "Nicholas A. Brown" Date: Fri, 13 Dec 2024 13:31:25 +0000 Subject: [PATCH 1/2] Activate default virtual environment named venv --- .devcontainer/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b95e39c56cd2..b673ceb40b0f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -24,7 +24,7 @@ COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ - uv sync --group dev --group tests \ + uv venv && uv sync --group dev --group tests \ --extra duckdb --extra clickhouse --extra examples --extra geospatial ENV VENV_DIR=.venv @@ -36,6 +36,8 @@ RUN chown -R $USERNAME $IBIS_PROJECT # Place executables in the environment at the front of the path ENV PATH="/app/.venv/bin:$PATH" +SHELL ["/bin/bash", "-c", "source .venv/bin/activate"] + ENTRYPOINT [] USER $USERNAME From 1cae9bd9805796ff26e25d04c01b8c77e65c7a0a Mon Sep 17 00:00:00 2001 From: "Nicholas A. Brown" Date: Fri, 13 Dec 2024 13:40:56 +0000 Subject: [PATCH 2/2] Update docs to ensure fork is synced before updated devcontainer build --- docs/contribute/01_environment.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/contribute/01_environment.qmd b/docs/contribute/01_environment.qmd index fec107f54a8a..0d5a5b5aa9fd 100644 --- a/docs/contribute/01_environment.qmd +++ b/docs/contribute/01_environment.qmd @@ -238,10 +238,11 @@ for manager, params in managers.items(): 1. To exit a container, click the `Dev Container` button on the lower left of the window and select the last menu option, `Close Remote Connection`. -1. To ensure you have the latest dependencies from the main branch based on +1. To ensure you have the latest dependencies from the main upstream branch based on `pyproject.toml`: * Exit any running container. + * Sync your fork. * From your local Git repo, `git pull origin main`. * Reopen the project in a new container. * `Rebuild Container` to copy files from the local Git repo and have the build