Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: development script for syncing Poetry lockfile (#5170)

Bowen Liange7752e81356d
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index cff98db7e42..4af4daadeba 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -107,7 +107,9 @@ jobs:
api/poetry.lock
- name: Poetry check
- run: poetry check -C api
+ run: |
+ poetry check -C api
+ poetry show -C api
- name: Install dependencies
run: poetry install -C api --with dev
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 160641fdf0b..cb5400b918b 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -100,6 +100,7 @@ jobs:
**.yaml
**.yml
Dockerfile
+ dev/**
- name: Super-linter
uses: super-linter/super-linter/slim@v6
diff --git a/dev/sync-poetry b/dev/sync-poetry
new file mode 100755
index 00000000000..2dd4dd4fc31
--- /dev/null
+++ b/dev/sync-poetry
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# rely on `poetry` in path
+if ! command -v poetry &> /dev/null; then
+ echo "Installing Poetry ..."
+ pip install poetry
+fi
+
+# check poetry.lock in sync with pyproject.toml
+poetry check -C api --lock
+if [ $? -ne 0 ]; then
+ # update poetry.lock
+ # refreshing lockfile only without updating locked versions
+ poetry lock -C api --no-update
+fi
diff --git a/dev/update-poetry b/dev/update-poetry
new file mode 100755
index 00000000000..362a5895b1c
--- /dev/null
+++ b/dev/update-poetry
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# rely on `poetry` in path
+if ! command -v poetry &> /dev/null; then
+ echo "Installing Poetry ..."
+ pip install poetry
+fi
+
+# refreshing lockfile, updating locked versions
+poetry update -C api
+
+# check poetry.lock in sync with pyproject.toml
+poetry check -C api --lock