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

[python] Why the hatch dependency? #215

Closed pamelafox closed 2 months ago

pamelafox commented 3 months ago

Will that be always needed? Or is that just for the examples? I've personally never used it nor seen it as a requirement. If its for venv management reasons, we typically use venv since its in standard lib.

DanielRosenwasser commented 3 months ago

So I'm not an expert in all the individual tools, but I was looking for something that would manage

Since I've gotten my hands dirtier trying to make things work, I've learned enough to do a decent amount of this with just pip and venv, but solutions like Poetry, Hatch, and Rye made the onramp easier, and still manage a decent amount of it.

Hatch was recommended to me, I think in part because it's being developed by PyPA and tries to align with their recommendations; however, it still feels like it's early days even if the project is promising.

I think there are ways the docs could describe setting up with just pip/venv - it sounds like you're thinking that'd make things more accessible, right?

pamelafox commented 3 months ago

Yes, I recommend showing the pip/venv route, since that is likely to be what developers are expecting to see (and they could adapt for poetry/hatch/etc). I think uisng hatch probably makes particular sense for contributing to TypeChat for the dev-time deps, editable install, packaging, but I don't think it makes as much sense as the default path for a user of TypeChat.

For example: I got hatch shell working in my terminal, but then when I moved to VS Code, I had no idea where the venv got made so I couldn't get VS Code to use the hatch-made venv, and running hatch shell didnt seem to work. I could have read the hatch docs to try to figure it out, but it would have been more straightforward if I had setup via simple venv.