Add packaging config: dependency bounds, console script, and pyproject-based install#211
Add packaging config: dependency bounds, console script, and pyproject-based install#211trehansalil wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds initial Python packaging configuration for the pageindex project, establishing Python version requirements and a Hatchling-based build setup to support distribution as a Python package.
Changes:
- Added
pyproject.tomlwith PEP 621 project metadata, runtime dependencies, and Hatchling build configuration. - Added
.python-versionto standardize local development on Python 3.12.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pyproject.toml |
Defines package metadata, Python requirement (>=3.12), dependencies, and Hatchling wheel packaging for pageindex. |
.python-version |
Pins the local dev Python version to 3.12. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
you should add boundaries to the dependencies, simplest solution is usually |
|
title is misleading, you can already add the project as |
|
@claude review and work on jakob's comments |
|
pr should delete requirements.txt and add run as |
Resolves @jakob1379's review comments on VectifyAI#211: - Add lower bounds to dependencies (matching the pinned versions) so the package metadata no longer drifts from the locked versions. - Add an `[project.scripts]` entry (`pageindex`) wired to a new `pageindex.cli:main`; `run_pageindex.py` becomes a thin wrapper that delegates to it for backward compatibility. - Delete `requirements.txt`; installation now flows through the package (`pip install .` / `pip install git+https://...` / `.[examples]`). - Update README install/usage instructions accordingly and add an `examples` optional-dependency extra for the openai-agents demo. - Regenerate uv.lock to reflect the new bounds and extra. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @jakob1379 — addressed all three points in 85f25e8:
Also updated the PR title so it reflects the actual change. |
| Install the package (along with its pinned dependencies) from the repository root: | ||
|
|
||
| ```bash | ||
| pip3 install --upgrade . |
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "litellm>=1.83.7", | ||
| "pymupdf>=1.26.4", | ||
| "PyPDF2>=3.0.1", | ||
| "python-dotenv>=1.2.2", | ||
| "pyyaml>=6.0.2", | ||
| ] |
| if not args.pdf_path and not args.md_path: | ||
| raise ValueError("Either --pdf_path or --md_path must be specified") | ||
| if args.pdf_path and args.md_path: | ||
| raise ValueError("Only one of --pdf_path or --md_path can be specified") |
This pull request sets up the initial project configuration for a new Python package named
pageindex. The main changes include specifying Python version requirements and adding project metadata and dependencies.Project setup and configuration:
.python-versionfile to specify Python 3.12 as the required version for development.pyproject.tomlfile with project metadata, Python version requirement (>=3.12), dependencies (litellm,pymupdf,PyPDF2,python-dotenv,pyyaml), and build system configuration using Hatchling.