Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pixi #384

Merged
merged 19 commits into from
Sep 11, 2024
Merged

Switch to pixi #384

merged 19 commits into from
Sep 11, 2024

Conversation

stanmart
Copy link
Collaborator

@stanmart stanmart commented Sep 2, 2024

Checklist

  • Added a CHANGELOG.rst entry

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:

  • Fix the typing issues that mypy finds now that it sees the dependencies.
  • Find minimal versions of the required packages (and update oldies environment accordingly_)
  • Make readthedocs work
  • Fix benchmark-analyze (although I don't think it is a pixi issue)
  • Update contributing instructions

@stanmart stanmart marked this pull request as ready for review September 3, 2024 14:05
@stanmart
Copy link
Collaborator Author

stanmart commented Sep 4, 2024

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:

  • It makes package resolution somewhat slower (I think it makes sure that the dependencies for tabmat are installed).
  • I have not yet figured out how to manually trigger a rebuild of the package, which is necessary when the C++/Cython modules are changed.

What do you think @pavelzw?

Copy link
Member

@MarcAntoineSchmidtQC MarcAntoineSchmidtQC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left 2 questions regarding the CI setup, but otherwise looks good. Tested on my mac and everything works perfectly.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
@MarcAntoineSchmidtQC
Copy link
Member

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
Copy link
Collaborator Author

stanmart commented Sep 10, 2024

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.

@stanmart stanmart merged commit 8c88f59 into main Sep 11, 2024
24 checks passed
@stanmart stanmart deleted the switch-to-pixi branch September 11, 2024 06:30
@pavelzw
Copy link
Member

pavelzw commented Sep 11, 2024

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

xref prefix-dev/pixi#1046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants