Quantco / tabmat

Efficient matrix representations for working with tabular data
https://tabmat.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
112 stars 6 forks source link

Switch to pixi #384

Closed stanmart closed 1 month ago

stanmart commented 2 months ago

Checklist

Similarly to glum #802, this migrates the dev installation to pixi. It's more or less the same, so see that PR for the discussion.

TODO:

stanmart commented 2 months ago

Since submitting this PR the a new version of pixi has been released, which supports passing the no-build-isolation flag to uv. Maybe it's time to get rid of the postinstall workaround? I gave it a quick test and works, but there are a couple of caveats:

What do you think @pavelzw?

MarcAntoineSchmidtQC commented 1 month ago

Regarding the switch to the no-build-isolation using pixi, how slow does it make the package resolution? Is it going from like 10 seconds to 2 minutes, or from 10 seconds to 15 seconds? If it's the latter, then I'm absolutely okay with that.

For the rebuild, either we can keep the post-install task or rename it to "rebuild". Also, as this is only relevant for deep development, we can also instruct the contributors to remove the lock file and start from scratch.

stanmart commented 1 month ago

Is it going from like 10 seconds to 2 minutes, or from 10 seconds to 15 seconds?

If we make this change then pixi has to install an environments before being able to make the final solve. I did some testing: this means that from starting from scratch, environment resolution (e.g. when adding a new package) takes ~2 minutes on my laptop. Another issue is that these environments take up a lot of space (11 gigs). After all environments are installed, resolution is reasonably fast (e.g. adding a package takes around 10-15 seconds.

I'd say making devs install all environments when they want to add a dependency is too big of a tradeoff (especially in terms of disk space) for being able to omit postinstall. I would wait until pixi gets a no-dependencies flag for pypi dependencies, or some other solution.

For the rebuild, either we can keep the post-install task or rename it to "rebuild". Also, as this is only relevant for deep development, we can also instruct the contributors to remove the lock file and start from scratch.

Good point! Even though I would not make the switch just yet, it would be a perfect solution when we do.

pavelzw commented 1 month ago

Another issue is that these environments take up a lot of space (11 gigs)

xref https://github.com/prefix-dev/pixi/issues/1046