JulianKarlBauer / JulianKarlBauer/python_template

Migrate to uv / ruff

Abierto
#4 1 comentario 0 reacciones 2 asignados Reclamado por @JulianKarlBauer Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.