JulianKarlBauer / JulianKarlBauer/python_template

Migrate to uv / ruff

Đang mở
#4 1 bình luận 0 reaction 2 người được giao Được @JulianKarlBauer nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.