Skip to content

Commit 0d1ea93

Browse files
committed
v0.4.0 release
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
1 parent aa0e525 commit 0d1ea93

File tree

2 files changed

+94
-3
lines changed

2 files changed

+94
-3
lines changed

pyproject.toml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,55 @@ agents = { workspace = true }
8989
requires = ["hatchling"]
9090
build-backend = "hatchling.build"
9191

92+
[tool.hatch.build]
93+
exclude = [
94+
".trunk/",
95+
".git/",
96+
".vscode/",
97+
".devcontainer/",
98+
".mypy_cache/",
99+
".pytest_cache/",
100+
".ruff_cache/",
101+
"venv/",
102+
".venv/",
103+
"dist/",
104+
"build/",
105+
"*.egg-info/",
106+
"workspaces/",
107+
"benchmarks/",
108+
"logs/",
109+
"site/",
110+
".cai/",
111+
"nohup.out"
112+
]
113+
92114
[tool.hatch.build.targets.wheel]
93115
packages = ["src/cai", "tools"]
116+
exclude = [
117+
".trunk/",
118+
".git/",
119+
".vscode/",
120+
".devcontainer/",
121+
".mypy_cache/",
122+
".pytest_cache/",
123+
".ruff_cache/",
124+
"venv/",
125+
".venv/",
126+
"dist/",
127+
"build/",
128+
"*.egg-info/",
129+
"workspaces/",
130+
"benchmarks/",
131+
"logs/",
132+
"site/",
133+
".cai/",
134+
"nohup.out"
135+
]
94136

95137
[tool.hatch.build.targets.wheel.sources]
96138
"src" = ""
97139
"tools" = "tools"
98140

99-
[tool.hatch.build.targets.wheel.force-include]
100-
"src/cai/prompts" = "cai/prompts"
101-
102141
[tool.ruff]
103142
line-length = 100
104143
target-version = "py39"

release_to_pypi.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Preparing cai-framework for PyPI release..."
5+
6+
7+
# Install required build tools without upgrading pip
8+
# pip install --upgrade pip setuptools wheel twine build
9+
pip install setuptools wheel twine build
10+
11+
# Check if pyproject.toml exists
12+
if [ ! -f "pyproject.toml" ]; then
13+
echo "ERROR: pyproject.toml is missing"
14+
exit 1
15+
fi
16+
17+
18+
# Check if README.md exists
19+
if [ ! -f "README.md" ]; then
20+
echo "ERROR: README.md is missing"
21+
exit 1
22+
fi
23+
24+
# Clean previous builds
25+
rm -rf build/ dist/ *.egg-info/ .eggs/
26+
# Also clean any cached build files
27+
rm -rf src/*.egg-info/
28+
29+
# Build the package
30+
echo "Building package..."
31+
python3 -m build
32+
33+
# Check the package
34+
echo "Running twine check..."
35+
twine check dist/*
36+
37+
echo ""
38+
echo "Package is ready for upload!"
39+
echo ""
40+
echo "To upload to TestPyPI (recommended for testing):"
41+
echo "twine upload --repository testpypi dist/*"
42+
echo ""
43+
echo "To upload to PyPI (production):"
44+
echo "twine upload dist/*"
45+
echo ""
46+
echo "After uploading to TestPyPI, you can install with:"
47+
echo "pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cai-framework"
48+
echo ""
49+
echo "To test in a clean environment:"
50+
echo "python3 -m venv test_env"
51+
echo "source test_env/bin/activate"
52+
echo "pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cai-framework"

0 commit comments

Comments
 (0)