Skip to content

feat: restructure as PyPI package with src layout - #33

Merged
Chetic merged 11 commits into
mainfrom
pypi-package
Jan 25, 2026
Merged

feat: restructure as PyPI package with src layout#33
Chetic merged 11 commits into
mainfrom
pypi-package

Conversation

@Chetic

@Chetic Chetic commented Jan 24, 2026

Copy link
Copy Markdown
Owner

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

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72b1d6759c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/chunksilo/server.py
@claude

claude Bot commented Jan 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Chetic and others added 2 commits January 24, 2026 12:43
run_server's config_path argument only set CHUNKSILO_CONFIG after
cfgload.CONFIG_PATH was already computed at import time, so the custom
path was silently ignored. Store it in a module-level variable and
forward it to run_search via the search_docs MCP tool.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…leanup

The publish_pypi job was building the package with the hardcoded version
from pyproject.toml instead of the dynamically computed release version.
Now injects the computed version into pyproject.toml and __init__.py
before building. Also removes the artifact cleanup step which was
deleting all repo artifacts indiscriminately.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Jan 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Chetic and others added 8 commits January 24, 2026 13:53
Add config search order to --help epilog and log the resolved config
path at startup so users know which file is in effect. Also rename the
CLI entry point from search_docs to chunksilo and add __main__.py for
python -m support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Suppress diagnostic messages (model loading, search stats) by default;
show them with -v/--verbose. Simplify terminal output format and fix
BM25 log to report post-filter match count instead of raw candidates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Set TOKENIZERS_PARALLELISM=false early in both CLI and MCP server entry
points to prevent the HuggingFace fork-safety warning. Also consolidates
--build-index and --download-models into the main CLI and refactors
build_index() to accept config_path directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add chunksilo-mcp console script in pyproject.toml
- Restructure server.py to defer side effects to main()
- Remove stderr logging from MCP server (file-only for clean stdio)
- Fix CLI logging to use stderr instead of stdout
- Update README with Claude Code, Claude Desktop configuration examples
- Replace references to non-existent chunksilo.py with new commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restructure installation section to support both PyPI users and air-gapped
environments. Add dual command examples throughout for pip-installed vs
offline bundle paths, update all MCP client configs with both methods,
and document the Confluence optional dependency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix offline default: document actual default (false) instead of true
- Add CLI Usage section documenting all options (--json, --verbose,
  --download-models, --date-from, --date-to)
- Correct model download size from ~500MB to ~250MB
- Add note about first-run pause during model download
- Clarify PyPI vs offline bundle behavior in troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove offline=True argument from build_index() calls as the parameter
  was removed (offline setting is now read from config)
- Replace search_docs import with run_search in test_system.py since
  search_docs is not exported at module level
- Simplify test_query to use synchronous run_search directly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace search_docs import with run_search from chunksilo.search since
  search_docs is not exported at module level (defined inside _create_server)
- Make evaluate_query_with_retriever() and evaluate_query() synchronous
- Make run_rag_metrics_tests() synchronous and remove asyncio.run() from main()
- Remove unused asyncio import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Chetic
Chetic merged commit d8aef79 into main Jan 25, 2026
3 checks passed
@Chetic
Chetic deleted the pypi-package branch January 25, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant