mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
rebrand: rename internal package langflow/hanzoflow -> flow
Single generic package name for white-label compatibility. - git mv src/backend/base/hanzoflow/ -> src/backend/base/flow/ - git rm src/backend/base/langflow/ (compat shim, no longer needed) - git mv src/backend/hanzoflow/ -> src/backend/flow/ (root package) - Rename langflow_launcher.py -> launcher.py - Update all Python imports: from langflow/hanzoflow -> from flow - Update all string module references in mock targets, JSON data files - Update pyproject.toml entry points, hatch build targets, mypy/codeflash config - Update Dockerfile, Makefile, compose files, CI workflows, codecov.yml - Rename internal classes: HanzoflowApplication -> FlowApplication, etc. - Update alembic.ini database name - Keep PyPI package names (hanzoflow, langflow-base) unchanged - Keep LANGFLOW_* env var names for backwards compatibility
This commit is contained in:
@@ -22,14 +22,14 @@ RUN apt-get update && apt-get install -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create the vscode user and group with the expected UID and GID (1000)
|
||||
RUN groupadd -g 1000 hanzoflow && \
|
||||
useradd -m -u 1000 -g 1000 -s /bin/zsh hanzoflow && \
|
||||
echo "hanzoflow ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
RUN groupadd -g 1000 flow && \
|
||||
useradd -m -u 1000 -g 1000 -s /bin/zsh flow && \
|
||||
echo "flow ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Set default shell to Zsh
|
||||
SHELL ["/bin/zsh", "-c"]
|
||||
|
||||
RUN echo 'export PS1="%~ %# "' >> /home/hanzoflow/.zshrc
|
||||
RUN echo 'export PS1="%~ %# "' >> /home/flow/.zshrc
|
||||
|
||||
# Set the default user
|
||||
USER hanzoflow
|
||||
USER flow
|
||||
|
||||
@@ -82,12 +82,12 @@ jobs:
|
||||
echo "Base version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '\.rc[0-9]+' | sort -V | tail -n 1)
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/ghcr.io/hanzoai/flow/tags?page_size=100" | jq -r '.results[].name' | grep -E '\.rc[0-9]+' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest base pre-release version: $last_released_version"
|
||||
echo "Base pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/ghcr.io/hanzoai/flow/tags?page_size=100" | jq -r '.results[].name' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
echo "Latest base release version: $last_released_version"
|
||||
fi
|
||||
|
||||
@@ -128,12 +128,12 @@ jobs:
|
||||
echo "Main version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '\.rc[0-9]+' | sort -V | tail -n 1)
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/ghcr.io/hanzoai/flow/tags?page_size=100" | jq -r '.results[].name' | grep -E '\.rc[0-9]+' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest main pre-release version: $last_released_version"
|
||||
echo "Main pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/ghcr.io/hanzoai/flow/tags?page_size=100" | jq -r '.results[].name' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
echo "Latest main release version: $last_released_version"
|
||||
fi
|
||||
|
||||
@@ -169,8 +169,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-base-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -240,8 +240,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-main-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -311,8 +311,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-main-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-backend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-backend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-backend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-backend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -334,7 +334,7 @@ jobs:
|
||||
context: .
|
||||
push: ${{ inputs.push_to_registry }}
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
LANGFLOW_IMAGE=ghcr.io/hanzoai/flow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: ${{ steps.tags.outputs.docker_tags }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
@@ -355,7 +355,7 @@ jobs:
|
||||
context: .
|
||||
push: ${{ inputs.push_to_registry }}
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=ghcr.io/langflow-ai/langflow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
LANGFLOW_IMAGE=ghcr.io/hanzoai/flow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: ${{ steps.tags.outputs.ghcr_tags }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
@@ -386,8 +386,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-main-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-frontend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-frontend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-frontend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-frontend:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -457,8 +457,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-main-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-ep:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-ep:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-ep:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-ep:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -528,8 +528,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ needs.determine-main-version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -616,57 +616,57 @@ jobs:
|
||||
"base")
|
||||
version="${{ needs.determine-base-version.outputs.version }}"
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow:base-${version},ghcr.io/langflow-ai/langflow:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow:base-${version},ghcr.io/hanzoai/flow:base-${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow:base-${version},langflowai/langflow:base-latest,ghcr.io/langflow-ai/langflow:base-${version},ghcr.io/langflow-ai/langflow:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow:base-${version},ghcr.io/hanzoai/flow:base-latest,ghcr.io/hanzoai/flow:base-${version},ghcr.io/hanzoai/flow:base-latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow:base-${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"main")
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow:${version},ghcr.io/langflow-ai/langflow:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow:${version},ghcr.io/hanzoai/flow:${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow:${version},langflowai/langflow:latest,ghcr.io/langflow-ai/langflow:${version},ghcr.io/langflow-ai/langflow:latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow:${version},ghcr.io/hanzoai/flow:latest,ghcr.io/hanzoai/flow:${version},ghcr.io/hanzoai/flow:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow:${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"main-backend")
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow-backend:${version},ghcr.io/langflow-ai/langflow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-backend:${version},ghcr.io/hanzoai/flow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow-backend:${version},langflowai/langflow-backend:latest,ghcr.io/langflow-ai/langflow-backend:${version},ghcr.io/langflow-ai/langflow-backend:latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-backend:${version},ghcr.io/hanzoai/flow-backend:latest,ghcr.io/hanzoai/flow-backend:${version},ghcr.io/hanzoai/flow-backend:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-backend:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"main-frontend")
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow-frontend:${version},ghcr.io/langflow-ai/langflow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-frontend:${version},ghcr.io/hanzoai/flow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow-frontend:${version},langflowai/langflow-frontend:latest,ghcr.io/langflow-ai/langflow-frontend:${version},ghcr.io/langflow-ai/langflow-frontend:latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-frontend:${version},ghcr.io/hanzoai/flow-frontend:latest,ghcr.io/hanzoai/flow-frontend:${version},ghcr.io/hanzoai/flow-frontend:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-frontend:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"main-ep")
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow-ep:${version},ghcr.io/langflow-ai/langflow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-ep:${version},ghcr.io/hanzoai/flow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow-ep:${version},langflowai/langflow-ep:latest,ghcr.io/langflow-ai/langflow-ep:${version},ghcr.io/langflow-ai/langflow-ep:latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-ep:${version},ghcr.io/hanzoai/flow-ep:latest,ghcr.io/hanzoai/flow-ep:${version},ghcr.io/hanzoai/flow-ep:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-ep:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"main-all")
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
echo "final_tags=langflowai/langflow-all:${version},ghcr.io/langflow-ai/langflow-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-all:${version},ghcr.io/hanzoai/flow-all:${version}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "final_tags=langflowai/langflow-all:${version},langflowai/langflow-all:latest,ghcr.io/langflow-ai/langflow-all:${version},ghcr.io/langflow-ai/langflow-all:latest" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-all:${version},ghcr.io/hanzoai/flow-all:latest,ghcr.io/hanzoai/flow-all:${version},ghcr.io/hanzoai/flow-all:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "arch_base=langflowai/langflow-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-all:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid release_type: ${{ inputs.release_type }}" >&2
|
||||
|
||||
@@ -60,7 +60,7 @@ on:
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: "3.13"
|
||||
TEST_TAG: "langflowai/langflow:test"
|
||||
TEST_TAG: "ghcr.io/hanzoai/flow:test"
|
||||
|
||||
jobs:
|
||||
get-version:
|
||||
@@ -171,29 +171,29 @@ jobs:
|
||||
|
||||
if [[ "${{ inputs.release_type }}" == "base" || "${{ inputs.release_type }}" == "nightly-base" ]]; then
|
||||
# LANGFLOW-BASE RELEASE
|
||||
echo "docker_tags=langflowai/langflow${nightly_suffix}:base-${{ needs.get-version.outputs.version }},langflowai/langflow${nightly_suffix}:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow${nightly_suffix}:base-${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow${nightly_suffix}:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow${nightly_suffix}:base-${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow${nightly_suffix}:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow${nightly_suffix}:base-${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow${nightly_suffix}:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "file=./docker/build_and_push_base.Dockerfile" >> $GITHUB_OUTPUT
|
||||
else
|
||||
if [[ "${{ inputs.pre_release }}" == "true" ]]; then
|
||||
# LANGFLOW-MAIN PRE-RELEASE
|
||||
echo "docker_tags=langflowai/langflow${nightly_suffix}:${{ needs.get-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow${nightly_suffix}:${{ needs.get-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow${nightly_suffix}:${{ needs.get-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow${nightly_suffix}:${{ needs.get-version.outputs.version }}" >> $GITHUB_OUTPUT
|
||||
echo "file=./docker/build_and_push.Dockerfile" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ inputs.release_type }}" == "main-ep" ]]; then
|
||||
# LANGFLOW-MAIN (ENTRYPOINT) RELEASE
|
||||
echo "docker_tags=langflowai/langflow-ep${nightly_suffix}:${{ needs.get-version.outputs.version }},langflowai/langflow-ep${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-ep${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow-ep${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-ep${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-ep${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-ep${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-ep${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "file=./docker/build_and_push_ep.Dockerfile" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ inputs.release_type }}" == "main" || "${{ inputs.release_type }}" == "nightly-main" ]]; then
|
||||
# LANGFLOW-MAIN RELEASE
|
||||
echo "docker_tags=langflowai/langflow${nightly_suffix}:${{ needs.get-version.outputs.version }},langflowai/langflow${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "file=./docker/build_and_push.Dockerfile" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ inputs.release_type }}" == "main-all" || "${{ inputs.release_type }}" == "nightly-main-all" ]]; then
|
||||
# LANGFLOW-MAIN (ALL OPTIONAL DEPS) RELEASE
|
||||
echo "docker_tags=langflowai/langflow-all${nightly_suffix}:${{ needs.get-version.outputs.version }},langflowai/langflow-all${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-all${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow-all${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-all${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-all${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-all${nightly_suffix}:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-all${nightly_suffix}:latest" >> $GITHUB_OUTPUT
|
||||
echo "file=./docker/build_and_push_with_extras.Dockerfile" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Invalid release type. Exiting the workflow."
|
||||
@@ -299,20 +299,20 @@ jobs:
|
||||
include:
|
||||
- component: docker-backend
|
||||
dockerfile: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: langflowai/langflow-backend:${{ needs.get-version.outputs.version }},langflowai/langflow-backend:latest
|
||||
langflow_image: langflowai/langflow:${{ needs.get-version.outputs.version }}
|
||||
tags: ghcr.io/hanzoai/flow-backend:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-backend:latest
|
||||
langflow_image: ghcr.io/hanzoai/flow:${{ needs.get-version.outputs.version }}
|
||||
- component: docker-frontend
|
||||
dockerfile: ./docker/frontend/build_and_push_frontend.Dockerfile
|
||||
tags: langflowai/langflow-frontend:${{ needs.get-version.outputs.version }},langflowai/langflow-frontend:latest
|
||||
langflow_image: langflowai/langflow:${{ needs.get-version.outputs.version }}
|
||||
tags: ghcr.io/hanzoai/flow-frontend:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-frontend:latest
|
||||
langflow_image: ghcr.io/hanzoai/flow:${{ needs.get-version.outputs.version }}
|
||||
- component: ghcr-backend
|
||||
dockerfile: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: ghcr.io/langflow-ai/langflow-backend:${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow-backend:latest
|
||||
langflow_image: ghcr.io/langflow-ai/langflow:${{ needs.get-version.outputs.version }}
|
||||
tags: ghcr.io/hanzoai/flow-backend:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-backend:latest
|
||||
langflow_image: ghcr.io/hanzoai/flow:${{ needs.get-version.outputs.version }}
|
||||
- component: ghcr-frontend
|
||||
dockerfile: ./docker/frontend/build_and_push_frontend.Dockerfile
|
||||
tags: ghcr.io/langflow-ai/langflow-frontend:${{ needs.get-version.outputs.version }},ghcr.io/langflow-ai/langflow-frontend:latest
|
||||
langflow_image: ghcr.io/langflow-ai/langflow:${{ needs.get-version.outputs.version }}
|
||||
tags: ghcr.io/hanzoai/flow-frontend:${{ needs.get-version.outputs.version }},ghcr.io/hanzoai/flow-frontend:latest
|
||||
langflow_image: ghcr.io/hanzoai/flow:${{ needs.get-version.outputs.version }}
|
||||
steps:
|
||||
- name: Check out the code at a specific ref
|
||||
uses: actions/checkout@v6
|
||||
|
||||
@@ -88,8 +88,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ steps.version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-nightly:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-nightly:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-nightly:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-nightly:base-${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -181,8 +181,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ steps.version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-nightly:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-nightly:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-nightly:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-nightly:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -274,8 +274,8 @@ jobs:
|
||||
id: tags
|
||||
run: |
|
||||
version="${{ steps.version.outputs.version }}"
|
||||
echo "docker_tags=langflowai/langflow-nightly-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/langflow-ai/langflow-nightly-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "docker_tags=ghcr.io/hanzoai/flow-nightly-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_tags=ghcr.io/hanzoai/flow-nightly-all:${version}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker cleanup
|
||||
run: |
|
||||
@@ -358,19 +358,19 @@ jobs:
|
||||
version="${{ steps.version.outputs.version }}"
|
||||
case "${{ inputs.release_type }}" in
|
||||
"nightly-base")
|
||||
echo "final_tags=langflowai/langflow-nightly:base-${version},langflowai/langflow-nightly:base-latest,ghcr.io/langflow-ai/langflow-nightly:base-${version},ghcr.io/langflow-ai/langflow-nightly:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=langflowai/langflow-nightly:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-nightly:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-nightly:base-${version},ghcr.io/hanzoai/flow-nightly:base-latest,ghcr.io/hanzoai/flow-nightly:base-${version},ghcr.io/hanzoai/flow-nightly:base-latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-nightly:base-${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-nightly:base-${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"nightly-main")
|
||||
echo "final_tags=langflowai/langflow-nightly:${version},langflowai/langflow-nightly:latest,ghcr.io/langflow-ai/langflow-nightly:${version},ghcr.io/langflow-ai/langflow-nightly:latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=langflowai/langflow-nightly:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-nightly:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-nightly:${version},ghcr.io/hanzoai/flow-nightly:latest,ghcr.io/hanzoai/flow-nightly:${version},ghcr.io/hanzoai/flow-nightly:latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-nightly:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-nightly:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"nightly-main-all")
|
||||
echo "final_tags=langflowai/langflow-nightly-all:${version},langflowai/langflow-nightly-all:latest,ghcr.io/langflow-ai/langflow-nightly-all:${version},ghcr.io/langflow-ai/langflow-nightly-all:latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=langflowai/langflow-nightly-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/langflow-ai/langflow-nightly-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "final_tags=ghcr.io/hanzoai/flow-nightly-all:${version},ghcr.io/hanzoai/flow-nightly-all:latest,ghcr.io/hanzoai/flow-nightly-all:${version},ghcr.io/hanzoai/flow-nightly-all:latest" >> $GITHUB_OUTPUT
|
||||
echo "arch_base=ghcr.io/hanzoai/flow-nightly-all:${version}" >> $GITHUB_OUTPUT
|
||||
echo "ghcr_arch_base=ghcr.io/hanzoai/flow-nightly-all:${version}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid release_type: ${{ inputs.release_type }}" >&2
|
||||
|
||||
@@ -57,13 +57,13 @@ jobs:
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
${{ env.CONTAINER_RUNTIME }} build -t langflowai/langflow:latest-dev \
|
||||
${{ env.CONTAINER_RUNTIME }} build -t ghcr.io/hanzoai/flow:latest-dev \
|
||||
-f docker/build_and_push.Dockerfile \
|
||||
.
|
||||
- name: Test image
|
||||
run: |
|
||||
expected_version=$(cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
|
||||
version=$(${{ env.CONTAINER_RUNTIME }} run --rm --entrypoint bash langflowai/langflow:latest-dev -c "python -c 'from langflow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
|
||||
version=$(${{ env.CONTAINER_RUNTIME }} run --rm --entrypoint bash ghcr.io/hanzoai/flow:latest-dev -c "python -c 'from flow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
|
||||
if [ "$expected_version" != "$version" ]; then
|
||||
echo "Expected version: $expected_version"
|
||||
echo "Actual version: $version"
|
||||
@@ -72,14 +72,14 @@ jobs:
|
||||
|
||||
- name: Build backend image
|
||||
run: |
|
||||
${{ env.CONTAINER_RUNTIME }} build -t langflowai/langflow-backend:latest-dev \
|
||||
--build-arg LANGFLOW_IMAGE=langflowai/langflow:latest-dev \
|
||||
${{ env.CONTAINER_RUNTIME }} build -t ghcr.io/hanzoai/flow-backend:latest-dev \
|
||||
--build-arg LANGFLOW_IMAGE=ghcr.io/hanzoai/flow:latest-dev \
|
||||
-f docker/build_and_push_backend.Dockerfile \
|
||||
.
|
||||
- name: Test backend image
|
||||
run: |
|
||||
expected_version=$(cat src/backend/base/pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
|
||||
version=$(${{ env.CONTAINER_RUNTIME }} run --rm --entrypoint bash langflowai/langflow-backend:latest-dev -c "python -c 'from langflow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
|
||||
version=$(${{ env.CONTAINER_RUNTIME }} run --rm --entrypoint bash ghcr.io/hanzoai/flow-backend:latest-dev -c "python -c 'from flow.utils.version import get_version_info; print(get_version_info()[\"version\"])'")
|
||||
if [ "$expected_version" != "$version" ]; then
|
||||
echo "Expected version: $expected_version"
|
||||
echo "Actual version: $version"
|
||||
@@ -87,6 +87,6 @@ jobs:
|
||||
fi
|
||||
- name: Build frontend image
|
||||
run: |
|
||||
${{ env.CONTAINER_RUNTIME }} build -t langflowai/langflow-frontend:latest-dev \
|
||||
${{ env.CONTAINER_RUNTIME }} build -t ghcr.io/hanzoai/flow-frontend:latest-dev \
|
||||
-f docker/frontend/build_and_push_frontend.Dockerfile \
|
||||
.
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
if: steps.check_pull_request.outputs.pr_exists != 'true'
|
||||
run: |
|
||||
# Start the container in the background
|
||||
docker run -d --name langflow -p 7860:7860 langflowai/langflow:latest
|
||||
docker run -d --name langflow -p 7860:7860 ghcr.io/hanzoai/flow:latest
|
||||
|
||||
# Wait for the service to be ready (adjust timeout as needed)
|
||||
echo "Waiting for Langflow to start..."
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
exit 1
|
||||
|
||||
create-nightly-tag:
|
||||
if: github.repository == 'langflow-ai/langflow'
|
||||
if: github.repository == 'hanzoai/flow'
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -182,7 +182,7 @@ jobs:
|
||||
fi
|
||||
|
||||
build-hash-history:
|
||||
if: github.repository == 'langflow-ai/langflow'
|
||||
if: github.repository == 'hanzoai/flow'
|
||||
name: Build Nightly Hash History
|
||||
needs: create-nightly-tag
|
||||
runs-on: ubuntu-latest
|
||||
@@ -266,7 +266,7 @@ jobs:
|
||||
fi
|
||||
|
||||
frontend-tests:
|
||||
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_frontend_tests
|
||||
if: github.repository == 'hanzoai/flow' && !inputs.skip_frontend_tests
|
||||
name: Run Frontend Tests
|
||||
needs: create-nightly-tag
|
||||
uses: ./.github/workflows/typescript_test.yml
|
||||
@@ -281,7 +281,7 @@ jobs:
|
||||
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
|
||||
|
||||
backend-unit-tests:
|
||||
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_backend_tests
|
||||
if: github.repository == 'hanzoai/flow' && !inputs.skip_backend_tests
|
||||
name: Run Backend Unit Tests
|
||||
needs: create-nightly-tag
|
||||
uses: ./.github/workflows/python_test.yml
|
||||
@@ -294,7 +294,7 @@ jobs:
|
||||
|
||||
# Not making nightly builds dependent on integration test success
|
||||
# due to inherent flakiness of 3rd party integrations
|
||||
# Revisit when https://github.com/langflow-ai/langflow/pull/3607 is merged.
|
||||
# Revisit when https://github.com/hanzoai/flow/pull/3607 is merged.
|
||||
# backend-integration-tests:
|
||||
# name: Run Backend Integration Tests
|
||||
# needs: create-nightly-tag
|
||||
@@ -304,7 +304,7 @@ jobs:
|
||||
# ref: ${{ needs.create-nightly-tag.outputs.tag }}
|
||||
|
||||
release-nightly-build:
|
||||
if: github.repository == 'langflow-ai/langflow' && always() && needs.frontend-tests.result != 'failure' && needs.backend-unit-tests.result != 'failure' && needs.build-hash-history.result != 'failure'
|
||||
if: github.repository == 'hanzoai/flow' && always() && needs.frontend-tests.result != 'failure' && needs.backend-unit-tests.result != 'failure' && needs.build-hash-history.result != 'failure'
|
||||
name: Run Nightly Langflow Build
|
||||
needs: [create-nightly-tag, frontend-tests, backend-unit-tests, build-hash-history]
|
||||
uses: ./.github/workflows/release_nightly.yml
|
||||
@@ -324,7 +324,7 @@ jobs:
|
||||
slack-notification:
|
||||
name: Send Slack Notification
|
||||
needs: [frontend-tests, backend-unit-tests, release-nightly-build, merge-hash-history-to-main]
|
||||
if: ${{ github.repository == 'langflow-ai/langflow' && !inputs.skip_slack && always() && (needs.release-nightly-build.result == 'failure' || needs.frontend-tests.result == 'failure' || needs.backend-unit-tests.result == 'failure' || needs.merge-hash-history-to-main.result == 'failure' || needs.release-nightly-build.result == 'success') }}
|
||||
if: ${{ github.repository == 'hanzoai/flow' && !inputs.skip_slack && always() && (needs.release-nightly-build.result == 'failure' || needs.frontend-tests.result == 'failure' || needs.backend-unit-tests.result == 'failure' || needs.merge-hash-history-to-main.result == 'failure' || needs.release-nightly-build.result == 'success') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send failure notification to Slack
|
||||
@@ -383,7 +383,7 @@ jobs:
|
||||
# Run if auto_merge_hash_history is true (default) or not set (scheduled runs)
|
||||
# When triggered by schedule, inputs.auto_merge_hash_history is not set, so default to true
|
||||
# Only run when the base branch is 'main' to prevent PRs from feature branches
|
||||
if: github.repository == 'langflow-ai/langflow' && github.ref == 'refs/heads/main' && always() && needs.build-hash-history.result == 'success' && needs.release-nightly-build.result == 'success' && (github.event_name == 'schedule' || inputs.auto_merge_hash_history != false)
|
||||
if: github.repository == 'hanzoai/flow' && github.ref == 'refs/heads/main' && always() && needs.build-hash-history.result == 'success' && needs.release-nightly-build.result == 'success' && (github.event_name == 'schedule' || inputs.auto_merge_hash_history != false)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
+3
-3
@@ -31,10 +31,10 @@ COPY ./src/backend/base/pyproject.toml /app/src/backend/base/pyproject.toml
|
||||
COPY ./src/lfx/README.md /app/src/lfx/README.md
|
||||
COPY ./src/lfx/pyproject.toml /app/src/lfx/pyproject.toml
|
||||
|
||||
# Create placeholder for root hanzoflow package so uv can validate workspace.
|
||||
# Create placeholder for root flow package so uv can validate workspace.
|
||||
# (hatchling needs the package dir to exist; real source is copied after deps install)
|
||||
RUN mkdir -p /app/src/backend/hanzoflow && \
|
||||
touch /app/src/backend/hanzoflow/__init__.py
|
||||
RUN mkdir -p /app/src/backend/flow && \
|
||||
touch /app/src/backend/flow/__init__.py
|
||||
|
||||
# Install dependencies only (no workspace packages yet — source not copied).
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: all init format_backend format lint build run_backend dev help tests coverage clean_python_cache clean_npm_cache clean_frontend_build clean_all run_clic load_test_setup load_test_setup_basic load_test_list_flows load_test_run load_test_langflow_quick load_test_stress load_test_example load_test_clean load_test_remote_setup load_test_remote_run load_test_help docs docs_build docs_install
|
||||
.PHONY: all init format_backend format lint build run_backend dev help tests coverage clean_python_cache clean_npm_cache clean_frontend_build clean_all run_clic load_test_setup load_test_setup_basic load_test_list_flows load_test_run load_test_flow_quick load_test_stress load_test_example load_test_clean load_test_remote_setup load_test_remote_run load_test_help docs docs_build docs_install
|
||||
|
||||
# Configurations
|
||||
VERSION=$(shell grep "^version" pyproject.toml | sed 's/.*\"\(.*\)\"$$/\1/')
|
||||
@@ -18,7 +18,7 @@ host ?= 0.0.0.0
|
||||
port ?= 7860
|
||||
env ?= .env
|
||||
open_browser ?= true
|
||||
path = src/backend/base/hanzoflow/frontend
|
||||
path = src/backend/base/flow/frontend
|
||||
workers ?= 1
|
||||
async ?= true
|
||||
lf ?= false
|
||||
@@ -103,7 +103,7 @@ clean_python_cache:
|
||||
clean_npm_cache:
|
||||
@echo "Cleaning npm cache..."
|
||||
cd src/frontend && npm cache clean --force
|
||||
$(call CLEAR_DIRS,src/frontend/node_modules src/frontend/build src/backend/base/hanzoflow/frontend)
|
||||
$(call CLEAR_DIRS,src/frontend/node_modules src/frontend/build src/backend/base/flow/frontend)
|
||||
rm -f src/frontend/package-lock.json
|
||||
@echo "$(GREEN)NPM cache and frontend directories cleaned.$(NC)"
|
||||
|
||||
@@ -112,7 +112,7 @@ clean_frontend_build: ## clean frontend build artifacts to ensure fresh build
|
||||
@echo " - Removing src/frontend/build directory"
|
||||
$(call CLEAR_DIRS,src/frontend/build)
|
||||
@echo " - Removing built frontend files from backend"
|
||||
$(call CLEAR_DIRS,src/backend/base/langflow/frontend)
|
||||
$(call CLEAR_DIRS,src/backend/base/flow/frontend)
|
||||
@echo "$(GREEN)Frontend build artifacts cleaned - fresh build guaranteed.$(NC)"
|
||||
|
||||
clean_all: clean_python_cache clean_npm_cache # clean all caches and temporary directories
|
||||
@@ -229,13 +229,13 @@ unsafe_fix:
|
||||
@uv run ruff check . --fix --unsafe-fixes
|
||||
|
||||
lint: install_backend ## run linters
|
||||
@uv run mypy --namespace-packages -p "hanzoflow"
|
||||
@uv run mypy --namespace-packages -p "flow"
|
||||
|
||||
|
||||
|
||||
run_clic: clean_frontend_build install_frontend install_backend build_frontend ## run the CLI with fresh frontend build
|
||||
@echo 'Running the CLI with fresh frontend build'
|
||||
@uv run langflow run \
|
||||
@uv run hanzo-flow run \
|
||||
--frontend-path $(path) \
|
||||
--log-level $(log_level) \
|
||||
--host $(host) \
|
||||
@@ -245,7 +245,7 @@ run_clic: clean_frontend_build install_frontend install_backend build_frontend #
|
||||
|
||||
run_cli: install_frontend install_backend build_frontend ## run the CLI quickly (without cleaning build cache)
|
||||
@echo 'Running the CLI quickly (reusing existing build cache if available)'
|
||||
@uv run langflow run \
|
||||
@uv run hanzo-flow run \
|
||||
--frontend-path $(path) \
|
||||
--log-level $(log_level) \
|
||||
--host $(host) \
|
||||
@@ -271,7 +271,7 @@ setup_devcontainer: ## set up the development container
|
||||
make install_backend
|
||||
make install_frontend
|
||||
make build_frontend
|
||||
uv run hanzoflow --frontend-path src/frontend/build
|
||||
uv run hanzo-flow --frontend-path src/frontend/build
|
||||
|
||||
setup_env: ## set up the environment
|
||||
@sh ./scripts/setup/setup_env.sh
|
||||
@@ -283,8 +283,8 @@ backend: setup_env install_backend ## run the backend in development mode
|
||||
@-kill -9 $$(lsof -t -i:7860) || true
|
||||
ifdef login
|
||||
@echo "Running backend autologin is $(login)";
|
||||
HANZOFLOW_AUTO_LOGIN=$(login) uv run uvicorn \
|
||||
--factory hanzoflow.main:create_app \
|
||||
FLOW_AUTO_LOGIN=$(login) uv run uvicorn \
|
||||
--factory flow.main:create_app \
|
||||
--host 0.0.0.0 \
|
||||
--port $(port) \
|
||||
$(if $(filter-out 1,$(workers)),, --reload) \
|
||||
@@ -294,7 +294,7 @@ ifdef login
|
||||
else
|
||||
@echo "Running backend respecting the $(env) file";
|
||||
uv run uvicorn \
|
||||
--factory hanzoflow.main:create_app \
|
||||
--factory flow.main:create_app \
|
||||
--host 0.0.0.0 \
|
||||
--port $(port) \
|
||||
$(if $(filter-out 1,$(workers)),, --reload) \
|
||||
@@ -307,7 +307,7 @@ build_and_run: setup_env ## build the project and run it
|
||||
$(call CLEAR_DIRS,dist src/backend/base/dist)
|
||||
make build
|
||||
uv run pip install dist/*.tar.gz
|
||||
uv run hanzoflow run
|
||||
uv run hanzo-flow run
|
||||
|
||||
build_and_install: ## build the project and install it
|
||||
@echo 'Removing dist folder'
|
||||
@@ -318,29 +318,29 @@ build: setup_env ## build the frontend static files and package the project
|
||||
ifdef base
|
||||
make install_frontendci
|
||||
make build_frontend
|
||||
make build_hanzoflow_base args="$(args)"
|
||||
make build_flow_base args="$(args)"
|
||||
endif
|
||||
|
||||
ifdef main
|
||||
make install_frontendci
|
||||
make build_frontend
|
||||
make build_hanzoflow_base args="$(args)"
|
||||
make build_hanzoflow args="$(args)"
|
||||
make build_flow_base args="$(args)"
|
||||
make build_flow args="$(args)"
|
||||
endif
|
||||
|
||||
ifdef pre
|
||||
make install_frontendci
|
||||
make build_frontend
|
||||
make build_langflow args="$(args)"
|
||||
make build_flow args="$(args)"
|
||||
endif
|
||||
|
||||
build_langflow_base:
|
||||
build_flow_base:
|
||||
cd src/backend/base && uv build $(args)
|
||||
|
||||
build_hanzoflow_backup:
|
||||
build_flow_backup:
|
||||
uv lock && uv build
|
||||
|
||||
build_hanzoflow:
|
||||
build_flow:
|
||||
uv lock --no-upgrade
|
||||
uv build $(args)
|
||||
ifdef restore
|
||||
@@ -360,23 +360,23 @@ dockerfile_build:
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
-f ${DOCKERFILE} \
|
||||
-t hanzoflow:${VERSION} .
|
||||
-t flow:${VERSION} .
|
||||
|
||||
dockerfile_build_be: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE BACKEND: ${DOCKERFILE_BACKEND}'
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build_backend DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
--build-arg FLOW_IMAGE=flow:${VERSION} \
|
||||
-f ${DOCKERFILE_BACKEND} \
|
||||
-t hanzoflow_backend:${VERSION} .
|
||||
-t flow_backend:${VERSION} .
|
||||
|
||||
dockerfile_build_fe: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE FRONTEND: ${DOCKERFILE_FRONTEND}'
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build_frontend DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
--build-arg FLOW_IMAGE=flow:${VERSION} \
|
||||
-f ${DOCKERFILE_FRONTEND} \
|
||||
-t hanzoflow_frontend:${VERSION} .
|
||||
-t flow_frontend:${VERSION} .
|
||||
|
||||
clear_dockerimage:
|
||||
@echo 'Clearing the docker build'
|
||||
@@ -400,7 +400,7 @@ dcdev_up:
|
||||
lock_base:
|
||||
cd src/backend/base && uv lock
|
||||
|
||||
lock_hanzoflow:
|
||||
lock_flow:
|
||||
uv lock
|
||||
|
||||
lock: ## lock dependencies
|
||||
@@ -416,14 +416,14 @@ update: ## update dependencies
|
||||
publish_base:
|
||||
cd src/backend/base && uv publish
|
||||
|
||||
publish_hanzoflow:
|
||||
publish_flow:
|
||||
uv publish
|
||||
|
||||
publish_base_testpypi:
|
||||
# TODO: update this to use the test-pypi repository
|
||||
cd src/backend/base && uv publish -r test-pypi
|
||||
|
||||
publish_hanzoflow_testpypi:
|
||||
publish_flow_testpypi:
|
||||
# TODO: update this to use the test-pypi repository
|
||||
uv publish -r test-pypi
|
||||
|
||||
@@ -434,7 +434,7 @@ ifdef base
|
||||
endif
|
||||
|
||||
ifdef main
|
||||
make publish_hanzoflow
|
||||
make publish_flow
|
||||
endif
|
||||
|
||||
publish_testpypi: ## build the frontend static files and package the project and publish it to PyPI
|
||||
@@ -494,32 +494,32 @@ lfx_docker_test: ## run LFX tests in Docker
|
||||
# example make alembic-revision message="Add user table"
|
||||
alembic-revision: ## generate a new migration
|
||||
@echo 'Generating a new Alembic revision'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic revision --autogenerate -m "$(message)"
|
||||
cd src/backend/base/flow/ && uv run alembic revision --autogenerate -m "$(message)"
|
||||
|
||||
|
||||
alembic-upgrade: ## upgrade database to the latest version
|
||||
@echo 'Upgrading database to the latest version'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic upgrade head
|
||||
cd src/backend/base/flow/ && uv run alembic upgrade head
|
||||
|
||||
alembic-downgrade: ## downgrade database by one version
|
||||
@echo 'Downgrading database by one version'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic downgrade -1
|
||||
cd src/backend/base/flow/ && uv run alembic downgrade -1
|
||||
|
||||
alembic-current: ## show current revision
|
||||
@echo 'Showing current Alembic revision'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic current
|
||||
cd src/backend/base/flow/ && uv run alembic current
|
||||
|
||||
alembic-history: ## show migration history
|
||||
@echo 'Showing Alembic migration history'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic history --verbose
|
||||
cd src/backend/base/flow/ && uv run alembic history --verbose
|
||||
|
||||
alembic-check: ## check migration status
|
||||
@echo 'Running alembic check'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic check
|
||||
cd src/backend/base/flow/ && uv run alembic check
|
||||
|
||||
alembic-stamp: ## stamp the database with a specific revision
|
||||
@echo 'Stamping the database with revision $(revision)'
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic stamp $(revision)
|
||||
cd src/backend/base/flow/ && uv run alembic stamp $(revision)
|
||||
|
||||
######################
|
||||
# VERSION MANAGEMENT
|
||||
@@ -613,7 +613,7 @@ locust: ## run locust load tests (options: locust_users=10 locust_spawn_rate=1 l
|
||||
@echo "Using locustfile: $(locust_file)"
|
||||
@export API_KEY=$(locust_api_key) && \
|
||||
export FLOW_ID=$(locust_flow_id) && \
|
||||
export HANZOFLOW_HOST=$(locust_host) && \
|
||||
export FLOW_HOST=$(locust_host) && \
|
||||
export MIN_WAIT=$(locust_min_wait) && \
|
||||
export MAX_WAIT=$(locust_max_wait) && \
|
||||
export REQUEST_TIMEOUT=$(locust_request_timeout) && \
|
||||
@@ -715,14 +715,14 @@ load_test_run: ## Run load test (automatically sets up if needed). Use FLOW_NAME
|
||||
export FLOW_ID=$$(python -c "import json; print(json.load(open('load_test_creds.json'))['flow_id'])") && \
|
||||
uv run python langflow_run_load_test.py --headless --users 20 --duration 120 --no-start-langflow --html load_test_report.html --csv load_test_results
|
||||
|
||||
load_test_langflow_quick: ## Quick Langflow load test (10 users, 30s) with HTML report (automatically sets up if needed). Use FLOW_NAME="Flow Name" to specify flow
|
||||
load_test_flow_quick: ## Quick Langflow load test (10 users, 30s) with HTML report (automatically sets up if needed). Use FLOW_NAME="Flow Name" to specify flow
|
||||
@echo "$(YELLOW)Running quick Langflow load test with HTML report$(NC)"
|
||||
@if [ ! -f "src/backend/tests/locust/load_test_creds.json" ]; then \
|
||||
echo "$(BLUE)No credentials found. Running automatic setup...$(NC)"; \
|
||||
if [ -z "$(FLOW_NAME)" ]; then \
|
||||
echo "$(CYAN)Available flows:$(NC)"; \
|
||||
cd src/backend/tests/locust && uv run python langflow_setup_test.py --list-flows; \
|
||||
echo "$(RED)Please specify a flow: make load_test_langflow_quick FLOW_NAME=\"Basic Prompting\"$(NC)"; \
|
||||
echo "$(RED)Please specify a flow: make load_test_flow_quick FLOW_NAME=\"Basic Prompting\"$(NC)"; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo "$(BLUE)Setting up with flow: $(FLOW_NAME)$(NC)"; \
|
||||
@@ -791,7 +791,7 @@ load_test_help: ## Show detailed load testing help
|
||||
@echo ""
|
||||
@echo "$(YELLOW)Quick Start (Local):$(NC)"
|
||||
@echo " 1. make load_test_setup_basic # Set up with Basic Prompting flow"
|
||||
@echo " 2. make load_test_langflow_quick # Run quick Langflow test"
|
||||
@echo " 2. make load_test_flow_quick # Run quick Langflow test"
|
||||
@echo " 3. Open quick_test_report.html # View results"
|
||||
@echo ""
|
||||
@echo "$(YELLOW)Remote Testing:$(NC)"
|
||||
@@ -804,7 +804,7 @@ load_test_help: ## Show detailed load testing help
|
||||
@echo " load_test_setup_basic - Quick setup with Basic Prompting"
|
||||
@echo " load_test_list_flows - List available starter flows"
|
||||
@echo " load_test_run - Standard load test (25 users, 2 min)"
|
||||
@echo " load_test_langflow_quick - Quick Langflow test (10 users, 30s)"
|
||||
@echo " load_test_flow_quick - Quick Langflow test (10 users, 30s)"
|
||||
@echo " load_test_quick - Quick complex serve test (30 users, 60s)"
|
||||
@echo " load_test_stress - Stress test (100 users, 5 min)"
|
||||
@echo " load_test_example - Complete example workflow"
|
||||
@@ -861,7 +861,7 @@ help_backend: ## show backend-specific commands
|
||||
@echo " $(GREEN)make build$(NC) - Build the project"
|
||||
@echo " $(GREEN)make build_and_run$(NC) - Build and run the project"
|
||||
@echo " $(GREEN)make build_and_install$(NC) - Build and install the project"
|
||||
@echo " $(GREEN)make build_langflow_base$(NC) - Build langflow-base package"
|
||||
@echo " $(GREEN)make build_flow_base$(NC) - Build langflow-base package"
|
||||
@echo " $(GREEN)make build_langflow$(NC) - Build langflow package"
|
||||
@echo " $(GREEN)make lock$(NC) - Lock dependencies"
|
||||
@echo " $(GREEN)make update$(NC) - Update dependencies"
|
||||
@@ -977,7 +977,7 @@ help_advanced: ## show advanced and miscellaneous commands
|
||||
@echo " $(GREEN)make publish$(NC) - Publish to PyPI (use: make publish base=1 or main=1)"
|
||||
@echo " $(GREEN)make publish_testpypi$(NC) - Publish to test PyPI"
|
||||
@echo " $(GREEN)make publish_base$(NC) - Publish langflow-base to PyPI"
|
||||
@echo " $(GREEN)make publish_langflow$(NC) - Publish langflow to PyPI"
|
||||
@echo " $(GREEN)make publish_flow$(NC) - Publish langflow to PyPI"
|
||||
@echo " $(GREEN)make lfx_publish$(NC) - Publish LFX package to PyPI"
|
||||
@echo " $(GREEN)make lfx_publish_testpypi$(NC) - Publish LFX to test PyPI"
|
||||
@echo ''
|
||||
|
||||
+2
-2
@@ -89,14 +89,14 @@ component_management:
|
||||
- component_id: backend_components
|
||||
name: "Backend Components"
|
||||
paths:
|
||||
- src/backend/base/langflow/components/**
|
||||
- src/backend/base/flow/components/**
|
||||
# Note: Many components excluded by .coveragerc (bundled + legacy)
|
||||
# This tracks coverage of remaining "core" components only
|
||||
|
||||
# Files/directories to exclude from coverage calculations
|
||||
ignore:
|
||||
# Database migrations - infrastructure code, not business logic
|
||||
- "src/backend/base/langflow/alembic/**"
|
||||
- "src/backend/base/flow/alembic/**"
|
||||
# Test files themselves don't need coverage
|
||||
- "src/backend/tests/**"
|
||||
- "src/frontend/tests/**"
|
||||
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
- traefik.http.routers.${STACK_NAME?Variable not set}-proxy-http.middlewares=${STACK_NAME?Variable not set}-www-redirect,${STACK_NAME?Variable not set}-https-redirect
|
||||
|
||||
backend: &backend
|
||||
image: "hanzoflowai/hanzoflow-backend:latest"
|
||||
image: "ghcr.io/hanzoai/flow-backend:latest"
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
@@ -134,7 +134,7 @@ services:
|
||||
<<: *backend
|
||||
env_file:
|
||||
- .env
|
||||
command: /bin/sh -c "python -m celery -A hanzoflow.worker.celery_app worker --loglevel=INFO --concurrency=1 -n lf-worker@%h -P eventlet"
|
||||
command: /bin/sh -c "python -m celery -A flow.worker.celery_app worker --loglevel=INFO --concurrency=1 -n lf-worker@%h -P eventlet"
|
||||
healthcheck:
|
||||
test: "exit 0"
|
||||
deploy:
|
||||
@@ -149,7 +149,7 @@ services:
|
||||
environment:
|
||||
- FLOWER_PORT=5555
|
||||
|
||||
command: /bin/sh -c "python -m celery -A hanzoflow.worker.celery_app --broker=${BROKER_URL?Variable not set} flower --port=5555"
|
||||
command: /bin/sh -c "python -m celery -A flow.worker.celery_app --broker=${BROKER_URL?Variable not set} flower --port=5555"
|
||||
deploy:
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
@@ -165,7 +165,7 @@ services:
|
||||
- traefik.http.services.${STACK_NAME?Variable not set}-flower.loadbalancer.server.port=5555
|
||||
|
||||
frontend:
|
||||
image: "hanzoflowai/hanzoflow-frontend:latest"
|
||||
image: "ghcr.io/hanzoai/flow-frontend:latest"
|
||||
env_file:
|
||||
- .env
|
||||
restart: on-failure
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM hanzoflowai/hanzoflow:latest
|
||||
FROM ghcr.io/hanzoai/flow:latest
|
||||
|
||||
CMD ["python", "-m", "hanzoflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
CMD ["python", "-m", "flow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
flow:
|
||||
image: ghcr.io/hanzoai/flow:latest # or another version tag on https://hub.docker.com/r/ghcr.io/hanzoai/flow
|
||||
pull_policy: always # set to 'always' when using 'latest' image
|
||||
ports:
|
||||
- "7860:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://flow:flow@postgres:5432/flow
|
||||
# This variable defines where the logs, file storage, monitor data and secret keys are stored.
|
||||
- LANGFLOW_CONFIG_DIR=/app/flow
|
||||
volumes:
|
||||
- flow-data:/app/flow
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: flow
|
||||
POSTGRES_PASSWORD: flow
|
||||
POSTGRES_DB: flow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- flow-postgres:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
flow-postgres:
|
||||
flow-data:
|
||||
@@ -1,29 +0,0 @@
|
||||
services:
|
||||
hanzoflow:
|
||||
image: hanzoflowai/hanzoflow:latest # or another version tag on https://hub.docker.com/r/hanzoflowai/hanzoflow
|
||||
pull_policy: always # set to 'always' when using 'latest' image
|
||||
ports:
|
||||
- "7860:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://hanzoflow:hanzoflow@postgres:5432/hanzoflow
|
||||
# This variable defines where the logs, file storage, monitor data and secret keys are stored.
|
||||
- HANZOFLOW_CONFIG_DIR=/app/hanzoflow
|
||||
volumes:
|
||||
- hanzoflow-data:/app/hanzoflow
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: hanzoflow
|
||||
POSTGRES_PASSWORD: hanzoflow
|
||||
POSTGRES_DB: hanzoflow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- hanzoflow-postgres:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
hanzoflow-postgres:
|
||||
hanzoflow-data:
|
||||
+13
-14
@@ -69,7 +69,6 @@ dev = [
|
||||
|
||||
[tool.uv.sources]
|
||||
langflow-base = { workspace = true }
|
||||
langflow = { workspace = true }
|
||||
lfx = { workspace = true }
|
||||
|
||||
[tool.uv.workspace]
|
||||
@@ -80,7 +79,7 @@ members = [
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/backend/hanzoflow"]
|
||||
packages = ["src/backend/flow"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/hanzoai/flow"
|
||||
@@ -137,7 +136,7 @@ override-dependencies = [
|
||||
|
||||
|
||||
[project.scripts]
|
||||
hanzo-flow = "langflow.langflow_launcher:main"
|
||||
hanzo-flow = "flow.launcher:main"
|
||||
|
||||
[tool.codespell]
|
||||
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,*.trig.,**/node_modules/**,./stuff/*,*.csv'
|
||||
@@ -174,7 +173,7 @@ command_line = """
|
||||
--cov --cov-report=term --cov-report=html
|
||||
--instafail -ra -n auto -m "not api_key_required"
|
||||
"""
|
||||
source = ["src/backend/base/hanzoflow/"]
|
||||
source = ["src/backend/base/flow/"]
|
||||
omit = ["*/alembic/*", "tests/*", "*/__init__.py"]
|
||||
|
||||
|
||||
@@ -191,7 +190,7 @@ directory = "coverage"
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py310"
|
||||
exclude = ["src/backend/base/langflow/alembic/*", "src/frontend/tests/assets/*", "src/lfx/src/lfx/_assets/component_index.json"]
|
||||
exclude = ["src/backend/base/flow/alembic/*", "src/frontend/tests/assets/*", "src/lfx/src/lfx/_assets/component_index.json"]
|
||||
line-length = 120
|
||||
|
||||
[tool.ruff.lint]
|
||||
@@ -234,23 +233,23 @@ external = ["RUF027"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"scripts/*" = ["D1", "INP", "T201"]
|
||||
"src/backend/base/langflow/alembic/versions/*" = ["INP001", "D415", "PGH003"]
|
||||
"src/backend/base/langflow/custom/__init__.py" = [
|
||||
"src/backend/base/flow/alembic/versions/*" = ["INP001", "D415", "PGH003"]
|
||||
"src/backend/base/flow/custom/__init__.py" = [
|
||||
"I001", # Import order affects initialization - must import custom module first
|
||||
]
|
||||
"src/backend/base/langflow/api/v1/*" = [
|
||||
"src/backend/base/flow/api/v1/*" = [
|
||||
"TCH", # FastAPI needs to evaluate types at runtime
|
||||
]
|
||||
"src/backend/base/langflow/api/v2/*" = [
|
||||
"src/backend/base/flow/api/v2/*" = [
|
||||
"TCH", # FastAPI needs to evaluate types at runtime
|
||||
]
|
||||
"src/backend/base/langflow/__main__.py" = [
|
||||
"src/backend/base/flow/__main__.py" = [
|
||||
"B008", # Typer CLI requires function calls in defaults
|
||||
]
|
||||
"src/backend/base/langflow/services/cache/*" = [
|
||||
"src/backend/base/flow/services/cache/*" = [
|
||||
"S301", # Pickle usage is intentional for caching
|
||||
]
|
||||
"src/backend/base/langflow/services/tracing/*" = [
|
||||
"src/backend/base/flow/services/tracing/*" = [
|
||||
"SLF001", # Third-party library private member access (langwatch, opik)
|
||||
]
|
||||
"src/lfx/src/lfx/base/curl/parse.py" = [
|
||||
@@ -325,7 +324,7 @@ external = ["RUF027"]
|
||||
"SLF001",
|
||||
"BLE001", # allow broad-exception catching in tests
|
||||
]
|
||||
"src/backend/base/langflow/tests/*" = [
|
||||
"src/backend/base/flow/tests/*" = [
|
||||
"D1",
|
||||
"PLR2004",
|
||||
"S101",
|
||||
@@ -378,7 +377,7 @@ plugins = ["pydantic.mypy"]
|
||||
follow_imports = "skip"
|
||||
disable_error_code = ["type-var"]
|
||||
namespace_packages = true
|
||||
mypy_path = "hanzoflow"
|
||||
mypy_path = "flow"
|
||||
ignore_missing_imports = true
|
||||
|
||||
[build-system]
|
||||
|
||||
@@ -8,10 +8,10 @@ import requests
|
||||
from packaging.version import Version
|
||||
|
||||
PYPI_HANZOFLOW_URL = "https://pypi.org/pypi/hanzoflow/json"
|
||||
PYPI_HANZOFLOW_NIGHTLY_URL = "https://pypi.org/pypi/hanzoflow-nightly/json"
|
||||
PYPI_HANZOFLOW_NIGHTLY_URL = "https://pypi.org/pypi/flow-nightly/json"
|
||||
|
||||
PYPI_HANZOFLOW_BASE_URL = "https://pypi.org/pypi/hanzoflow-base/json"
|
||||
PYPI_HANZOFLOW_BASE_NIGHTLY_URL = "https://pypi.org/pypi/hanzoflow-base-nightly/json"
|
||||
PYPI_HANZOFLOW_BASE_URL = "https://pypi.org/pypi/flow-base/json"
|
||||
PYPI_HANZOFLOW_BASE_NIGHTLY_URL = "https://pypi.org/pypi/flow-base-nightly/json"
|
||||
|
||||
ARGUMENT_NUMBER = 2
|
||||
|
||||
|
||||
@@ -11,24 +11,24 @@ ARGUMENT_NUMBER = 3
|
||||
|
||||
|
||||
def update_base_dep(pyproject_path: str, new_version: str) -> None:
|
||||
"""Update the hanzoflow-base dependency in pyproject.toml."""
|
||||
"""Update the flow-base dependency in pyproject.toml."""
|
||||
filepath = BASE_DIR / pyproject_path
|
||||
content = filepath.read_text(encoding="utf-8")
|
||||
|
||||
# Updated pattern to handle PEP 440 version suffixes, extras (e.g., [complete]),
|
||||
# both ~= and == version specifiers, and both langflow-base and langflow-base-nightly names
|
||||
# both ~= and == version specifiers, and both flow-base and flow-base-nightly names
|
||||
# Captures extras in group 2 to preserve them in the replacement
|
||||
pattern = re.compile(r'("langflow-base(?:-nightly)?((?:\[[^\]]+\])?)(?:~=|==)[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")')
|
||||
pattern = re.compile(r'("flow-base(?:-nightly)?((?:\[[^\]]+\])?)(?:~=|==)[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")')
|
||||
|
||||
# Check if the pattern is found
|
||||
match = pattern.search(content)
|
||||
if not match:
|
||||
msg = f'langflow-base dependency not found in "{filepath}"'
|
||||
msg = f'flow-base dependency not found in "{filepath}"'
|
||||
raise ValueError(msg)
|
||||
|
||||
# Extract extras if present (e.g., "[complete]")
|
||||
extras = match.group(2) if match.group(2) else ""
|
||||
replacement = f'"langflow-base-nightly{extras}=={new_version}"'
|
||||
replacement = f'"flow-base-nightly{extras}=={new_version}"'
|
||||
|
||||
# Replace the matched pattern with the new one
|
||||
content = pattern.sub(replacement, content)
|
||||
@@ -36,7 +36,7 @@ def update_base_dep(pyproject_path: str, new_version: str) -> None:
|
||||
|
||||
|
||||
def update_lfx_dep_in_base(pyproject_path: str, lfx_version: str) -> None:
|
||||
"""Update the LFX dependency in langflow-base pyproject.toml to use nightly version."""
|
||||
"""Update the LFX dependency in flow-base pyproject.toml to use nightly version."""
|
||||
filepath = BASE_DIR / pyproject_path
|
||||
content = filepath.read_text(encoding="utf-8")
|
||||
|
||||
@@ -77,10 +77,10 @@ def main() -> None:
|
||||
verify_pep440(base_version)
|
||||
verify_pep440(lfx_version)
|
||||
|
||||
# Update langflow-base dependency in main project
|
||||
# Update flow-base dependency in main project
|
||||
update_base_dep("pyproject.toml", base_version)
|
||||
|
||||
# Update LFX dependency in langflow-base
|
||||
# Update LFX dependency in flow-base
|
||||
update_lfx_dep_in_base("src/backend/base/pyproject.toml", lfx_version)
|
||||
|
||||
|
||||
|
||||
@@ -37,17 +37,17 @@ def main():
|
||||
lfx_tag = sys.argv[4]
|
||||
|
||||
# First handle base package updates
|
||||
update_pyproject_name("src/backend/base/pyproject.toml", "hanzoflow-base-nightly")
|
||||
update_name_uv_dep("pyproject.toml", "hanzoflow-base-nightly")
|
||||
update_pyproject_name("src/backend/base/pyproject.toml", "flow-base-nightly")
|
||||
update_name_uv_dep("pyproject.toml", "flow-base-nightly")
|
||||
update_pyproject_version("src/backend/base/pyproject.toml", base_tag)
|
||||
|
||||
# Update LFX dependency in langflow-base
|
||||
# Update LFX dependency in flow-base
|
||||
lfx_version = lfx_tag.lstrip("v")
|
||||
update_lfx_dep_in_base("src/backend/base/pyproject.toml", lfx_version)
|
||||
|
||||
# Then handle main package updates
|
||||
update_pyproject_name("pyproject.toml", "hanzoflow-nightly")
|
||||
update_name_uv_dep("pyproject.toml", "hanzoflow-nightly")
|
||||
update_pyproject_name("pyproject.toml", "flow-nightly")
|
||||
update_name_uv_dep("pyproject.toml", "flow-nightly")
|
||||
update_pyproject_version("pyproject.toml", main_tag)
|
||||
# Update dependency version (strip 'v' prefix if present)
|
||||
base_version = base_tag.lstrip("v")
|
||||
|
||||
@@ -22,27 +22,27 @@ def update_pyproject_name(pyproject_path: str, new_project_name: str) -> None:
|
||||
content = pattern.sub(new_project_name, content)
|
||||
|
||||
# Update extra references in [complete] and [all] extras for nightly builds
|
||||
if new_project_name == "langflow-base-nightly":
|
||||
# Replace langflow-base[extra] with langflow-base-nightly[extra] in optional dependencies
|
||||
content = re.sub(r'"langflow-base\[([^\]]+)\]"', r'"langflow-base-nightly[\1]"', content)
|
||||
elif new_project_name == "langflow-nightly":
|
||||
# Replace langflow[extra] with langflow-nightly[extra] in optional dependencies
|
||||
content = re.sub(r'"langflow\[([^\]]+)\]"', r'"langflow-nightly[\1]"', content)
|
||||
if new_project_name == "flow-base-nightly":
|
||||
# Replace flow-base[extra] with flow-base-nightly[extra] in optional dependencies
|
||||
content = re.sub(r'"flow-base\[([^\]]+)\]"', r'"flow-base-nightly[\1]"', content)
|
||||
elif new_project_name == "flow-nightly":
|
||||
# Replace langflow[extra] with flow-nightly[extra] in optional dependencies
|
||||
content = re.sub(r'"langflow\[([^\]]+)\]"', r'"flow-nightly[\1]"', content)
|
||||
|
||||
filepath.write_text(content, encoding="utf-8")
|
||||
|
||||
|
||||
def update_uv_dep(pyproject_path: str, new_project_name: str) -> None:
|
||||
"""Update the hanzoflow-base dependency in pyproject.toml."""
|
||||
"""Update the flow-base dependency in pyproject.toml."""
|
||||
filepath = BASE_DIR / pyproject_path
|
||||
content = filepath.read_text(encoding="utf-8")
|
||||
|
||||
if new_project_name == "hanzoflow-nightly":
|
||||
pattern = re.compile(r"hanzoflow = \{ workspace = true \}")
|
||||
replacement = "hanzoflow-nightly = { workspace = true }"
|
||||
elif new_project_name == "hanzoflow-base-nightly":
|
||||
pattern = re.compile(r"hanzoflow-base = \{ workspace = true \}")
|
||||
replacement = "hanzoflow-base-nightly = { workspace = true }"
|
||||
if new_project_name == "flow-nightly":
|
||||
pattern = re.compile(r"flow = \{ workspace = true \}")
|
||||
replacement = "flow-nightly = { workspace = true }"
|
||||
elif new_project_name == "flow-base-nightly":
|
||||
pattern = re.compile(r"flow-base = \{ workspace = true \}")
|
||||
replacement = "flow-base-nightly = { workspace = true }"
|
||||
else:
|
||||
msg = f"Invalid project name: {new_project_name}"
|
||||
raise ValueError(msg)
|
||||
@@ -57,7 +57,7 @@ def update_uv_dep(pyproject_path: str, new_project_name: str) -> None:
|
||||
|
||||
def main() -> None:
|
||||
if len(sys.argv) != ARGUMENT_NUMBER:
|
||||
msg = "Must specify project name and build type, e.g. hanzoflow-nightly base"
|
||||
msg = "Must specify project name and build type, e.g. flow-nightly base"
|
||||
raise ValueError(msg)
|
||||
new_project_name = sys.argv[1]
|
||||
build_type = sys.argv[2]
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
import hanzoflow.main # noqa: F401
|
||||
from hanzoflow.initial_setup.setup import (
|
||||
import flow.main # noqa: F401
|
||||
from flow.initial_setup.setup import (
|
||||
get_project_data,
|
||||
load_starter_projects,
|
||||
update_edges_with_latest_component_versions,
|
||||
update_project_file,
|
||||
update_projects_components_with_latest_component_versions,
|
||||
)
|
||||
from langflow.services.utils import initialize_services
|
||||
from flow.services.utils import initialize_services
|
||||
from lfx.interface.components import get_and_cache_all_types_dict
|
||||
from lfx.services.deps import get_settings_service
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@ ARGUMENT_NUMBER = 2
|
||||
|
||||
|
||||
def update_uv_dep(base_version: str) -> None:
|
||||
"""Update the hanzoflow-base dependency in pyproject.toml."""
|
||||
"""Update the flow-base dependency in pyproject.toml."""
|
||||
pyproject_path = BASE_DIR / "pyproject.toml"
|
||||
|
||||
# Read the pyproject.toml file content
|
||||
content = pyproject_path.read_text(encoding="utf-8")
|
||||
|
||||
# For the main project, update the langflow-base dependency in the UV section
|
||||
# For the main project, update the flow-base dependency in the UV section
|
||||
# Updated pattern to handle PEP 440 version suffixes, extras (e.g., [complete]),
|
||||
# and both ~= and == version specifiers
|
||||
# Also handles both langflow-base and langflow-base-nightly names
|
||||
# Also handles both flow-base and flow-base-nightly names
|
||||
# Captures extras in group 3 to preserve them in the replacement
|
||||
pattern = re.compile(
|
||||
r'(dependencies\s*=\s*\[\s*\n\s*)("langflow-base(?:-nightly)?((?:\[[^\]]+\])?)(?:~=|==)[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")'
|
||||
r'(dependencies\s*=\s*\[\s*\n\s*)("flow-base(?:-nightly)?((?:\[[^\]]+\])?)(?:~=|==)[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")'
|
||||
)
|
||||
|
||||
# Check if the pattern is found
|
||||
@@ -32,7 +32,7 @@ def update_uv_dep(base_version: str) -> None:
|
||||
|
||||
# Extract extras if present (e.g., "[complete]")
|
||||
extras = match.group(3) if match.group(3) else ""
|
||||
replacement = rf'\1"langflow-base-nightly{extras}=={base_version}"'
|
||||
replacement = rf'\1"flow-base-nightly{extras}=={base_version}"'
|
||||
|
||||
# Replace the matched pattern with the new one
|
||||
content = pattern.sub(replacement, content)
|
||||
|
||||
@@ -81,7 +81,7 @@ def generate_coveragerc(bundle_names: set[str], legacy_files: set[str], output_p
|
||||
# Do not edit manually - changes will be overwritten
|
||||
|
||||
[run]
|
||||
source = src/backend/base/langflow
|
||||
source = src/backend/base/flow
|
||||
omit =
|
||||
# Test files
|
||||
*/tests/*
|
||||
@@ -142,7 +142,7 @@ def main():
|
||||
|
||||
# Paths
|
||||
frontend_path = project_root / "src" / "frontend"
|
||||
backend_components_path = project_root / "src" / "backend" / "base" / "langflow" / "components"
|
||||
backend_components_path = project_root / "src" / "backend" / "base" / "flow" / "components"
|
||||
output_path = project_root / "src" / "backend" / ".coveragerc"
|
||||
|
||||
print(f"Project root: {project_root}")
|
||||
@@ -161,7 +161,7 @@ def main():
|
||||
generate_coveragerc(bundle_names, legacy_files, output_path)
|
||||
|
||||
print("\nDone! You can now run backend tests with coverage using:")
|
||||
print("cd src/backend && python -m pytest --cov=src/backend/base/langflow --cov-config=.coveragerc")
|
||||
print("cd src/backend && python -m pytest --cov=src/backend/base/flow --cov-config=.coveragerc")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -26,7 +26,7 @@ def test_real_migration():
|
||||
|
||||
# Create alembic.ini
|
||||
alembic_cfg = Config()
|
||||
alembic_cfg.set_main_option("script_location", "src/backend/base/langflow/alembic")
|
||||
alembic_cfg.set_main_option("script_location", "src/backend/base/flow/alembic")
|
||||
alembic_cfg.set_main_option("sqlalchemy.url", f"sqlite:///{db_path}")
|
||||
|
||||
# Run migration
|
||||
|
||||
@@ -29,15 +29,15 @@ from rich.panel import Panel
|
||||
from rich.table import Table
|
||||
from sqlmodel import select
|
||||
|
||||
from langflow.cli.progress import create_langflow_progress
|
||||
from langflow.initial_setup.setup import get_or_create_default_folder
|
||||
from langflow.main import setup_app
|
||||
from langflow.services.auth.utils import get_current_user_from_access_token
|
||||
from langflow.services.database.models.api_key.crud import check_key
|
||||
from langflow.services.deps import get_db_service, get_settings_service, is_settings_service_initialized, session_scope
|
||||
from langflow.services.utils import initialize_services
|
||||
from langflow.utils.version import fetch_latest_version, get_version_info
|
||||
from langflow.utils.version import is_pre_release as langflow_is_pre_release
|
||||
from flow.cli.progress import create_flow_progress
|
||||
from flow.initial_setup.setup import get_or_create_default_folder
|
||||
from flow.main import setup_app
|
||||
from flow.services.auth.utils import get_current_user_from_access_token
|
||||
from flow.services.database.models.api_key.crud import check_key
|
||||
from flow.services.deps import get_db_service, get_settings_service, is_settings_service_initialized, session_scope
|
||||
from flow.services.utils import initialize_services
|
||||
from flow.utils.version import fetch_latest_version, get_version_info
|
||||
from flow.utils.version import is_pre_release as flow_is_pre_release
|
||||
|
||||
app = typer.Typer(no_args_is_help=True)
|
||||
console = Console()
|
||||
@@ -49,7 +49,7 @@ try:
|
||||
from lfx.cli.commands import serve_command
|
||||
from lfx.cli.run import run as lfx_run
|
||||
|
||||
lfx_app = typer.Typer(name="lfx", help="Langflow Executor commands")
|
||||
lfx_app = typer.Typer(name="lfx", help="Flow Executor commands")
|
||||
lfx_app.command(name="serve", help="Serve a flow as an API", no_args_is_help=True)(serve_command)
|
||||
lfx_app.command(name="run", help="Run a flow directly", no_args_is_help=True)(lfx_run)
|
||||
|
||||
@@ -266,7 +266,7 @@ def run(
|
||||
),
|
||||
ssl_key_file_path: str | None = typer.Option(None, help="Defines the SSL key file path.", show_default=False),
|
||||
) -> None:
|
||||
"""Run Langflow."""
|
||||
"""Run Flow."""
|
||||
if env_file:
|
||||
if is_settings_service_initialized():
|
||||
err = (
|
||||
@@ -286,9 +286,9 @@ def run(
|
||||
|
||||
# Create progress indicator (show verbose timing if log level is DEBUG)
|
||||
verbose = log_level == "debug"
|
||||
progress = create_langflow_progress(verbose=verbose)
|
||||
progress = create_flow_progress(verbose=verbose)
|
||||
|
||||
# Step 0: Initializing Langflow
|
||||
# Step 0: Initializing Flow
|
||||
with progress.step(0):
|
||||
logger.debug(f"Loading config from file: '{env_file}'" if env_file else "No env_file provided.")
|
||||
set_var_for_macos_issue()
|
||||
@@ -357,7 +357,7 @@ def run(
|
||||
with progress.step(5):
|
||||
pass # Starter projects are added during app startup
|
||||
|
||||
# Step 6: Launching Langflow
|
||||
# Step 6: Launching Flow
|
||||
if platform.system() == "Windows":
|
||||
with progress.step(6):
|
||||
import uvicorn
|
||||
@@ -368,7 +368,7 @@ def run(
|
||||
progress.print_summary()
|
||||
print_banner(str(host), int(port or 7860), protocol)
|
||||
|
||||
from langflow.helpers.windows_postgres_helper import LANGFLOW_DATABASE_URL, POSTGRESQL_PREFIXES
|
||||
from flow.helpers.windows_postgres_helper import LANGFLOW_DATABASE_URL, POSTGRESQL_PREFIXES
|
||||
|
||||
db_url = os.environ.get(LANGFLOW_DATABASE_URL, "")
|
||||
loop_type = "asyncio"
|
||||
@@ -390,8 +390,8 @@ def run(
|
||||
)
|
||||
else:
|
||||
with progress.step(6):
|
||||
# Use Gunicorn with LangflowUvicornWorker for non-Windows systems
|
||||
from langflow.server import LangflowApplication
|
||||
# Use Gunicorn with FlowUvicornWorker for non-Windows systems
|
||||
from flow.server import FlowApplication
|
||||
|
||||
options = {
|
||||
"bind": f"{host}:{port}",
|
||||
@@ -401,7 +401,7 @@ def run(
|
||||
"keyfile": ssl_key_file_path,
|
||||
"log_level": log_level.lower() if log_level is not None else "info",
|
||||
}
|
||||
server = LangflowApplication(app, options)
|
||||
server = FlowApplication(app, options)
|
||||
|
||||
# Start the webapp process
|
||||
process_manager.webapp_process = Process(target=server.run)
|
||||
@@ -544,13 +544,13 @@ def build_version_notice(current_version: str, package_name: str) -> str:
|
||||
The message will indicate if the newer version is a pre-release.
|
||||
|
||||
Example:
|
||||
>>> build_version_notice("1.0.0", "hanzoflow")
|
||||
>>> build_version_notice("1.0.0", "flow")
|
||||
'A new version of hanzoflow is available: 1.1.0'
|
||||
"""
|
||||
with suppress(httpx.ConnectError):
|
||||
latest_version = fetch_latest_version(package_name, include_prerelease=hanzoflow_is_pre_release(current_version))
|
||||
latest_version = fetch_latest_version(package_name, include_prerelease=flow_is_pre_release(current_version))
|
||||
if latest_version and pkg_version.parse(current_version) < pkg_version.parse(latest_version):
|
||||
release_type = "pre-release" if hanzoflow_is_pre_release(latest_version) else "version"
|
||||
release_type = "pre-release" if flow_is_pre_release(latest_version) else "version"
|
||||
return f"A new {release_type} of {package_name} is available: {latest_version}"
|
||||
return ""
|
||||
|
||||
@@ -578,11 +578,11 @@ def print_banner(host: str, port: int, protocol: str) -> None:
|
||||
|
||||
# Use hanzoflow.utils.version to get the version info
|
||||
version_info = get_version_info()
|
||||
hanzoflow_version = version_info["version"]
|
||||
flow_version = version_info["version"]
|
||||
package_name = version_info["package"]
|
||||
is_pre_release |= hanzoflow_is_pre_release(hanzoflow_version) # Update pre-release status
|
||||
is_pre_release |= flow_is_pre_release(flow_version) # Update pre-release status
|
||||
|
||||
notice = build_version_notice(hanzoflow_version, package_name)
|
||||
notice = build_version_notice(flow_version, package_name)
|
||||
|
||||
notice = stylize_text(notice, package_name, is_prerelease=is_pre_release)
|
||||
if notice:
|
||||
@@ -618,22 +618,22 @@ def print_banner(host: str, port: int, protocol: str) -> None:
|
||||
status_icon = "🟢"
|
||||
|
||||
info_text = (
|
||||
f"{github_icon} GitHub: Star for updates {arrow} https://github.com/langflow-ai/langflow\n"
|
||||
f"{github_icon} GitHub: Star for updates {arrow} https://github.com/hanzoai/flow\n"
|
||||
f"{discord_icon} Discord: Join for support {arrow} https://discord.com/invite/EqksyE2EX9"
|
||||
)
|
||||
telemetry_text = (
|
||||
(
|
||||
"We collect anonymous usage data to improve Langflow.\n"
|
||||
"We collect anonymous usage data to improve Flow.\n"
|
||||
"To opt out, set: [bold]DO_NOT_TRACK=true[/bold] in your environment."
|
||||
)
|
||||
if os.getenv("DO_NOT_TRACK", os.getenv("LANGFLOW_DO_NOT_TRACK", "False")).lower() != "true"
|
||||
else (
|
||||
"We are [bold]not[/bold] collecting anonymous usage data to improve Langflow.\n"
|
||||
"We are [bold]not[/bold] collecting anonymous usage data to improve Flow.\n"
|
||||
"To contribute, set: [bold]DO_NOT_TRACK=false[/bold] in your environment."
|
||||
)
|
||||
)
|
||||
access_host = get_best_access_host(host, port)
|
||||
access_link = f"[bold]{status_icon} Open Langflow {arrow}[/bold] [link={protocol}://{access_host}:{port}]{protocol}://{access_host}:{port}[/link]"
|
||||
access_link = f"[bold]{status_icon} Open Flow {arrow}[/bold] [link={protocol}://{access_host}:{port}]{protocol}://{access_host}:{port}[/link]"
|
||||
|
||||
message = f"{title}\n{info_text}\n\n{telemetry_text}\n\n{access_link}"
|
||||
|
||||
@@ -645,10 +645,10 @@ def print_banner(host: str, port: int, protocol: str) -> None:
|
||||
# Fallback to a simpler banner without emojis for Windows systems with encoding issues
|
||||
fallback_message = (
|
||||
f"Welcome to {package_name}\n\n"
|
||||
"* GitHub: https://github.com/langflow-ai/langflow\n"
|
||||
"* GitHub: https://github.com/hanzoai/flow\n"
|
||||
"# Discord: https://discord.com/invite/EqksyE2EX9\n\n"
|
||||
f"{telemetry_text}\n\n"
|
||||
f"[OK] Open Langflow -> {protocol}://{access_host}:{port}"
|
||||
f"[OK] Open Flow -> {protocol}://{access_host}:{port}"
|
||||
)
|
||||
try:
|
||||
console.print() # Add line break before fallback banner
|
||||
@@ -656,9 +656,9 @@ def print_banner(host: str, port: int, protocol: str) -> None:
|
||||
except UnicodeEncodeError:
|
||||
# Last resort: use logger instead of print
|
||||
logger.info(f"Welcome to {package_name}")
|
||||
logger.info("GitHub: https://github.com/langflow-ai/langflow")
|
||||
logger.info("GitHub: https://github.com/hanzoai/flow")
|
||||
logger.info("Discord: https://discord.com/invite/EqksyE2EX9")
|
||||
logger.info(f"Open Langflow: {protocol}://{access_host}:{port}")
|
||||
logger.info(f"Open Flow: {protocol}://{access_host}:{port}")
|
||||
|
||||
|
||||
@app.command()
|
||||
@@ -706,7 +706,7 @@ async def _create_superuser(username: str, password: str, auth_token: str | None
|
||||
if not password:
|
||||
password = typer.prompt("Password", hide_input=True)
|
||||
|
||||
from langflow.services.database.models.user.crud import get_all_superusers
|
||||
from flow.services.database.models.user.crud import get_all_superusers
|
||||
|
||||
existing_superusers = []
|
||||
async with session_scope() as session:
|
||||
@@ -766,12 +766,12 @@ async def _create_superuser(username: str, password: str, auth_token: str | None
|
||||
|
||||
# Auth complete, create the superuser
|
||||
async with session_scope() as session:
|
||||
from langflow.services.deps import get_auth_service
|
||||
from flow.services.deps import get_auth_service
|
||||
|
||||
auth = get_auth_service()
|
||||
if await auth.create_super_user(username, password, db=session):
|
||||
# Verify that the superuser was created
|
||||
from langflow.services.database.models.user.model import User
|
||||
from flow.services.database.models.user.model import User
|
||||
|
||||
stmt = select(User).where(User.username == username)
|
||||
created_user: User = (await session.exec(stmt)).first()
|
||||
@@ -804,7 +804,7 @@ async def _create_superuser(username: str, password: str, auth_token: str | None
|
||||
def copy_db() -> None:
|
||||
"""Copy the database files to the current directory.
|
||||
|
||||
This function copies the 'hanzoflow.db' and 'hanzoflow-pre.db' files from the cache directory to the current
|
||||
This function copies the 'flow.db' and 'hanzoflow-pre.db' files from the cache directory to the current
|
||||
directory.
|
||||
If the files exist in the cache directory, they will be copied to the same directory as this script (__main__.py).
|
||||
|
||||
@@ -815,8 +815,8 @@ def copy_db() -> None:
|
||||
|
||||
from platformdirs import user_cache_dir
|
||||
|
||||
cache_dir = Path(user_cache_dir("hanzoflow"))
|
||||
db_path = cache_dir / "hanzoflow.db"
|
||||
cache_dir = Path(user_cache_dir("flow"))
|
||||
db_path = cache_dir / "flow.db"
|
||||
pre_db_path = cache_dir / "hanzoflow-pre.db"
|
||||
# It should be copied to the current directory
|
||||
# this file is __main__.py and it should be in the same directory as the database
|
||||
@@ -883,7 +883,7 @@ def api_key(
|
||||
return None
|
||||
|
||||
async with session_scope() as session:
|
||||
from hanzoflow.services.database.models.user.model import User
|
||||
from flow.services.database.models.user.model import User
|
||||
|
||||
stmt = select(User).where(User.username == DEFAULT_SUPERUSER)
|
||||
superuser = (await session.exec(stmt)).first()
|
||||
@@ -892,8 +892,8 @@ def api_key(
|
||||
"Default superuser not found. This command requires a superuser and AUTO_LOGIN to be enabled."
|
||||
)
|
||||
return None
|
||||
from langflow.services.database.models.api_key.crud import create_api_key, delete_api_key
|
||||
from langflow.services.database.models.api_key.model import ApiKey, ApiKeyCreate
|
||||
from flow.services.database.models.api_key.crud import create_api_key, delete_api_key
|
||||
from flow.services.database.models.api_key.model import ApiKey, ApiKeyCreate
|
||||
|
||||
stmt = select(ApiKey).where(ApiKey.user_id == superuser.id)
|
||||
api_key = (await session.exec(stmt)).first()
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
"""Langflow Assistant API module."""
|
||||
|
||||
# Note: router is imported directly via langflow.agentic.api.router to avoid circular imports
|
||||
# Use: from langflow.agentic.api.router import router
|
||||
from langflow.agentic.api.schemas import AssistantRequest, StepType, ValidationResult
|
||||
# Use: from flow.agentic.api.router import router
|
||||
from flow.agentic.api.schemas import AssistantRequest, StepType, ValidationResult
|
||||
|
||||
__all__ = ["AssistantRequest", "StepType", "ValidationResult"]
|
||||
+7
-7
@@ -17,24 +17,24 @@ from lfx.base.models.unified_models import (
|
||||
from lfx.log.logger import logger
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from langflow.agentic.api.schemas import AssistantRequest
|
||||
from langflow.agentic.services.assistant_service import (
|
||||
from flow.agentic.api.schemas import AssistantRequest
|
||||
from flow.agentic.services.assistant_service import (
|
||||
execute_flow_with_validation,
|
||||
execute_flow_with_validation_streaming,
|
||||
)
|
||||
from langflow.agentic.services.flow_executor import execute_flow_file
|
||||
from langflow.agentic.services.flow_types import (
|
||||
from flow.agentic.services.flow_executor import execute_flow_file
|
||||
from flow.agentic.services.flow_types import (
|
||||
LANGFLOW_ASSISTANT_FLOW,
|
||||
MAX_VALIDATION_RETRIES,
|
||||
)
|
||||
from langflow.agentic.services.provider_service import (
|
||||
from flow.agentic.services.provider_service import (
|
||||
DEFAULT_MODELS,
|
||||
PREFERRED_PROVIDERS,
|
||||
check_api_key,
|
||||
get_enabled_providers_for_user,
|
||||
)
|
||||
from langflow.api.utils.core import CurrentActiveUser, DbSession
|
||||
from langflow.services.deps import get_variable_service
|
||||
from flow.api.utils.core import CurrentActiveUser, DbSession
|
||||
from flow.services.deps import get_variable_service
|
||||
|
||||
router = APIRouter(prefix="/agentic", tags=["Agentic"])
|
||||
|
||||
+21
-21
File diff suppressed because one or more lines are too long
+21
-21
File diff suppressed because one or more lines are too long
+13
-13
File diff suppressed because one or more lines are too long
+2
-2
@@ -8,8 +8,8 @@ Available flows:
|
||||
- translation_flow: Intent classification and translation flow
|
||||
"""
|
||||
|
||||
from langflow.agentic.flows.langflow_assistant import get_graph as get_langflow_assistant_graph
|
||||
from langflow.agentic.flows.translation_flow import get_graph as get_translation_flow_graph
|
||||
from flow.agentic.flows.langflow_assistant import get_graph as get_langflow_assistant_graph
|
||||
from flow.agentic.flows.translation_flow import get_graph as get_translation_flow_graph
|
||||
|
||||
__all__ = [
|
||||
"get_langflow_assistant_graph",
|
||||
+8
-8
@@ -4,7 +4,7 @@ This flow provides an AI assistant that can both answer questions about Langflow
|
||||
AND generate custom components when explicitly requested.
|
||||
|
||||
Usage:
|
||||
from langflow.agentic.flows.langflow_assistant import get_graph
|
||||
from flow.agentic.flows.langflow_assistant import get_graph
|
||||
graph = get_graph(provider="Anthropic", model_name="claude-sonnet-4-5-20250929")
|
||||
"""
|
||||
|
||||
@@ -20,7 +20,7 @@ questions and can generate custom components when explicitly requested.
|
||||
When users ask questions about Langflow:
|
||||
- Provide helpful, accurate information about Langflow concepts
|
||||
- Explain how components work, how to build flows, best practices, etc.
|
||||
- Reference documentation at https://docs.langflow.org/ when relevant
|
||||
- Reference documentation at https://docs.hanzo.ai/flow/ when relevant
|
||||
- Be concise but thorough
|
||||
|
||||
## Component Generation Rules
|
||||
@@ -89,12 +89,12 @@ class MyComponent(Component):
|
||||
## Documentation Reference
|
||||
|
||||
Key Langflow documentation pages:
|
||||
- Getting Started: https://docs.langflow.org/get-started-quickstart
|
||||
- Building Flows: https://docs.langflow.org/concepts-flows
|
||||
- Components Guide: https://docs.langflow.org/concepts-components
|
||||
- Custom Components: https://docs.langflow.org/components-custom-components
|
||||
- Agents: https://docs.langflow.org/agents
|
||||
- Data Types: https://docs.langflow.org/data-types
|
||||
- Getting Started: https://docs.hanzo.ai/flow/get-started-quickstart
|
||||
- Building Flows: https://docs.hanzo.ai/flow/concepts-flows
|
||||
- Components Guide: https://docs.hanzo.ai/flow/concepts-components
|
||||
- Custom Components: https://docs.hanzo.ai/flow/components-custom-components
|
||||
- Agents: https://docs.hanzo.ai/flow/agents
|
||||
- Data Types: https://docs.hanzo.ai/flow/data-types
|
||||
|
||||
Always cite documentation links when answering questions about Langflow features.
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ This flow translates user input to English and classifies intent as either
|
||||
'generate_component' or 'question'.
|
||||
|
||||
Usage:
|
||||
from langflow.agentic.flows.translation_flow import get_graph
|
||||
from flow.agentic.flows.translation_flow import get_graph
|
||||
graph = await get_graph(provider="OpenAI", model_name="gpt-4o-mini")
|
||||
"""
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import json
|
||||
|
||||
from langflow.agentic.api.schemas import StepType
|
||||
from flow.agentic.api.schemas import StepType
|
||||
|
||||
|
||||
def format_progress_event(
|
||||
+1
-1
@@ -4,7 +4,7 @@ import re
|
||||
|
||||
from lfx.custom.validate import create_class, extract_class_name
|
||||
|
||||
from langflow.agentic.api.schemas import ValidationResult
|
||||
from flow.agentic.api.schemas import ValidationResult
|
||||
|
||||
# Regex pattern to extract class name that inherits from Component
|
||||
CLASS_NAME_PATTERN = re.compile(r"class\s+(\w+)\s*\([^)]*Component[^)]*\)")
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"""MCP (Model Context Protocol) server for Langflow Agentic tools."""
|
||||
|
||||
from langflow.agentic.mcp.server import mcp
|
||||
from flow.agentic.mcp.server import mcp
|
||||
|
||||
__all__ = ["mcp"]
|
||||
+1
-1
@@ -4,7 +4,7 @@ This allows running the server with:
|
||||
python -m langflow.agentic.mcp
|
||||
"""
|
||||
|
||||
from langflow.agentic.mcp.server import mcp
|
||||
from flow.agentic.mcp.server import mcp
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run()
|
||||
+7
-7
@@ -8,36 +8,36 @@ from uuid import UUID
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
from langflow.agentic.mcp.support import replace_none_and_null_with_empty_str
|
||||
from langflow.agentic.utils.component_search import (
|
||||
from flow.agentic.mcp.support import replace_none_and_null_with_empty_str
|
||||
from flow.agentic.utils.component_search import (
|
||||
get_all_component_types,
|
||||
get_component_by_name,
|
||||
get_components_by_type,
|
||||
get_components_count,
|
||||
list_all_components,
|
||||
)
|
||||
from langflow.agentic.utils.flow_component import (
|
||||
from flow.agentic.utils.flow_component import (
|
||||
get_component_details,
|
||||
get_component_field_value,
|
||||
list_component_fields,
|
||||
update_component_field_value,
|
||||
)
|
||||
from langflow.agentic.utils.flow_graph import (
|
||||
from flow.agentic.utils.flow_graph import (
|
||||
get_flow_ascii_graph,
|
||||
get_flow_graph_representations,
|
||||
get_flow_graph_summary,
|
||||
get_flow_text_repr,
|
||||
)
|
||||
from langflow.agentic.utils.template_create import (
|
||||
from flow.agentic.utils.template_create import (
|
||||
create_flow_from_template_and_get_link,
|
||||
)
|
||||
from langflow.agentic.utils.template_search import (
|
||||
from flow.agentic.utils.template_search import (
|
||||
get_all_tags,
|
||||
get_template_by_id,
|
||||
get_templates_count,
|
||||
list_templates,
|
||||
)
|
||||
from langflow.services.deps import get_settings_service, session_scope
|
||||
from flow.services.deps import get_settings_service, session_scope
|
||||
|
||||
# Initialize FastMCP server
|
||||
mcp = FastMCP("langflow-agentic")
|
||||
+1
-1
@@ -82,7 +82,7 @@
|
||||
"type": "button_preview",
|
||||
"trigger": {
|
||||
"action": "navigate",
|
||||
"payload": { "path": "https://docs.langflow.org" }
|
||||
"payload": { "path": "https://docs.hanzo.ai/flow" }
|
||||
},
|
||||
"ui": {
|
||||
"icon": "book-open",
|
||||
+7
-7
@@ -7,27 +7,27 @@ from typing import Any
|
||||
from fastapi import HTTPException
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.agentic.helpers.code_extraction import extract_component_code
|
||||
from langflow.agentic.helpers.error_handling import extract_friendly_error
|
||||
from langflow.agentic.helpers.sse import (
|
||||
from flow.agentic.helpers.code_extraction import extract_component_code
|
||||
from flow.agentic.helpers.error_handling import extract_friendly_error
|
||||
from flow.agentic.helpers.sse import (
|
||||
format_cancelled_event,
|
||||
format_complete_event,
|
||||
format_error_event,
|
||||
format_progress_event,
|
||||
format_token_event,
|
||||
)
|
||||
from langflow.agentic.helpers.validation import validate_component_code
|
||||
from langflow.agentic.services.flow_executor import (
|
||||
from flow.agentic.helpers.validation import validate_component_code
|
||||
from flow.agentic.services.flow_executor import (
|
||||
execute_flow_file,
|
||||
execute_flow_file_streaming,
|
||||
extract_response_text,
|
||||
)
|
||||
from langflow.agentic.services.flow_types import (
|
||||
from flow.agentic.services.flow_types import (
|
||||
MAX_VALIDATION_RETRIES,
|
||||
VALIDATION_RETRY_TEMPLATE,
|
||||
VALIDATION_UI_DELAY_SECONDS,
|
||||
)
|
||||
from langflow.agentic.services.helpers.intent_classification import classify_intent
|
||||
from flow.agentic.services.helpers.intent_classification import classify_intent
|
||||
|
||||
|
||||
async def execute_flow_with_validation(
|
||||
+3
-3
@@ -15,12 +15,12 @@ from lfx.events.event_manager import EventManager, create_default_event_manager
|
||||
from lfx.log.logger import logger
|
||||
from lfx.schema.schema import InputValueRequest
|
||||
|
||||
from langflow.agentic.services.flow_types import (
|
||||
from flow.agentic.services.flow_types import (
|
||||
STREAMING_QUEUE_MAX_SIZE,
|
||||
FlowExecutionResult,
|
||||
)
|
||||
from langflow.agentic.services.helpers.event_consumer import consume_streaming_events
|
||||
from langflow.agentic.services.helpers.flow_loader import load_graph_for_execution, resolve_flow_path
|
||||
from flow.agentic.services.helpers.event_consumer import consume_streaming_events
|
||||
from flow.agentic.services.helpers.flow_loader import load_graph_for_execution, resolve_flow_path
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from lfx.graph.graph.base import Graph
|
||||
@@ -0,0 +1,11 @@
|
||||
"""Flow execution helpers."""
|
||||
|
||||
from flow.agentic.services.helpers.event_consumer import consume_streaming_events, parse_event_data
|
||||
from flow.agentic.services.helpers.flow_loader import load_graph_for_execution, resolve_flow_path
|
||||
|
||||
__all__ = [
|
||||
"consume_streaming_events",
|
||||
"load_graph_for_execution",
|
||||
"parse_event_data",
|
||||
"resolve_flow_path",
|
||||
]
|
||||
+2
-2
@@ -16,8 +16,8 @@ from fastapi import HTTPException
|
||||
from lfx.load import aload_flow_from_json
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.agentic.services.flow_preparation import load_and_prepare_flow
|
||||
from langflow.agentic.services.flow_types import FLOWS_BASE_PATH
|
||||
from flow.agentic.services.flow_preparation import load_and_prepare_flow
|
||||
from flow.agentic.services.flow_types import FLOWS_BASE_PATH
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from lfx.graph.graph.base import Graph
|
||||
+2
-2
@@ -4,11 +4,11 @@ import json
|
||||
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.agentic.services.flow_executor import (
|
||||
from flow.agentic.services.flow_executor import (
|
||||
execute_flow_file,
|
||||
extract_response_text,
|
||||
)
|
||||
from langflow.agentic.services.flow_types import (
|
||||
from flow.agentic.services.flow_types import (
|
||||
TRANSLATION_FLOW,
|
||||
IntentResult,
|
||||
)
|
||||
+3
-3
@@ -7,9 +7,9 @@ from lfx.base.models.unified_models import get_model_provider_variable_mapping
|
||||
from lfx.log.logger import logger
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from langflow.services.deps import get_variable_service
|
||||
from langflow.services.variable.constants import CREDENTIAL_TYPE
|
||||
from langflow.services.variable.service import DatabaseVariableService, VariableService
|
||||
from flow.services.deps import get_variable_service
|
||||
from flow.services.variable.constants import CREDENTIAL_TYPE
|
||||
from flow.services.variable.service import DatabaseVariableService, VariableService
|
||||
|
||||
# Preferred providers in order of priority
|
||||
PREFERRED_PROVIDERS = ["Anthropic", "OpenAI", "Google Generative AI", "Groq"]
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""Utilities for agentic features in Langflow."""
|
||||
|
||||
from langflow.agentic.utils.template_search import (
|
||||
from flow.agentic.utils.template_search import (
|
||||
get_all_tags,
|
||||
get_template_by_id,
|
||||
get_templates_count,
|
||||
+4
-4
@@ -47,7 +47,7 @@ async def list_all_components(
|
||||
... )
|
||||
"""
|
||||
if settings_service is None:
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
settings_service = get_settings_service()
|
||||
|
||||
@@ -129,7 +129,7 @@ async def get_component_by_name(
|
||||
... )
|
||||
"""
|
||||
if settings_service is None:
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
settings_service = get_settings_service()
|
||||
|
||||
@@ -192,7 +192,7 @@ async def get_all_component_types(settings_service: SettingsService | None = Non
|
||||
['agents', 'data', 'embeddings', 'llms', 'memories', 'tools', ...]
|
||||
"""
|
||||
if settings_service is None:
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
settings_service = get_settings_service()
|
||||
|
||||
@@ -227,7 +227,7 @@ async def get_components_count(
|
||||
>>> print(f"Found {llm_count} LLM components")
|
||||
"""
|
||||
if settings_service is None:
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
settings_service = get_settings_service()
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@ from uuid import UUID
|
||||
from lfx.graph.graph.base import Graph
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.helpers.flow import get_flow_by_id_or_endpoint_name
|
||||
from langflow.services.database.models.flow.model import Flow
|
||||
from langflow.services.deps import session_scope
|
||||
from flow.helpers.flow import get_flow_by_id_or_endpoint_name
|
||||
from flow.services.database.models.flow.model import Flow
|
||||
from flow.services.deps import session_scope
|
||||
|
||||
|
||||
async def get_component_details(
|
||||
+2
-2
@@ -7,10 +7,10 @@ from lfx.graph.graph.ascii import draw_graph
|
||||
from lfx.graph.graph.base import Graph
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.helpers.flow import get_flow_by_id_or_endpoint_name
|
||||
from flow.helpers.flow import get_flow_by_id_or_endpoint_name
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langflow.services.database.models.flow.model import FlowRead
|
||||
from flow.services.database.models.flow.model import FlowRead
|
||||
|
||||
|
||||
async def get_flow_graph_representations(
|
||||
+6
-6
@@ -10,12 +10,12 @@ from typing import TYPE_CHECKING, Any
|
||||
|
||||
from fastapi import HTTPException
|
||||
|
||||
from langflow.agentic.utils.template_search import get_template_by_id
|
||||
from langflow.api.v1.flows import _new_flow, _save_flow_to_fs
|
||||
from langflow.initial_setup.setup import get_or_create_default_folder
|
||||
from langflow.services.database.models.flow.model import FlowCreate
|
||||
from langflow.services.database.models.folder.model import Folder
|
||||
from langflow.services.deps import get_storage_service
|
||||
from flow.agentic.utils.template_search import get_template_by_id
|
||||
from flow.api.v1.flows import _new_flow, _save_flow_to_fs
|
||||
from flow.initial_setup.setup import get_or_create_default_folder
|
||||
from flow.services.database.models.flow.model import FlowCreate
|
||||
from flow.services.database.models.folder.model import Folder
|
||||
from flow.services.deps import get_storage_service
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from uuid import UUID
|
||||
@@ -63,7 +63,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
|
||||
# This is the path to the db in the root of the project.
|
||||
# When the user runs Hanzoflow the database url will
|
||||
# be set dynamically.
|
||||
sqlalchemy.url = sqlite+aiosqlite:///./hanzoflow.db
|
||||
sqlalchemy.url = sqlite+aiosqlite:///./flow.db
|
||||
|
||||
|
||||
[post_write_hooks]
|
||||
@@ -13,7 +13,7 @@ from sqlalchemy.ext.asyncio import async_engine_from_config
|
||||
|
||||
from lfx.log.logger import logger
|
||||
|
||||
from langflow.services.database.service import SQLModel
|
||||
from flow.services.database.service import SQLModel
|
||||
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
+5
-5
@@ -12,7 +12,7 @@ from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from sqlalchemy.engine.reflection import Inspector
|
||||
from langflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
@@ -28,8 +28,8 @@ def upgrade() -> None:
|
||||
|
||||
# Import encryption utilities
|
||||
try:
|
||||
from langflow.services.auth.mcp_encryption import encrypt_auth_settings
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.auth.mcp_encryption import encrypt_auth_settings
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
# Check if the folder table exists
|
||||
inspector = sa.inspect(conn)
|
||||
@@ -78,8 +78,8 @@ def downgrade() -> None:
|
||||
|
||||
# Import decryption utilities
|
||||
try:
|
||||
from langflow.services.auth.mcp_encryption import decrypt_auth_settings
|
||||
from langflow.services.deps import get_settings_service
|
||||
from flow.services.auth.mcp_encryption import decrypt_auth_settings
|
||||
from flow.services.deps import get_settings_service
|
||||
|
||||
# Check if the folder table exists
|
||||
inspector = sa.inspect(conn)
|
||||
+1
-1
@@ -11,7 +11,7 @@ from collections.abc import Sequence
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from hanzoflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "0ae3a2674f32"
|
||||
+1
-1
@@ -12,7 +12,7 @@ import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from alembic import op
|
||||
|
||||
from hanzoflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "0d60fcbd4e8e"
|
||||
+1
-1
@@ -13,7 +13,7 @@ import sqlmodel
|
||||
from alembic import op
|
||||
from sqlalchemy.engine.reflection import Inspector
|
||||
|
||||
from langflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "1b8b740a6fa3"
|
||||
+1
-1
@@ -11,7 +11,7 @@ from collections.abc import Sequence
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from hanzoflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "4522eb831f5c"
|
||||
+1
-1
@@ -9,7 +9,7 @@ from collections.abc import Sequence
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from hanzoflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "1ef9c4f3765d"
|
||||
+1
-1
@@ -21,7 +21,7 @@ depends_on: str | Sequence[str] | None = None
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
from langflow.utils import migration
|
||||
from flow.utils import migration
|
||||
|
||||
conn = op.get_bind()
|
||||
if not migration.table_exists("job", conn):
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user