v0.4.0 release

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
This commit is contained in:
Víctor Mayoral Vilches 2025-05-28 12:00:06 +00:00
parent 80039ec527
commit 9b4b0f6165
2 changed files with 94 additions and 3 deletions

View File

@ -89,16 +89,55 @@ agents = { workspace = true }
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [
".trunk/",
".git/",
".vscode/",
".devcontainer/",
".mypy_cache/",
".pytest_cache/",
".ruff_cache/",
"venv/",
".venv/",
"dist/",
"build/",
"*.egg-info/",
"workspaces/",
"benchmarks/",
"logs/",
"site/",
".cai/",
"nohup.out"
]
[tool.hatch.build.targets.wheel]
packages = ["src/cai", "tools"]
exclude = [
".trunk/",
".git/",
".vscode/",
".devcontainer/",
".mypy_cache/",
".pytest_cache/",
".ruff_cache/",
"venv/",
".venv/",
"dist/",
"build/",
"*.egg-info/",
"workspaces/",
"benchmarks/",
"logs/",
"site/",
".cai/",
"nohup.out"
]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
"tools" = "tools"
[tool.hatch.build.targets.wheel.force-include]
"src/cai/prompts" = "cai/prompts"
[tool.ruff]
line-length = 100
target-version = "py39"

52
release_to_pypi.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
set -e
echo "Preparing cai-framework for PyPI release..."
# Install required build tools without upgrading pip
# pip install --upgrade pip setuptools wheel twine build
pip install setuptools wheel twine build
# Check if pyproject.toml exists
if [ ! -f "pyproject.toml" ]; then
echo "ERROR: pyproject.toml is missing"
exit 1
fi
# Check if README.md exists
if [ ! -f "README.md" ]; then
echo "ERROR: README.md is missing"
exit 1
fi
# Clean previous builds
rm -rf build/ dist/ *.egg-info/ .eggs/
# Also clean any cached build files
rm -rf src/*.egg-info/
# Build the package
echo "Building package..."
python3 -m build
# Check the package
echo "Running twine check..."
twine check dist/*
echo ""
echo "Package is ready for upload!"
echo ""
echo "To upload to TestPyPI (recommended for testing):"
echo "twine upload --repository testpypi dist/*"
echo ""
echo "To upload to PyPI (production):"
echo "twine upload dist/*"
echo ""
echo "After uploading to TestPyPI, you can install with:"
echo "pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cai-framework"
echo ""
echo "To test in a clean environment:"
echo "python3 -m venv test_env"
echo "source test_env/bin/activate"
echo "pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cai-framework"