Skip to content

Commit d4d09ad

Browse files
Merge pull request #432 from pieces-app/update-sdk-workflow
remove the v1 replacement to use pydantic v2
2 parents 0a58bea + fa435e9 commit d4d09ad

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

.github/workflows/update-sdks.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.10'
24+
python-version: "3.10"
2525

2626
- name: Clone Pieces OS Client SDK
2727
run: |
@@ -45,22 +45,22 @@ jobs:
4545
else
4646
echo "Wrapper does not exist in vendor directory, will need to fetch from cli-agent-pydantic-v2 branch"
4747
fi
48-
48+
4949
# Save the wrapper if it exists before removing vendor directory
5050
if [ "$WRAPPER_EXISTS_IN_VENDOR" = "true" ]; then
5151
echo "Saving existing wrapper"
5252
cp -r src/pieces/_vendor/pieces_os_client/wrapper /tmp/saved_wrapper
5353
fi
54-
54+
5555
rm -rf src/pieces/_vendor
56-
56+
5757
mkdir -p src/pieces/_vendor
58-
58+
5959
cp -r pieces-sdk-main/src/pieces_os_client src/pieces/_vendor/pieces_os_client
60-
60+
6161
# Remove the wrapper from main branch (we always want to use the one from cli-agent-pydantic-v2)
6262
rm -rf src/pieces/_vendor/pieces_os_client/wrapper
63-
63+
6464
# If wrapper existed in vendor, restore it
6565
if [ "$WRAPPER_EXISTS_IN_VENDOR" = "true" ]; then
6666
echo "Restoring saved wrapper"
@@ -87,12 +87,6 @@ jobs:
8787
sed -i 's/importlib\.import_module(f"pieces_os_client\./importlib.import_module(f"pieces._vendor.pieces_os_client./g' src/pieces/_vendor/pieces_os_client/api_client.py
8888
fi
8989
90-
- name: Update imports - pydantic to pydantic.v1
91-
run: |
92-
# Find all Python files in the _vendor directory and update all pydantic references
93-
find src/pieces/_vendor -name "*.py" -type f -exec sed -i \
94-
-e 's/\bpydantic\b/pydantic.v1/g' {} +
95-
9690
- name: Create __init__.py files
9791
run: |
9892
# Ensure __init__.py exists in _vendor directory

0 commit comments

Comments
 (0)