-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR releases Langflow 1.0 in the main branch and updates the documentation.
- Loading branch information
Showing
1,629 changed files
with
124,939 additions
and
53,149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": [ | ||
"react", | ||
"import-helpers", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": [ | ||
"./tsconfig.node.json", | ||
"./tsconfig.json" | ||
], | ||
"extraFileExtensions:": [ | ||
".mdx" | ||
], | ||
"extensions:": [ | ||
".mdx" | ||
] | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"rules": { | ||
"no-console": "warn", | ||
"no-self-assign": "warn", | ||
"no-self-compare": "warn", | ||
"complexity": [ | ||
"error", | ||
{ | ||
"max": 15 | ||
} | ||
], | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"no-dupe-keys": "error", | ||
"no-invalid-regexp": "error", | ||
"no-undef": "error", | ||
"no-return-assign": "error", | ||
"no-redeclare": "error", | ||
"no-empty": "error", | ||
"no-await-in-loop": "error", | ||
"react/react-in-jsx-scope": 0, | ||
"node/exports-style": [ | ||
"error", | ||
"module.exports" | ||
], | ||
"node/file-extension-in-import": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-global/buffer": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-global/console": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-global/process": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-global/url-search-params": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-global/url": [ | ||
"error", | ||
"always" | ||
], | ||
"node/prefer-promises/dns": "error", | ||
"node/prefer-promises/fs": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ Dockerfile text | |
*.mp4 binary | ||
*.svg binary | ||
*.csv binary | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# An action for setting up poetry install with caching. | ||
# Using a custom action since the default action does not | ||
# take poetry install groups into account. | ||
# Action code from: | ||
# https://github.com/actions/setup-python/issues/505#issuecomment-1273013236 | ||
# Copy of https://github.com/langchain-ai/langchain/blob/2f8dd1a1619f25daa4737df4d378b1acd6ff83c4/.github/actions/poetry_setup/action.yml | ||
name: poetry-install-with-caching | ||
description: Poetry install with support for caching of dependency groups. | ||
|
||
inputs: | ||
python-version: | ||
description: Python version, supporting MAJOR.MINOR only | ||
required: true | ||
|
||
poetry-version: | ||
description: Poetry version | ||
required: true | ||
|
||
cache-key: | ||
description: Cache key to use for manual handling of caching | ||
required: true | ||
|
||
working-directory: | ||
description: Directory whose poetry.lock file should be cached | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-python@v5 | ||
name: Setup python ${{ inputs.python-version }} | ||
id: setup-python | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- uses: actions/cache@v4 | ||
id: cache-bin-poetry | ||
name: Cache Poetry binary - Python ${{ inputs.python-version }} | ||
env: | ||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "1" | ||
with: | ||
path: | | ||
/opt/pipx/venvs/poetry | ||
# This step caches the poetry installation, so make sure it's keyed on the poetry version as well. | ||
key: bin-poetry-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}-${{ inputs.poetry-version }} | ||
|
||
- name: Refresh shell hashtable and fixup softlinks | ||
if: steps.cache-bin-poetry.outputs.cache-hit == 'true' | ||
shell: bash | ||
env: | ||
POETRY_VERSION: ${{ inputs.poetry-version }} | ||
PYTHON_VERSION: ${{ inputs.python-version }} | ||
run: | | ||
set -eux | ||
# Refresh the shell hashtable, to ensure correct `which` output. | ||
hash -r | ||
# `actions/cache@v3` doesn't always seem able to correctly unpack softlinks. | ||
# Delete and recreate the softlinks pipx expects to have. | ||
rm /opt/pipx/venvs/poetry/bin/python | ||
cd /opt/pipx/venvs/poetry/bin | ||
ln -s "$(which "python$PYTHON_VERSION")" python | ||
chmod +x python | ||
cd /opt/pipx_bin/ | ||
ln -s /opt/pipx/venvs/poetry/bin/poetry poetry | ||
chmod +x poetry | ||
# Ensure everything got set up correctly. | ||
/opt/pipx/venvs/poetry/bin/python --version | ||
/opt/pipx_bin/poetry --version | ||
- name: Install poetry | ||
if: steps.cache-bin-poetry.outputs.cache-hit != 'true' | ||
shell: bash | ||
env: | ||
POETRY_VERSION: ${{ inputs.poetry-version || env.POETRY_VERSION }} | ||
PYTHON_VERSION: ${{ inputs.python-version }} | ||
# Install poetry using the python version installed by setup-python step. | ||
run: | | ||
pipx install "poetry==$POETRY_VERSION" --python '${{ steps.setup-python.outputs.python-path }}' --verbose | ||
pipx ensurepath | ||
# Ensure the poetry binary is available in the PATH. | ||
# Test that the poetry binary is available. | ||
poetry --version | ||
- name: Restore pip and poetry cached dependencies | ||
uses: actions/cache@v4 | ||
env: | ||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4" | ||
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }} | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.cache/pypoetry/virtualenvs | ||
~/.cache/pypoetry/cache | ||
~/.cache/pypoetry/artifacts | ||
${{ env.WORKDIR }}/.venv | ||
key: py-deps-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}-poetry-${{ inputs.poetry-version }}-${{ inputs.cache-key }}-${{ hashFiles(format('{0}/**/poetry.lock', env.WORKDIR)) }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Create Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version to release" | ||
required: true | ||
type: string | ||
release_type: | ||
description: "Type of release (base or main)" | ||
required: true | ||
type: choice | ||
options: | ||
- base | ||
- main | ||
|
||
env: | ||
POETRY_VERSION: "1.8.2" | ||
jobs: | ||
release: | ||
name: Build Langflow | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.check-version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry==${{ env.POETRY_VERSION }} | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "poetry" | ||
- name: Build project for distribution | ||
run: | | ||
if [ "${{ inputs.release_type }}" == "base" ]; then | ||
make build base=true | ||
else | ||
make build main=true | ||
fi | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist${{ inputs.release_type }} | ||
path: ${{ inputs.release_type == 'base' && 'src/backend/base/dist' || 'dist' }} | ||
create_release: | ||
name: Create Release Job | ||
runs-on: ubuntu-latest | ||
needs: release | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: dist${{ inputs.release_type }} | ||
path: dist | ||
- name: Create Release Notes | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "dist/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: false | ||
generateReleaseNotes: true | ||
prerelease: true | ||
tag: v${{ inputs.version }} | ||
commit: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.