astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

Migration from other project management tools like `pdm` or `poetry` #1127

Open mxndtaylor opened 4 months ago

mxndtaylor commented 4 months ago

I personally have been using pdm to manage python projects, and I'd really love a way to easily migrate a couple of them over to try rye out. If this already exists or is being discussed elsewhere, my bad, but I couldn't find anything that looked like this in the gh issues or the website.

rye init fails when a project already exists, so having at least some way of adding rye management to an existing project would be a first step.

I'm not sure about how well an automated migration tool would work, since it would involve supporting the (potentially changing) features of other project managers, but maybe the migration tool could at least supporting the detection of the project.toml keys for various tools like tools.pdm and tools.poetry and refer the user to a particular "migration guide" on the website?

Otherwise maybe some sort of migration plugin system, where the migration implementation is managed independently from the main project. That way people could bring their own migration implementation without tying it to the main project's version. Maybe a couple plugins under the astral-sh org for some of the more popular alternative tools.

so, as far as expectation, it would be something like:

aphexcx commented 4 months ago

poetry2rye exists, haven't tried it though. We're evaluating this direction on our team so curious if there's an official recommendation