From 45c40b5700446491bd396cfb1d8d072c97941b6c Mon Sep 17 00:00:00 2001 From: Alex Allmont Date: Wed, 20 Nov 2024 14:47:00 +0000 Subject: [PATCH 1/3] build: remove redundant devcontainer flags (#148) - These flags are automatically set via `CMakePresets.json`. --- .devcontainer/devcontainer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3a42f3c5..55e47d9a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,9 +24,7 @@ "cmake.cmakePath": "/tools/venv/bin/cmake", "cmake.configureArgs": [ "-DCMAKE_MAKE_PROGRAM=/tools/venv/bin/ninja", - "-DCMAKE_TOOLCHAIN_FILE=/tools/vcpkg/scripts/buildsystems/vcpkg.cmake", - "-DROUGHPY_BUILD_TESTS=ON", - "-DROUGHPY_BUILD_PYLIB_INPLACE=ON" + "-DCMAKE_TOOLCHAIN_FILE=/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" ] } } From 2f99a9d4b9b270d16be49cb7598362985b70b82d Mon Sep 17 00:00:00 2001 From: Alex Allmont Date: Wed, 20 Nov 2024 14:52:51 +0000 Subject: [PATCH 2/3] docs: update devcontainer README (#148) - Added notes on the need to wait while CMake is configuring. This needs to finish for tests to be available. --- .devcontainer/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index ff247eaa..d3412270 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -4,12 +4,15 @@ The `.devcontainer/` folder provides a consistent build and debug environment th ## Opening devcontainer locally -When you open the cloned RoughPy folder in VSCode, accept the popup to open in a Dev Container or run the editor command `Dev Containers: Reopen in Dev Container`. +When you open the cloned RoughPy folder in VSCode, it will detect the `.devcontainer/` folder. Accept the popup to open in a Dev Container or run the editor command `Dev Containers: Reopen in Dev Container`. If the container image needs to be rebuilt, it will take a few extra minutes. -VSCode will restart inside a container that will have mapped your checkout folder to `/workspaces/`, so be mindful that editing files is affecting this folder on your machine. +VSCode will restart inside a container that mounts your checkout folder to `/workspaces/`. Be mindful that editing files is affecting this folder on your machine. The devcontainer `Dockerfile` sets up a root `/tools` folder that contains a `venv` with build dependencies pre-installed, and a clone of `vcpkg`; both of which are added to `$PATH`. +On the first run, the project will need to be configured in CMake and additional build dependencies will be fetched by vcpkg. You must wait for this to finish before you can build and run any tests. Progress can be tracked under 'CMake/Build' in the VSCode 'Output' panel. + + ## Building, testing and debugging Run the editor command `CMake: Select Configure Preset` and select `Debug Develop` to compile with debug symbols. Then run `CMake: build`. From 9c925b5e7a2acf1b467b0e72a1161e413af8e390 Mon Sep 17 00:00:00 2001 From: Alex Allmont Date: Wed, 20 Nov 2024 14:53:22 +0000 Subject: [PATCH 3/3] docs: devcontainer CHANGELOG (#148) --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ba382149..8164d748 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Unreleased + - Added VSCode `.devcontainer` settings for containerised developer environment for debugging tests. See `.devcontainer/README.md` for instructions (@alexallmont #148) + Version 0.1.2 - Documentation is now in sync with the main branch (@philipparubin PR #85) - Fixed a fault when constructing with larger than expected array (Issue #70, @inakleinbottle PR #72)