microsoft / TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.
https://microsoft.github.io/TypeChat/
MIT License
8.06k stars 378 forks source link

Make it easier to use purely `pip` and `venv` instead of requiring Hatch #228

Closed DanielRosenwasser closed 2 months ago

DanielRosenwasser commented 3 months ago

In #207, I made it so that hatch would create a .venv in the repository root. The reason was to make common scenarios work better for editors (most which currently don't understand hatch).

Still, lots of people don't use Hatch, and in #215, @pamelafox pointed out that it's nice to have control over this stuff. So this PR makes it possible to use use pip directly with our pyproject.toml. To do so, dev-time dependencies for TypeChat, along with dependencies for our examples, are moved into their own respective arrays in optional-dependencies.

Since pip allows you to install "extras" (see here, here, and here), developers can just write something like the following:

cd TypeChat/python
python -v venv ../.venv
source ../.venv/bin/activate
pip install .[dev,examples]