From 20cf3e03461e982ab7c2f6cf6a28ddc89a26815e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 21 Aug 2023 14:31:12 -0300 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A7=20chore(devcontainer.json):=20?= =?UTF-8?q?update=20devcontainer.json=20for=20Langflow=20Demo=20Container?= =?UTF-8?q?=20=F0=9F=94=A7=20chore(devcontainer.json):=20update=20devconta?= =?UTF-8?q?iner.json=20for=20Langflow=20Dev=20Container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/demo/devcontainer.json | 60 +++++++++++++-------------- .devcontainer/devcontainer.json | 62 ++++++++++++++-------------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/.devcontainer/demo/devcontainer.json b/.devcontainer/demo/devcontainer.json index 26ecd86d3..0fb998b81 100644 --- a/.devcontainer/demo/devcontainer.json +++ b/.devcontainer/demo/devcontainer.json @@ -1,33 +1,33 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/universal { - "name": "LangChain Demo Container", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:3.10", - "features": { - "ghcr.io/devcontainers/features/aws-cli:1": {}, - "ghcr.io/devcontainers/features/docker-in-docker": {}, - "ghcr.io/devcontainers/features/node": {} - }, - "customizations": { - "vscode": { - "extensions": [ - "actboy168.tasks", - "GitHub.copilot", - "ms-python.python", - "eamodio.gitlens", - "GitHub.vscode-pull-request-github" - ] - } - }, - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pipx install 'langflow>=0.0.33' && langflow --host 0.0.0.0" - // Configure tool-specific properties. - // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} \ No newline at end of file + "name": "Langflow Demo Container", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:3.10", + "features": { + "ghcr.io/devcontainers/features/aws-cli:1": {}, + "ghcr.io/devcontainers/features/docker-in-docker": {}, + "ghcr.io/devcontainers/features/node": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "actboy168.tasks", + "GitHub.copilot", + "ms-python.python", + "eamodio.gitlens", + "GitHub.vscode-pull-request-github" + ] + } + }, + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "pipx install 'langflow>=0.0.33' && langflow --host 0.0.0.0" + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index aed1ec954..700d770d3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,39 +1,41 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/universal { - "name": "LangChain Dev Container", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye", - - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/node": {}, - "ghcr.io/devcontainers-contrib/features/poetry": {} - }, + "name": "Langflow Dev Container", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye", - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/node": {}, + "ghcr.io/devcontainers-contrib/features/poetry": {} + }, - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "make setup_devcontainer", + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - "containerEnv": { - "POETRY_VIRTUALENVS_IN_PROJECT": "true" - }, + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "make setup_devcontainer", - // Configure tool-specific properties. - "customizations": { - "vscode": {"extensions": [ - "actboy168.tasks", - "GitHub.copilot", - "ms-python.python", - "sourcery.sourcery", - "eamodio.gitlens", - "ms-vscode.makefile-tools", - "GitHub.vscode-pull-request-github" - ]} - } + "containerEnv": { + "POETRY_VIRTUALENVS_IN_PROJECT": "true" + }, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "actboy168.tasks", + "GitHub.copilot", + "ms-python.python", + "sourcery.sourcery", + "eamodio.gitlens", + "ms-vscode.makefile-tools", + "GitHub.vscode-pull-request-github" + ] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } From 0679fb8754778ccd25d33d6dd32869cb5baa7b5b Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 21 Aug 2023 14:53:37 -0300 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A7=20chore(devcontainer.json):=20?= =?UTF-8?q?update=20postCreateCommand=20to=20install=20frontend=20and=20ba?= =?UTF-8?q?ckend=20dependencies=20after=20container=20creation=20for=20eas?= =?UTF-8?q?ier=20development=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 700d770d3..90966fb38 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "make setup_devcontainer", + "postCreateCommand": "make install_frontend && make install_backend", "containerEnv": { "POETRY_VIRTUALENVS_IN_PROJECT": "true" From 4d3b12aff8bf45431c3f9badc62f6759193591ad Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 21 Aug 2023 15:09:36 -0300 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=9D=20chore(tasks.json):=20add=20t?= =?UTF-8?q?asks.json=20file=20to=20configure=20build=20tasks=20for=20the?= =?UTF-8?q?=20project?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tasks.json file is added to configure build tasks for the project. It includes tasks for initializing the project, building the backend and frontend, running tests, linting, formatting, and installing dependencies. --- .vscode/tasks.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..25b480b27 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,48 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Init", + "type": "shell", + "command": "make init" + }, + // make backend + { + "label": "Backend", + "type": "shell", + "command": "make backend" + }, + // make frontend + { + "label": "Frontend", + "type": "shell", + "command": "make frontend" + }, + // make test + { + "label": "Test", + "type": "shell", + "command": "make tests" + }, + // make lint + { + "label": "Lint", + "type": "shell", + "command": "make lint" + }, + // make format + { + "label": "Format", + "type": "shell", + "command": "make format" + }, + // make install + { + "label": "Install", + "type": "shell", + "command": "make install_backend && make install_frontend" + } + ] +} From e7f43297b138276a84fd349a0128c3a08b6c33be Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 21 Aug 2023 17:11:10 -0300 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=80=20chore(pre-release.yml):=20si?= =?UTF-8?q?mplify=20if=20condition=20for=20the=20if=5Frelease=20job=20to?= =?UTF-8?q?=20improve=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pre-release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 1b46e48b8..2399b5634 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -14,9 +14,7 @@ env: jobs: if_release: - if: | - ${{ github.event.pull_request.merged == true }} - && ${{ contains(github.event.pull_request.labels.*.name, 'pre-release') }} + if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From d7f0ab9ba301fbffb2de68be0dfc2988a64433aa Mon Sep 17 00:00:00 2001 From: igorrCarvalho Date: Sun, 20 Aug 2023 20:43:00 -0300 Subject: [PATCH 5/5] Fix: Tweak section and tweaks inputs not working --- .../components/codeTabsComponent/index.tsx | 91 +++++++++++++------ 1 file changed, 64 insertions(+), 27 deletions(-) diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index e60e09ae5..2f3e79a68 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -277,9 +277,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -326,9 +330,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -371,9 +379,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -404,9 +416,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = e; return newInputList; @@ -495,9 +511,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -531,9 +551,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -583,9 +607,14 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -638,9 +667,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList; @@ -693,9 +726,13 @@ export default function CodeTabsComponent({ setData((old) => { let newInputList = cloneDeep(old); - newInputList![ - index - ].data.node.template[ + newInputList!.find( + (obj) => + obj.data.node + .template[ + templateField + ] + )!.data.node.template[ templateField ].value = target; return newInputList;