code-style has different behavior between uv and poetry backends
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 67
Description
### 🔍 Before submitting the issue
- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment
### 🐞 Description of the bug
If code-style is run on a project using poetry, and `skip-install` is set to False, then the entire project is installed with all dependencies:
https://github.com/ansys/actions/blob/1240aef678c0335bbc502c6f8097e17d1e514246/code-style/action.yml#L239
If however, code-style is run on a project using uv with the same configuration, then only the dependencies in the wheel are installed:
https://github.com/ansys/actions/blob/1240aef678c0335bbc502c6f8097e17d1e514246/code-style/action.yml#L241
We were previously depending on the poetry behavior, because as part of the project installation we install mypy as a dev dependency. mypy needs to be installed in the environment itself to work. Since mypy is a dev dependency, it's installed with a poetry project, but not installed with a uv project.
uv should probably just do a `uv sync`, such that the behavior is more similar to the poetry case.
### 📝 Steps to reproduce
See an example here https://github.com/ansys-internal/grantami-system/actions/runs/16201141925/job/45740217086 of CI running, where mypy is not available after project install
### 💻 Which operating system are you using?
Windows
### 📀 Which ANSYS version are you using?
N/A
### 🐍 Which Python version are you using?
3.12
### 📦 Installed packages
```shell
Actions v10.0.12
```
Contributor guide
Research direction
Start in code-style/action.yml at the installation commands around lines 239 and 241, comparing the Poetry and uv backend paths when skip-install is false. Reproduce the Windows/Python 3.12 case from the linked grantami-system CI run and verify that the uv path makes mypy available after project installation, matching the Poetry behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100