From 71ca170deaab87df81a4b331bd58a410ff7e666f Mon Sep 17 00:00:00 2001 From: Yx Jiang <2237303+yxjiang@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:45:56 -0700 Subject: [PATCH] Add local test package build script --- polymind/__init__.py | 1 + setup.py | 2 +- tests/build_test_pypi.sh | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 tests/build_test_pypi.sh diff --git a/polymind/__init__.py b/polymind/__init__.py index 924f705..affa643 100644 --- a/polymind/__init__.py +++ b/polymind/__init__.py @@ -1,3 +1,4 @@ from .core.tool import BaseTool from .core.message import Message from .core.task import BaseTask, CompositeTask, SequentialTask +from .core.agent import Agent, ThoughtProcess diff --git a/setup.py b/setup.py index f005acb..1b53159 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="polymind", - version="0.0.7", + version="0.0.8", packages=find_packages(), install_requires=requirements, author="Small Thinking", diff --git a/tests/build_test_pypi.sh b/tests/build_test_pypi.sh new file mode 100755 index 0000000..2bc7dcc --- /dev/null +++ b/tests/build_test_pypi.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Exit in case of error +set -e + +# Ensure the script is run from the project root directory +if [ ! -f "setup.py" ] && [ ! -f "pyproject.toml" ]; then + echo "Error: setup.py or pyproject.toml not found. Are you in the right directory?" + exit 1 +fi + +# Step 1: Build the package +echo "Building the package..." +python -m pip install --upgrade pip setuptools wheel twine +python setup.py sdist bdist_wheel + +# Step 2: Upload the package to Test PyPI +# Make sure the password is in the .pypirc file +echo "Uploading the package to Test PyPI..." +twine upload --repository testpypi dist/* + +echo "Package uploaded successfully." \ No newline at end of file