Skip to content

Commit be8196e

Browse files
author
Dan
committed
feat: CI workflow added
1 parent 4607c3e commit be8196e

32 files changed

+2228
-94095
lines changed

.coverage

0 Bytes
Binary file not shown.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: 🐛 Reporte de Bug
2+
description: Crear un reporte de bug para ayudar a mejorar Cryptic
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Gracias por reportar un bug. Por favor completa toda la información posible para ayudar a reproducir y solucionar el problema.
10+
11+
- type: textarea
12+
id: descripcion
13+
attributes:
14+
label: Descripción del problema
15+
description: Una descripción clara y concisa del bug encontrado.
16+
placeholder: Describe qué sucede y qué esperabas que ocurriera.
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: pasos
22+
attributes:
23+
label: Pasos para reproducir
24+
description: Lista los pasos exactos para reproducir el problema.
25+
placeholder: |
26+
1. Ejecuté el comando '...'
27+
2. Seleccioné la opción '...'
28+
3. Apareció el error '...'
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: comportamiento_esperado
34+
attributes:
35+
label: Comportamiento esperado
36+
description: Describe qué debería ocurrir normalmente.
37+
placeholder: El programa debería mostrar el resultado correcto sin errores.
38+
39+
- type: textarea
40+
id: comportamiento_actual
41+
attributes:
42+
label: Comportamiento actual
43+
description: Describe exactamente qué ocurre (incluye mensajes de error si los hay).
44+
placeholder: Aparece el mensaje de error "..." y el programa se cierra.
45+
46+
- type: textarea
47+
id: datos_prueba
48+
attributes:
49+
label: Datos de prueba
50+
description: Proporciona datos de ejemplo que reproduzcan el problema (sin información sensible real).
51+
placeholder: |
52+
Input: "ejemplo@dominio.com"
53+
Output esperado: "Email detectado correctamente"
54+
Output actual: "Error inesperado"
55+
56+
- type: dropdown
57+
id: version
58+
attributes:
59+
label: Versión de Cryptic
60+
description: ¿Qué versión de Cryptic estás usando?
61+
options:
62+
- 0.1.0 (última)
63+
- 0.0.x (desarrollo)
64+
- Otra (especificar abajo)
65+
validations:
66+
required: true
67+
68+
- type: dropdown
69+
id: python_version
70+
attributes:
71+
label: Versión de Python
72+
description: ¿Qué versión de Python estás usando?
73+
options:
74+
- Python 3.12
75+
- Python 3.11
76+
- Python 3.10
77+
- Python 3.9
78+
- Python 3.8
79+
- Otra
80+
validations:
81+
required: true
82+
83+
- type: dropdown
84+
id: sistema_operativo
85+
attributes:
86+
label: Sistema operativo
87+
description: ¿En qué sistema operativo ocurre el problema?
88+
options:
89+
- Linux
90+
- macOS
91+
- Windows
92+
- Otro
93+
validations:
94+
required: true
95+
96+
- type: textarea
97+
id: contexto_adicional
98+
attributes:
99+
label: Información adicional
100+
description: Cualquier información adicional que pueda ayudar a solucionar el problema.
101+
placeholder: Logs, configuración específica, entorno de desarrollo, etc.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: 💡 Solicitud de Característica
2+
description: Sugerir una nueva característica o mejora para Cryptic
3+
title: "[Feature]: "
4+
labels: ["enhancement", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
¡Gracias por sugerir una mejora! Por favor describe claramente la nueva característica que te gustaría ver implementada.
10+
11+
- type: textarea
12+
id: descripcion
13+
attributes:
14+
label: Descripción de la característica
15+
description: Describe claramente qué nueva funcionalidad o mejora propones.
16+
placeholder: |
17+
Me gustaría que Cryptic pudiera detectar [tipo de dato] porque [razón/justificación].
18+
Actualmente, cuando intento [escenario de uso], no puedo [problema].
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: casos_uso
24+
attributes:
25+
label: Casos de uso
26+
description: Describe escenarios específicos donde esta característica sería útil.
27+
placeholder: |
28+
1. Como desarrollador, quiero detectar [tipo de dato] para [objetivo]
29+
2. Como analista de seguridad, necesito [funcionalidad] para [proceso]
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: propuesta_solucion
35+
attributes:
36+
label: Propuesta de solución
37+
description: Describe cómo crees que debería implementarse esta característica (opcional pero útil).
38+
placeholder: |
39+
Podría implementarse agregando:
40+
- Un nuevo patrón de detección en [módulo]
41+
- Una nueva opción de configuración [--opcion]
42+
- Una extensión de la API existente
43+
44+
- type: textarea
45+
id: alternativas_consideradas
46+
attributes:
47+
label: Alternativas consideradas
48+
description: ¿Has considerado otras formas de resolver este problema?
49+
placeholder: |
50+
He intentado [solución alternativa] pero no funciona porque [limitación].
51+
También consideré [otra aproximación] pero sería menos eficiente.
52+
53+
- type: textarea
54+
id: ejemplos
55+
attributes:
56+
label: Ejemplos de uso
57+
description: Proporciona ejemplos concretos de cómo se usaría esta característica.
58+
placeholder: |
59+
```python
60+
# Ejemplo de API
61+
analyzer = CrypticAnalyzer()
62+
result = analyzer.analyze_data("dato_especial")
63+
print(result.feature_propuesta)
64+
```
65+
66+
```bash
67+
# Ejemplo de CLI
68+
cryptic analyze "dato_especial" --nueva-opcion
69+
```
70+
71+
- type: dropdown
72+
id: prioridad
73+
attributes:
74+
label: Prioridad
75+
description: ¿Qué tan importante es esta característica para ti?
76+
options:
77+
- Baja (nice to have)
78+
- Media (mejoraría significativamente el proyecto)
79+
- Alta (necesaria para casos de uso importantes)
80+
- Crítica (bloquea funcionalidad esencial)
81+
validations:
82+
required: true
83+
84+
- type: textarea
85+
id: contexto_adicional
86+
attributes:
87+
label: Información adicional
88+
description: Cualquier contexto adicional, referencias o comentarios que puedan ayudar.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: ❓ Pregunta / Soporte
2+
description: Hacer una pregunta o solicitar ayuda sobre Cryptic
3+
title: "[Question]: "
4+
labels: ["question", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
¿Tienes dudas sobre cómo usar Cryptic? ¿Necesitas ayuda con la instalación o configuración? ¡Estamos aquí para ayudar!
10+
11+
- type: dropdown
12+
id: tipo_pregunta
13+
attributes:
14+
label: Tipo de pregunta
15+
description: ¿Qué tipo de ayuda necesitas?
16+
options:
17+
- Instalación y configuración
18+
- Uso de la API
19+
- Uso de la CLI
20+
- Desarrollo y contribución
21+
- Reporte de bug (usar template específico)
22+
- Solicitud de característica (usar template específico)
23+
- Otro
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: pregunta
29+
attributes:
30+
label: Tu pregunta
31+
description: Describe claramente qué necesitas saber o qué problema estás teniendo.
32+
placeholder: |
33+
Estoy intentando [acción] pero me encuentro con [problema].
34+
¿Cómo puedo [objetivo específico]?
35+
No entiendo cómo funciona [funcionalidad específica].
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: contexto
41+
attributes:
42+
label: Contexto adicional
43+
description: Proporciona detalles que puedan ayudar a responder tu pregunta.
44+
placeholder: |
45+
- ¿Qué versión de Cryptic estás usando?
46+
- ¿Qué versión de Python tienes?
47+
- ¿En qué sistema operativo?
48+
- ¿Qué has intentado hasta ahora?
49+
50+
- type: textarea
51+
id: codigo_ejemplo
52+
attributes:
53+
label: Código de ejemplo (opcional)
54+
description: Si aplica, incluye código relevante que muestre tu problema o intento de solución.
55+
placeholder: |
56+
```python
57+
from cryptic import CrypticAnalyzer
58+
59+
# Mi código aquí
60+
analyzer = CrypticAnalyzer()
61+
# ¿Qué va aquí?
62+
```
63+
64+
- type: textarea
65+
id: error_logs
66+
attributes:
67+
label: Mensajes de error (opcional)
68+
description: Si hay errores, inclúyelos completos aquí.
69+
placeholder: |
70+
Error:
71+
Traceback (most recent call last):
72+
File "...", line ..., in ...
73+
...
74+
render: text

.github/workflows/tests.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up UV
20+
uses: astral-sh/setup-uv@v3
21+
with:
22+
version: "0.5"
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: uv sync --frozen --extra dev
27+
28+
- name: Lint with ruff
29+
run: uv run ruff check cryptic tests
30+
31+
- name: Format with ruff
32+
run: uv run ruff format --check cryptic tests
33+
34+
- name: Test with pytest
35+
run: uv run pytest --cov=cryptic --cov-report=xml --cov-report=term-missing
36+
37+
- name: Upload Coverage Data
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: covdata-${{ matrix.python-version }}
41+
path: coverage.xml
42+
43+
coverage:
44+
runs-on: ubuntu-latest
45+
needs: test
46+
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
47+
steps:
48+
- name: Checkout Code Repository
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: "3.12"
55+
56+
- name: Download Coverage Reports
57+
uses: actions/download-artifact@v4
58+
with:
59+
pattern: covdata-*
60+
merge-multiple: true
61+
62+
- name: Code Coverage Summary Report
63+
uses: irongut/CodeCoverageSummary@v1.3.0
64+
with:
65+
filename: coverage.xml
66+
badge: true
67+
fail_below_min: true
68+
format: markdown
69+
output: both
70+
hide_complexity: true
71+
thresholds: "50 50"
72+
73+
- name: Add Coverage PR Comment
74+
uses: marocchino/sticky-pull-request-comment@v2
75+
with:
76+
path: code-coverage-results.md

.gitignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ wheels/
99
# Virtual environments
1010
.venv
1111

12+
# UV cache
13+
.uv
14+
15+
# Ruff cache
1216
.ruff_cache
17+
18+
# Testing
1319
.pytest_cache
14-
.vscode
20+
.coverage
21+
coverage.xml
22+
htmlcov/
1523

16-
demo.py
24+
# IDE
25+
.vscode

0 commit comments

Comments
 (0)