Conversation
Resolves #419.
|
@dstansby I thought you were on holiday! |
🙈 🙉 🙊 |
matt-graham
left a comment
There was a problem hiding this comment.
Other than minor typo fix looks good to me! Based on in-person conversation about uvx / uv tool install versus current solution, I think my comment below may be better dealt with in a separate future pull-request.
README.md
Outdated
| 1. Install [cookiecutter] in a `uv venv` or `conda` environment (commented lines for | ||
| `uv venv` example). | ||
|
|
||
| ``` | ||
| # conda create --channel conda-forge --name new-env-name | ||
| # conda activate new-env-name | ||
| # conda install pip | ||
| pip install cookiecutter | ||
| # uv venv # creates a .venv directory wherever you are | ||
| # source ./.venv/bin/activate | ||
| uv pip install cookiecutter |
There was a problem hiding this comment.
As an alternative to installing in a (project specific) uv virtual environment we could recommend using the uv tools feature. Equivalent would then be something like
uv tool install cookiecutter
which will install cookiecutter in an isolated virtual environment and set up so cookiecutter is added to path.
Alternatively we could recommend using uvx to install and run directly in a temporary virtual environment
uvx cookiecutter gh:ucl-arc/python-tooling
This appears to be fairly minimal overhead (reports 13ms for installing packages in temporary virtual environment in my local system so no noticeable lag).
Problem with the latter is it then makes it difficult to keep instructions generic across different package manager / virtual environment solutions.
There was a problem hiding this comment.
A bit of a rewording of the whole instructions then.
How about just laying out a few options in prose (doing away with step numbers)...
If you use [`uv`](LINK) you can use our template with the following one-liner
```sh
uvx cookiecutter gh:ucl-arc/python-tooling
```
You could also [install cookiecutter]() system-wide if you're likely to want to use cookiecutter again.
We like installing it as a [uv tool](LINKTOUVTOOLSDOCS)
```
uv tool install cookiecutter
cookiecutter gh:ucl-arc/python-tooling
```
Co-authored-by: Sam Cunliffe <samcunliffe@users.noreply.github.com>
paddyroddy
left a comment
There was a problem hiding this comment.
A wonderful fruitful (🫐) discussion was had
Sure! Though I think worth tackling. |
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
I've attempted to simplify the user-facing quick-start instructions. Not a huge fan of enumerated instructions and the optional (but cool) one-liner it doesn't really fit in 1. 2. 3.... Also it's a bit overkill to have a venv/conda environment just for cookiecutter itself. The cookiecutter docs recommend `pipx install`. I claim that we want to encourage `uvx` because it's fast and cool 😎 . I've spent a bit of effort trying to be clear but comments on clarity etc are very welcome. I also moved and merged the dev instructions into CONTRIBUTING so README is _**just**_ user-facing. And CONTRIBUTING is just dev. This addresses - #466 And two comments - #464 (comment) - #419 (comment) --------- Co-authored-by: David Stansby <dstansby@gmail.com> Co-authored-by: Patrick J. Roddy <patrickjamesroddy@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Resolves #419.
Notably not done, is that I've not updated the tutorial.md to use
uvinstead of Anaconda. I'd need to use a Windows machine to test the instructions before I'd feel confident changing the tutorial.