JulianKarlBauer / JulianKarlBauer/python_template
Migrate to uv / ruff
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.