Skip to content

Commit 72b1d67

Browse files
Cheticclaude
andcommitted
feat: restructure as PyPI package with src layout
Reorganize the project into a proper Python package installable via `pip install chunksilo`, while keeping GitHub release bundles intact. - Move source files into src/chunksilo/ (src layout) - Split chunksilo.py into search.py (core pipeline) + server.py (MCP wrapper) - Add cli.py with `search_docs` console_scripts entry point - Make confluence support optional via `pip install chunksilo[confluence]` - Use requirements.txt as single source of truth for dependencies (dynamic) - Update all tests, CI workflows, and bundle scripts for new structure - Add PyPI publish job to manual-release workflow Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e87684d commit 72b1d67

27 files changed

Lines changed: 1280 additions & 1449 deletions

‎.github/workflows/manual-release.yml‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,25 @@ jobs:
259259
gh api "repos/$GITHUB_REPOSITORY/actions/artifacts" --paginate -q '.artifacts[].id' | while read -r ARTIFACT_ID; do
260260
echo "Deleting artifact $ARTIFACT_ID"
261261
gh api "repos/$GITHUB_REPOSITORY/actions/artifacts/$ARTIFACT_ID" -X DELETE
262-
done
262+
done
263+
264+
publish_pypi:
265+
needs: release
266+
runs-on: ubuntu-latest
267+
environment: pypi
268+
permissions:
269+
id-token: write
270+
steps:
271+
- uses: actions/checkout@v4
272+
273+
- uses: actions/setup-python@v5
274+
with:
275+
python-version: '3.11'
276+
277+
- name: Build package
278+
run: |
279+
pip install build
280+
python -m build
281+
282+
- name: Publish to PyPI
283+
uses: pypa/gh-action-pypi-publish@release/v1

‎.github/workflows/test-functional.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
python -m pip install -r requirements.txt
27-
python -m pip install -r test/requirements.txt
26+
python -m pip install -e ".[confluence,test]"
2827
2928
- name: Check dependency licenses
3029
run: |
@@ -43,6 +42,7 @@ jobs:
4342
/tmp/license-check-venv/bin/pip install --quiet --upgrade pip
4443
/tmp/license-check-venv/bin/pip install --quiet \
4544
-r requirements.txt \
45+
"llama-index-readers-confluence>=0.6.0,<1" \
4646
-c scripts/manylinux_2_34-constraints.txt
4747
/tmp/license-check-venv/bin/pip install --quiet pip-licenses
4848
/tmp/license-check-venv/bin/pip-licenses --partial-match \
@@ -57,7 +57,7 @@ jobs:
5757
DATA_DIR: ./test_data_dummy
5858
STORAGE_DIR: ./test_storage_dummy
5959
run: |
60-
python index.py --download-models
60+
python -m chunksilo.index --download-models
6161
6262
- name: Run all functional tests
6363
env:

‎.github/workflows/test-rag-metrics.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
python -m pip install -r requirements.txt
30-
python -m pip install -r test/requirements.txt
29+
python -m pip install -e ".[confluence,test]"
3130
3231
- name: Run RAG metrics test suite
3332
env:

0 commit comments

Comments
 (0)