Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ jobs:

uv lock
cd src/backend/base && uv lock && cd ../../..
cd src/lfx && uv lock && cd ../..
cd src/core && uv lock && cd ../..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add src/core/uv.lock to the commit.

You run uv lock inside src/core but don’t stage src/core/uv.lock. This can desync the committed lockfiles.

Apply:

-          git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml uv.lock src/backend/base/uv.lock
+          git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml uv.lock src/backend/base/uv.lock src/core/uv.lock

Also applies to: 94-95

🤖 Prompt for AI Agents
In .github/workflows/nightly_build.yml around lines 92-93 (and similarly at
94-95), the workflow runs "uv lock" in src/core but never stages or commits
src/core/uv.lock; update the workflow to git-add and commit the generated
src/core/uv.lock after running uv lock (e.g., run git add src/core/uv.lock and
git commit -m "chore: update src/core/uv.lock" or conditionally commit if
changes exist), ensuring the lockfile is included in the repo so committed
lockfiles stay in sync.

git add pyproject.toml src/backend/base/pyproject.toml src/lfx/pyproject.toml uv.lock src/backend/base/uv.lock
git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml uv.lock src/backend/base/uv.lock
git commit -m "Update version and project name"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Include src/core/uv.lock in commit to avoid lockfile drift

You run uv lock in src/core (Line 92) but don’t stage src/core/uv.lock (Line 94). This can desync the core package versioning in nightly tags.

Apply this diff:

-          git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml uv.lock src/backend/base/uv.lock
+          git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml \
+            uv.lock src/backend/base/uv.lock src/core/uv.lock
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uv lock
cd src/backend/base && uv lock && cd ../../..
cd src/lfx && uv lock && cd ../..
cd src/core && uv lock && cd ../..
git add pyproject.toml src/backend/base/pyproject.toml src/lfx/pyproject.toml uv.lock src/backend/base/uv.lock
git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml uv.lock src/backend/base/uv.lock
git commit -m "Update version and project name"
uv lock
cd src/backend/base && uv lock && cd ../../..
cd src/core && uv lock && cd ../..
git add pyproject.toml src/backend/base/pyproject.toml src/core/pyproject.toml \
uv.lock src/backend/base/uv.lock src/core/uv.lock
git commit -m "Update version and project name"
🤖 Prompt for AI Agents
.github/workflows/nightly_build.yml around lines 90 to 96: the workflow runs `uv
lock` in src/core but does not stage src/core/uv.lock, which can cause lockfile
drift; update the git add command to include src/core/uv.lock (i.e., add that
path to the list of files being staged) so the newly generated core lockfile is
committed alongside the other pyproject and uv.lock files.

echo "Tagging main with $MAIN_TAG"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release-lfx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Check version
id: check
run: |
cd src/lfx
cd src/core
# Use uv tree to get package info, consistent with nightly workflow
name=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $1}')
version=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $2}')
Expand Down Expand Up @@ -107,12 +107,12 @@ jobs:

- name: Run LFX tests
run: |
cd src/lfx
cd src/core
make test

- name: Test CLI installation
run: |
cd src/lfx
cd src/core
uv pip install .
uv run lfx --help
uv run lfx run --help
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Verify Version
id: check-version
run: |
cd src/lfx
cd src/core
# Use uv tree to get package info, consistent with nightly workflow
name=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $1}')
version=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $2}')
Expand All @@ -166,20 +166,20 @@ jobs:

- name: Build distribution
run: |
cd src/lfx
cd src/core
rm -rf dist/
uv build --wheel --out-dir dist

- name: Check build artifacts
run: |
cd src/lfx
cd src/core
ls -la dist/
# Verify wheel contents
unzip -l dist/*.whl | grep -E "(lfx/__main__.py|lfx/cli/run.py|lfx/cli/commands.py)"

- name: Test installation from wheel
run: |
cd src/lfx
cd src/core
uv pip install dist/*.whl --force-reinstall
uv run lfx --help
echo "LFX CLI test completed successfully"
Expand All @@ -188,15 +188,15 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: lfx-dist
path: src/lfx/dist/
path: src/core/dist/
retention-days: 5

- name: Publish to PyPI
if: github.event.inputs.publish_pypi == 'true'
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd src/lfx
cd src/core
uv publish dist/*.whl

build-docker:
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: src/lfx/docker/Dockerfile${{ matrix.variant == 'alpine' && '.alpine' || '' }}
file: src/core/docker/Dockerfile${{ matrix.variant == 'alpine' && '.alpine' || '' }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ jobs:
- name: Check Version
id: check-version
run: |
cd src/lfx
cd src/core
version=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $2}' | sed 's/^v//')
last_released_version=$(curl -s "https://pypi.org/pypi/lfx/json" | jq -r '.releases | keys | .[]' | sort -V | tail -n 1)
if [ "$version" = "$last_released_version" ]; then
Expand All @@ -364,19 +364,19 @@ jobs:
fi
- name: Build project for distribution
run: |
cd src/lfx
cd src/core
rm -rf dist/
uv build --wheel --out-dir dist
- name: Test CLI
run: |
cd src/lfx
cd src/core
uv pip install dist/*.whl --force-reinstall
uv run lfx --help
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist-lfx
path: src/lfx/dist
path: src/core/dist

publish-lfx:
name: Publish LFX to PyPI
Expand All @@ -388,7 +388,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: dist-lfx
path: src/lfx/dist
path: src/core/dist
- name: Setup Environment
uses: astral-sh/setup-uv@v6
with:
Expand All @@ -398,7 +398,7 @@ jobs:
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd src/lfx && uv publish dist/*.whl
cd src/core && uv publish dist/*.whl

create_release:
name: Create Release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install LFX dependencies
run: cd src/lfx && uv sync
run: cd src/core && uv sync

- name: Verify Nightly Name and Version
id: verify
run: |
cd src/lfx
cd src/core
name=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $1}')
version=$(uv tree | grep 'lfx' | head -n 1 | awk '{print $2}')
if [ "$name" != "lfx-nightly" ]; then
Expand All @@ -121,13 +121,13 @@ jobs:

- name: Build LFX for distribution
run: |
cd src/lfx
cd src/core
rm -rf dist/
uv build --wheel --out-dir dist

- name: Test LFX CLI
run: |
cd src/lfx
cd src/core
uv pip install dist/*.whl --force-reinstall
uv run lfx --help
echo "LFX CLI test completed successfully"
Expand All @@ -138,7 +138,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: dist-nightly-lfx
path: src/lfx/dist
path: src/core/dist

build-nightly-base:
name: Build Langflow Nightly Base
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: dist-nightly-lfx
path: src/lfx/dist
path: src/core/dist
- name: Setup Environment
uses: astral-sh/setup-uv@v6
with:
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ unit_tests_looponfail:

lfx_tests: ## run lfx package unit tests
@echo 'Running LFX Package Tests...'
@cd src/lfx && \
@cd src/core && \
uv sync && \
uv run pytest tests/unit -v $(args)

Expand Down Expand Up @@ -417,43 +417,43 @@ publish_testpypi: ## build the frontend static files and package the project and

lfx_build: ## build the LFX package
@echo 'Building LFX package'
@cd src/lfx && make build
@cd src/core && make build

lfx_publish: ## publish LFX package to PyPI
@echo 'Publishing LFX package'
@cd src/lfx && make publish
@cd src/core && make publish

lfx_publish_testpypi: ## publish LFX package to test PyPI
@echo 'Publishing LFX package to test PyPI'
@cd src/lfx && make publish_test
@cd src/core && make publish_test

lfx_test: ## run LFX tests
@echo 'Running LFX tests'
@cd src/lfx && make test
@cd src/core && make test

lfx_format: ## format LFX code
@echo 'Formatting LFX code'
@cd src/lfx && make format
@cd src/core && make format

lfx_lint: ## lint LFX code
@echo 'Linting LFX code'
@cd src/lfx && make lint
@cd src/core && make lint

lfx_clean: ## clean LFX build artifacts
@echo 'Cleaning LFX build artifacts'
@cd src/lfx && make clean
@cd src/core && make clean

lfx_docker_build: ## build LFX production Docker image
@echo 'Building LFX Docker image'
@cd src/lfx && make docker_build
@cd src/core && make docker_build

lfx_docker_dev: ## start LFX development environment
@echo 'Starting LFX development environment'
@cd src/lfx && make docker_dev
@cd src/core && make docker_dev

lfx_docker_test: ## run LFX tests in Docker
@echo 'Running LFX tests in Docker'
@cd src/lfx && make docker_test
@cd src/core && make docker_test

# example make alembic-revision message="Add user table"
alembic-revision: ## generate a new migration
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ lfx = { workspace = true }
members = [
"src/backend/base",
".",
"src/lfx",
"src/core",
]

[tool.hatch.build.targets.wheel]
Expand Down Expand Up @@ -262,7 +262,7 @@ ignore-regex = '.*(Stati Uniti|Tense=Pres).*'
timeout = 150
timeout_method = "signal"
minversion = "6.0"
testpaths = ["src/backend/tests", "src/lfx/tests"]
testpaths = ["src/backend/tests", "src/core/tests"]
console_output_style = "progress"
filterwarnings = ["ignore::DeprecationWarning", "ignore::ResourceWarning"]
log_cli = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading