ComPWA / policy

Pre-commit hooks that ensure that ComPWA repositories have a similar developer set-up
https://compwa.github.io/policy
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Remove `pre-commit-uv` and `uv` from environment definition #450

Closed redeboer closed 1 month ago

redeboer commented 1 month ago

https://github.com/ComPWA/policy/issues/407 has resulted in a subtle bug: pre-commit-uv pulls in uv into the virtual environment, which results in caching problems if the environment is installed through a global installation of uv (a global uv installation is required since https://github.com/ComPWA/policy/issues/333):

error: Failed to generate package metadata for `compwa-github-io==0.0.1 @ editable+.`                                                                                                                                                                                                                                          
  Caused by: Failed to deserialize cache entry
  Caused by: data did not match any variant of untagged enum CacheInfoWire

It should instead be recommended to install pre-commit-uv globally as well once with

uv tool install pre-commit --with pre-commit-uv --force-reinstall

(see these instructions).

### Tasks
- [ ] https://github.com/ComPWA/policy/pull/452
- [ ] https://github.com/ComPWA/actions/pull/113
- [ ] https://github.com/ComPWA/ampform/pull/441
- [ ] https://github.com/ComPWA/ampform-dpd/pull/144
- [ ] https://github.com/ComPWA/benchmarks/pull/26
- [ ] https://github.com/ComPWA/gluex-amplitude/pull/35
- [ ] https://github.com/ComPWA/gluex-nstar/pull/108
- [ ] https://github.com/ComPWA/jax-mini-benchmark/pull/12
- [ ] https://github.com/ComPWA/K-matrix-research/pull/101
- [ ] https://github.com/ComPWA/Nstar-docs/pull/28
- [ ] https://github.com/ComPWA/polarimetry/pull/366
- [ ] https://github.com/ComPWA/qrules/pull/299
- [ ] https://github.com/ComPWA/sphinx-api-relink/pull/32
- [ ] https://github.com/ComPWA/sphinx-hep-pdgref/pull/43
- [ ] https://github.com/ComPWA/sphinx-pybtex-etal-style/pull/11
- [ ] https://github.com/ComPWA/tensorwaves/pull/535
redeboer commented 1 month ago

Actually, the caching problems may originate from the fact that the version of packages that are installed in editable mode with a dynamic version through setuptools-scm.

The problem pops up irregularly, so I'm not sure yet. It could also be caused by packages that do not have a src/ folder.