From 01d815ab7431186dbdfe3f999e69d1ad072f77a1 Mon Sep 17 00:00:00 2001 From: Krishna Kumar Date: Mon, 14 Oct 2024 23:36:49 +0000 Subject: [PATCH] Add dev container --- .devcontainer/devcontainer.json | 16 ++++++++++++++++ gns/render_rollout.py | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f4c92fe --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "GNS Development Container", + "image": "ghcr.io/geoelements/gns:v2", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-toolsai.jupyter" + ] + } + }, + "remoteUser": "root", + "mounts": [ + "source=${localWorkspaceFolder},target=/app,type=bind,consistency=cached" + ] +} \ No newline at end of file diff --git a/gns/render_rollout.py b/gns/render_rollout.py index 3347dd7..fcf175a 100644 --- a/gns/render_rollout.py +++ b/gns/render_rollout.py @@ -280,9 +280,9 @@ def write_vtk(self): static_particle_value = ( np.max(material_property) + 1 ) # Use a value outside the material property range - color_field[ - particle_type == 3 - ] = static_particle_value # Assumes static particle type = 3 + color_field[particle_type == 3] = ( + static_particle_value # Assumes static particle type = 3 + ) data["color"] = color_field else: # If no material property, use particle type for color