Azure / Azure/azure-functions-durable-python

Package is accidentally shipping its tests

Aperta Adatta ai principianti
#475 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug fixed-in-v2 P3
Lingua principale
Python
Stelle
157
Fork
70
Merge medio
2g 10h
PR unite (30g)
2

Descrizione

🐛 **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
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by inspecting the package exclusion configuration in setup.py, especially the existing tests entry. Build or install the package and run pip show --files azure-functions-durable to verify the result. Done means the installed package no longer includes the top-level tests package or its test files.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
72/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.