6 ms·
uv sync if you clone a github repo
by new_user_final 2y ago
uv sync
if you clone a github repo
- BiteCode_dev 2y agouv run in the freshly cloned repo will create the venv and install all deps automatically. You can even use --extra and --group with uv run like with uv sync. But in a monorepo, those are rare to use.
- theogravity 2y agoThanks for the info. I looked at the group documentation, but it's not clear to me why I would want to use it, or where I would use it: https://docs.astral.sh/uv/concepts/projects/layout/#default-groups https://docs.astral.sh/uv/concepts/projects/layout/#default-... (I'm a JS dev who has to write a set of python packages in a monorepo.)
- BiteCode_dev 2y agosync is something you would rarely use, it's most useful for scripting. uv run is the bread and meat of uv, it will run any command you need in the project, and ensure it will work by synching all deps and making sure your command can import stuff and call python. In fact, if you run a python script, you should do uv run python the_script.py, It's so common uv run the_script.py will work as a shortcut. I will write a series of article on uv on bitecode.dev. I will write it so that it work for non python devs as well.
- theogravity 2y agoDid you mean group and not sync? Really looking forward to the articles!
- BiteCode_dev 2y agoSorry i misread and stayed on sync. Group and extras are for lib makers to create sets of optionals dependenacies. Groups are private ones for maintainers, extras are oublic one for users.