Open
Description
Provide a minimally reproducible example
You can clone my repo and initialize the environment with uv sync
. The code in the repo is not relevant, but I'm sure that you can reproduce this issue in 5mins.
From line 43 - line 51 in my pyproject.toml
, I setup sources of torch for uv to resolve.
[[tool.uv.index]]
name="torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name="torch-gpu"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
When I run uv run nbdev_export
, nbdev_export
keeps overwriting the name fields to the project name, which is really annoying, like below
[[tool.uv.index]]
name="tensor-network-code" # my project name
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name="tensor-network-code" # my project name
url = "https://download.pytorch.org/whl/cu128"
explicit = true
Did you just do the plain string replacement when processing pyproject.toml
instead of parsing it correctly?