-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtox.ini
More file actions
40 lines (38 loc) · 1.38 KB
/
Copy pathtox.ini
File metadata and controls
40 lines (38 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# content of: tox.ini , put in same dir as setup.py
[tox]
min_version = 4.20
# lista de entornos donde instalar el paquete y testear
envlist = py312
# indicar un directorio fuera de .tox donde situar el zip con el egg
# distdir=./dist-egg
# isolated_build = True
[testenv]
# install testing framework
# ... or install anything else you might need here
deps =
-r requirements.txt
# todas las dependencias que no se incluyan en el requirements van aqui
# black
# coverage
# bandit
# run the tests
# ... or run any other command line tool you need to run here
commands =
# No especifico los directorios a formatear porque
# se indican en exclude en pyproject.toml
# Ver diferencias, no formatea:
black --diff --color .
# Formatea el codigo en el entorno local (y en el virtual)
black .
# pytest test
# Porcentaje de codigo cubierto
coverage run -m pytest
# Anotar el código
# Crea el directorio en el entorno local, no en el virtual
coverage annotate -d ./coverage_annotation
# Ver informe
coverage report -m
# Chequear vulnerabilidades:
bandit -r ./src
# crear paquete distribucion con wheel (en directorio dist)
python setup.py sdist bdist_wheel