ImperialCollegeLondon / ImperialCollegeLondon/python-template

Update to use `uv init`

Open
#572 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14
Forks
8
PR merge metrics
No merged PRs in 30d

Description

This tool current defines the repo structure and the contents of the `pyproject.toml` in a fairly inflexible manner.

Since the only packaging option is now `uv`, we should consider using the `uv init` command to create the repo structure. This will allow more flexibility in the types of software that can be built (libraries, executables, packages, etc)

### Proposed approach

1. Continue to use cookiecutter for configurable options and non-python package files (pre-commit, `.github/`, etc)
2. In the post-gen hooks script:
1. Run `uv init` using configurable options selected in the cookiecutter command.
2. Add the extra config to the generated `pyproject.toml` (mypy, ruff, pytest, etc)
3. Keep existing approach of adding dependencies

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the post-generation hook and the existing cookiecutter handling for repository structure and pyproject.toml. Trace how configurable options and dependencies are currently applied, then generate representative library and executable projects to verify that uv init creates the structure and the extra mypy, ruff, and pytest configuration is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.