Azure / Azure/azure-functions-durable-python

Package is accidentally shipping its tests

Đang mở Phù hợp với người mới
#475 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug fixed-in-v2 P3
Ngôn ngữ chính
Python
Star
157
Fork
70
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
2

Mô tả

🐛 **Describe the bug**

It looks like this package is accidentally shipping its tests. This can be easily verified with:

```sh
pip show --files azure-functions-durable
```

Which shows that there are 76 tests files shipped by the package into a top-level package called `tests`. This has a few small issues:

- It bloats the package size.
- It leads to collisions with other packages that accidentally ship their tests as `tests` module (they just overwrite each other in the `site-packages` directory).
- It can lead to issues for users if it conflicts with _their_ `tests` package.

🤔 **Expected behavior**

The shipped package should not include its tests.

**Possible cause / solution**

It looks like the `setup.py` already lists `tests` under `exclude`:

https://github.com/Azure/azure-functions-durable-python/blob/b30d0a64f7b8c1042f066006af57b74976cdf9d2/setup.py#L29-L34

However if I remember correctly the pattern should be `tests/*` or `tests*` or `tests.*` or so to really affect _subfolders_. Otherwise the listing of `azure` itself would lead to the exclusion of the whole code (in this case it is most likely just about the exclusion of the top-level `__init__.py`).

☕ **Steps to reproduce**

```sh
pip install azure-functions-durable
pip show --files azure-functions-durable
```

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

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra cấu hình loại trừ package trong setup.py, đặc biệt là mục tests hiện có. Build hoặc cài đặt package rồi chạy pip show --files azure-functions-durable để xác minh kết quả. Hoàn tất khi package đã cài đặt không còn bao gồm package tests ở cấp cao nhất hoặc các tệp kiểm thử của package đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
72/100

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.