Skip to content

fix(release): 727 langchain apify toolchain migration - #41

Merged
daveomri merged 6 commits into
mainfrom
fix/727-langchain-apify-toolchain-migration
Aug 6, 2026
Merged

daveomri merged 6 commits into
mainfrom
fix/727-langchain-apify-toolchain-migration

Conversation

@daveomri

Copy link
Copy Markdown
Collaborator

Summary

Migrate the toolchain from Poetry + Make to uv + Hatchling, matching the standard used by apify/strands-apify. This unblocks the PyPI release pipeline and aligns this repo with the other Apify Python integration packages.

Closes #727.

Why

The release workflows call apify/actions/prepare-pypi-distribution@v1.1.2, which runs uv run poe install-dev and uv run poe build. This repo was built on Poetry + Make and ships no poethepoet, so both the pre-release and stable release fail at the install step (error: Failed to spawn: poe).

Rather than patch around the missing poe, this adopts the uv + Hatchling toolchain that strands-apify already uses; the same class of repo (an AI-framework integration exposing Apify tools); which resolves the failure through the same mechanism Apify's own template uses.

What changed

Packaging (pyproject.toml)

  • Build backend poetry-corehatchling.
  • Dev dependencies moved from five [tool.poetry.group.*] groups into a single [project.optional-dependencies].dev extra (Poetry ^ carets converted to equivalent PEP 508 ranges; versions otherwise unchanged).
  • Local tasks moved from the Makefile to [tool.hatch.envs.default.scripts] (test, lint, format, typecheck, spell-check, check-imports, prepare).
  • Added a [tool.hatch.build.targets.sdist] allowlist so local-only paths (dist/, .venv/, res_lc*.txt, docs/) never reach PyPI.

Lockfiles / build files

  • Regenerated uv.lock; removed poetry.lock and the Makefile.

Workflows

  • run_code_checks.yml, release.yml, pre_release.yml now use apify/workflows/...@v0.45.0 with explicit install_command: uv pip install --system -e ".[dev]" and build_command: hatch build on prepare-pypi-distribution.
  • release.yml gains an update_changelog job so a stable release bumps pyproject.toml and CHANGELOG.md, tags the post-bump commit, and builds the wheel from that commit; keeping the wheel version, git tag, and computed version in sync.
  • Tightened job permissions (release_metadata reads PRs/issues for release notes; publish_to_pypi drops to contents: read).

Docs

  • DEVELOPMENT.md, CONTRIBUTING.md, README.md updated from poetry / make to uv / hatch run.

Testing

Verified locally, matching the commands CI/release now run:

  • uv sync --extra dev: clean install.
  • hatch build: produces wheel + sdist at 0.1.7; twine check dist/* passes both; wheel metadata and sdist contents verified (allowlist keeps scratch files out).
  • ruff check / ruff format --check: clean.
  • mypy langchain_apify: no issues.
  • scripts/check_imports.py: all modules import.
  • pytest --disable-socket --allow-unix-socket tests/unit_tests/: 412 passed.

Notes

  • Behavior change: stable releases now auto-commit a version bump + changelog to main (via update_changelog, [skip ci]), the same as pre_release.yml and strands-apify already do.
  • The version in pyproject.toml stays at 0.1.7 (the next-unreleased version already committed by the failed pre-release; consistent with the CHANGELOG.md "not yet released" entry). The release automation recomputes and rewrites it at release time.
  • The companion langchain-ai-docs documentation PR should merge only after a stable langchain-apify release lands on PyPI.

Optional follow-ups (not in this PR)

  • Bump stale dev-dependency ranges (pytest, pytest-asyncio, ruff): kept faithful here to keep this PR toolchain-only.
  • Consider migrating pre_release.yml from the wait_for_checks pattern to inline check jobs (as in strands-apify).

@daveomri daveomri self-assigned this Jul 31, 2026
@daveomri
daveomri marked this pull request as ready for review August 4, 2026 12:05
@daveomri
daveomri requested review from drobnikj and jirispilka August 4, 2026 12:05

@drobnikj drobnikj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine with me if the release pass.

@jirispilka jirispilka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you

@daveomri
daveomri merged commit 446ef94 into main Aug 6, 2026
14 checks passed
@daveomri
daveomri deleted the fix/727-langchain-apify-toolchain-migration branch August 6, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants