JulianKarlBauer / JulianKarlBauer/python_template
Migrate to uv / ruff
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Use uv and ruff. This can be done along the following lines:
1 .Initiate a new packaged project using
```bash
uv init --python 3.12 --package
```
Environments are created automatically.
2. Add a license.
3. Add tests:
```bash
uv add --dev pytest
mkdir tests
touch tests/test_basic.py
```
Write a simple test, e.g.
```python
# tests/test_basic.py
from my_package import __version__
def test_version():
assert isinstance(__version__, str)
```
Run test
```bash
uv run pytest
```
4. Add pre-commit and other desired dependencies
```bash
uv add --dev pre-commit ruff mypy
```
5. Specify `pre-commit-config.yaml`.
6. Consider the following ideas:
Modern projects also share *folder settings* for VS-code in a `.vscode` folder with `settings.json`. VS Code add-ons can be recommended as well.
7. Add documentation.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.