python-tooling icon indicating copy to clipboard operation
python-tooling copied to clipboard

Discuss `uv` and add it to the website.

Open samcunliffe opened this issue 1 year ago • 1 comments

Which Section of the Documentation Needs Improving?

We should decide on a traffic light for uv and add it to the appropriate doc page. In case we decide 🟢, we should add it to the template and update docs accordingly.

What Can be Improved About This Section

Add uv. Feels like it's at least an amber 🟠.

How to Improve This Section

No response

samcunliffe avatar Jun 13 '24 10:06 samcunliffe

I'm using it and it is super quick. I was using https://github.com/tox-dev/tox-uv, but it was very buggy, not sure if that was tox-uv's fault or uv's, so I removed it from my CI for now.

paddyroddy avatar Jun 13 '24 10:06 paddyroddy

Notes from hackmorning 2024-10-22

  • Note: We should also add pixi as 🟠.

Discussion

The "problem" with uv is that it does more than one thing.

  1. A drop-in replacement for pip.
  2. A replacement virtual environment manager uv venv (using venv syntax).
  3. A project installation dependency thing (replacement for e.g. setuptools.. more similar to pipfile).

Relating to venv

  • venvs per project. So @dstansby 's preference for a central place for all virtual environments is already broken by venv.
  • uv may give the option to put all of the environments in a central place uv/#1495
  • Style choice?

Research computing people (@heatherkellyucl @ikirker 👋) strongly discourage conda on UCL-ARC clusters. So we should move away from recommending it.

Summary

If you're new to the game you should use uv. If you prefer conda, maybe pixi is faster, but you're not new to the game. And we're targeting noobs.

Decisions

We will replace conda create etc commands in our readmes and instructions with uv equivalent commands.

  • Our cookiecutter template doesn't have a workflow to publish via conda-forge despite us advocating the conda tool.
    • This is no different from recommending uv venv but not using the full-blown uv project mechanics.

Add uv to the virtual environments page as amber with a caveat that it will likely become green when some feature requests are ironed out..

samcunliffe avatar Oct 22 '24 09:10 samcunliffe

This was a good read @samcunliffe @matt-graham https://til.simonwillison.net/python/uv-cli-apps

paddyroddy avatar Oct 24 '24 08:10 paddyroddy

Could change the installation command to

uvx cookiecutter gh:UCL-ARC/python-tooling --checkout latest

paddyroddy avatar Oct 24 '24 08:10 paddyroddy

Could change the installation command to

uvx cookiecutter gh:UCL-ARC/python-tooling --checkout latest

Yeah. See Matt's suggestion on my PR.

Shall we make a new issue? I also think we could simplify the instructions a bit. And perhaps they should be above the avatars? Could be tackled all in one along with

  • #466

samcunliffe avatar Oct 24 '24 10:10 samcunliffe

Yeah maybe, it does seem a nice one liner for newbies

paddyroddy avatar Oct 24 '24 10:10 paddyroddy