From 6e788921874311a8b14017269e136c5912fc4316 Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Tue, 31 Oct 2023 04:46:35 -0700 Subject: [PATCH 1/3] Add devcontainer.json (ocean-devcontainer v1.1.0) --- .devcontainer/devcontainer.json | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..9d0b416 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,51 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/debian +{ + "name": "Ocean Development Environment", + + // python 3.11 on debian, with latest Ocean and optional packages + // source repo: https://github.com/dwavesystems/ocean-dev-docker + "image": "docker.io/dwavesys/ocean-dev:latest", + + // install repo requirements on create and content update + "updateContentCommand": "pip install -r requirements.txt", + + // forward/expose container services (relevant only when run locally) + "forwardPorts": [ + // dwave-inspector web app + 18000, 18001, 18002, 18003, 18004, + // OAuth connect redirect URIs + 36000, 36001, 36002, 36003, 36004 + ], + + "portsAttributes": { + "18000-18004": { + "label": "D-Wave Problem Inspector", + "requireLocalPort": true + }, + "36000-36004": { + "label": "OAuth 2.0 authorization code redirect URI", + "requireLocalPort": true + } + }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "workbench": { + "editorAssociations": { + "*.md": "vscode.markdown.preview.editor" + }, + "startupEditor": "readme" + } + }, + "extensions": [ + "ms-python.python", + "ms-toolsai.jupyter" + ] + } + } +} From 744ad3c9bd2ae47e7dd87a6b62be1edc85e8222e Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Tue, 31 Oct 2023 04:47:02 -0700 Subject: [PATCH 2/3] Update "Open in" badge to use GitHub Codespaces --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c05f75..42c5ac2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Open in Leap IDE]( - https://cdn-assets.cloud.dwavesys.com/shared/latest/badges/leapide.svg)]( - https://ide.dwavesys.io/#https://github.com/dwave-examples/paint-shop-optimization) +[![Open in GitHub Codespaces]( + https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-333?logo=github)]( + https://codespaces.new/dwave-examples/paint-shop-optimization?quickstart=1) [![Linux/Mac/Windows build status]( https://circleci.com/gh/dwave-examples/paint-shop-optimization.svg?style=shield)]( https://circleci.com/gh/dwave-examples/paint-shop-optimization) From d577f619e865b855d78c782cecc1bb6651930681 Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Tue, 31 Oct 2023 04:47:45 -0700 Subject: [PATCH 3/3] Relax pip requirements --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index ab81667..b8c3865 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ dwave-ocean-sdk>=4.1 -fire==0.4.0 -pyyaml==5.4.1 -matplotlib==3.3.4 \ No newline at end of file +fire>=0.4.0 +pyyaml>=5.4.1 +matplotlib>=3.3.4 \ No newline at end of file