From 7b441e64e7fc1434cebc57e436b165314a24b945 Mon Sep 17 00:00:00 2001 From: Vadym Barda Date: Fri, 2 Aug 2024 18:58:04 -0400 Subject: [PATCH] ci: update import pre-release check (#1209) * ci: update import pre-release check * fix --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31ca672f3..460574b36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -197,9 +197,15 @@ jobs: "$PKG_NAME==$VERSION" \ ) - # Replace all dashes in the package name with underscores, - # since that's how Python imports packages with dashes in the name. - IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)" + if [[ "$PKG_NAME" == *checkpoint* ]]; then + # since checkpoint packages are namespace packages, import them with . convention + # i.e. import langgraph.checkpoint or langgraph.checkpoint.sqlite + IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/./g)" + else + # Replace all dashes in the package name with underscores, + # since that's how Python imports packages with dashes in the name. + IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)" + fi poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"