The wheel of electricitymap-contrib published to the internal Artifact Registry includes [project.scripts] entry points from the contrib repo's workspace root pyproject.toml. These are dev-only scripts pointing to a scripts.tooling module that does not exist in the published wheel.
When any downstream installs electricitymap-contrib, these binaries land in the venv's bin/. The four shared names (check, format, lint, test) collide with the same names from electricitymap-pkg-tooling and from every consumer project. Last-installed wins, so depending on install order you can get the contrib version, which then fails at runtime with: ModuleNotFoundError: No module named 'scripts'
We hit this on the flowtracing UV-workspace conversion PR (electricitymaps/electricitymaps#12589): Earthly's +test target invoked uv run check and got contrib's broken entry point instead of pkg-tooling's. Worked around for now by invoking pkg-tooling via python -c "from electricitymap.pkg_tooling.scripts import check; check()" in the three flowtracing Earthfiles.
Fix: The wheel built from contrib/pyproject.toml should not declare [project.scripts] for dev-only tools. Move those entries to a [dependency-groups]-only file or guard them so the published wheel ships clean. After the fix lands and a new wheel is on the registry, remove the python -c workaround in:
- projects/flowtracing/libs/flowtracing/Earthfile
- projects/flowtracing/pipelines/flowtracing/Earthfile
- projects/flowtracing/pipelines/forecast-flowtracing/Earthfile
Reference: ref: electricitymaps/electricitymaps#12589
The wheel of electricitymap-contrib published to the internal Artifact Registry includes [project.scripts] entry points from the contrib repo's workspace root pyproject.toml. These are dev-only scripts pointing to a scripts.tooling module that does not exist in the published wheel.
When any downstream installs electricitymap-contrib, these binaries land in the venv's bin/. The four shared names (check, format, lint, test) collide with the same names from electricitymap-pkg-tooling and from every consumer project. Last-installed wins, so depending on install order you can get the contrib version, which then fails at runtime with: ModuleNotFoundError: No module named 'scripts'
We hit this on the flowtracing UV-workspace conversion PR (electricitymaps/electricitymaps#12589): Earthly's +test target invoked uv run check and got contrib's broken entry point instead of pkg-tooling's. Worked around for now by invoking pkg-tooling via python -c "from electricitymap.pkg_tooling.scripts import check; check()" in the three flowtracing Earthfiles.
Fix: The wheel built from contrib/pyproject.toml should not declare [project.scripts] for dev-only tools. Move those entries to a [dependency-groups]-only file or guard them so the published wheel ships clean. After the fix lands and a new wheel is on the registry, remove the python -c workaround in:
Reference: ref: electricitymaps/electricitymaps#12589