From 1775d50debb082a1842c7ed7856974b21858aaa9 Mon Sep 17 00:00:00 2001 From: Marie-Luise Klaus <32742984+faymarie@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:08:50 +0100 Subject: [PATCH 1/2] add hatch command --- README.md | 9 +++++++++ pyproject.toml | 3 +++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 5502316..c355094 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,15 @@ It's crucial to thoroughly test your custom component before uploading it to dee For detailed instructions, refer to our documentation on [Creating a Custom Component](https://docs.cloud.deepset.ai/docs/create-a-custom-component). +## 4. Debugging + +To debug the installation of custom components in deepset Cloud, you can run: + +- On Linux and macOS: `hatch run dc:logs` +- On Windows: `hatch run dc:logs-windows` + +This will print the installation logs of the latest version of your custom components. + ### GitHub Actions We use GitHub Actions to build and push custom components to deepset Cloud. Create a tag to trigger the build and push job. diff --git a/pyproject.toml b/pyproject.toml index 286412b..55e4f9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,9 @@ list = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_comp build-windows = "powershell -Command \"& {{ if (-Not (Test-Path dist)) {{mkdir dist}}; if (Test-Path dist/custom_component.zip) {{ Remove-Item dist/custom_component.zip }}; Get-ChildItem -Path . | Where-Object {{ $_.FullName -notlike '*\\dist*' }} | Compress-Archive -DestinationPath dist/custom_component.zip -Update }}" push-windows = "curl --request POST --url https://api.cloud.deepset.ai/api/v2/custom_components --header \"accept: application/json\" --header \"Authorization: Bearer %API_KEY%\" --form \"file=@dist/custom_component.zip;type=application/zip\"" list-windows = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components --header \"accept: application/json\" --header \"Authorization: Bearer %API_KEY%\"" +[tool.hatch.envs.dc.scripts] +logs = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components/logs --header 'accept: text/plain' --header \"Authorization: Bearer $API_KEY\"" +logs-windows = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components/logs --header \"accept: text/plain\" --header \"Authorization: Bearer %API_KEY%\"" [tool.hatch.envs.code-quality] python = "3.11" From 1dba20360d005eb86aee028ac1eae4f32a3fd95f Mon Sep 17 00:00:00 2001 From: Marie-Luise Klaus <32742984+faymarie@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:09:30 +0100 Subject: [PATCH 2/2] remove unnecessary line --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55e4f9a..6a858d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ list = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_comp build-windows = "powershell -Command \"& {{ if (-Not (Test-Path dist)) {{mkdir dist}}; if (Test-Path dist/custom_component.zip) {{ Remove-Item dist/custom_component.zip }}; Get-ChildItem -Path . | Where-Object {{ $_.FullName -notlike '*\\dist*' }} | Compress-Archive -DestinationPath dist/custom_component.zip -Update }}" push-windows = "curl --request POST --url https://api.cloud.deepset.ai/api/v2/custom_components --header \"accept: application/json\" --header \"Authorization: Bearer %API_KEY%\" --form \"file=@dist/custom_component.zip;type=application/zip\"" list-windows = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components --header \"accept: application/json\" --header \"Authorization: Bearer %API_KEY%\"" -[tool.hatch.envs.dc.scripts] logs = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components/logs --header 'accept: text/plain' --header \"Authorization: Bearer $API_KEY\"" logs-windows = "curl --request GET --url https://api.cloud.deepset.ai/api/v2/custom_components/logs --header \"accept: text/plain\" --header \"Authorization: Bearer %API_KEY%\""