Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.12.19"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt && pip install -e ".[postgres,mysql]"
run: uv sync --locked --python 3.11 --extra dev --extra postgres --extra mysql
- name: Download test database
run: |
mkdir -p data
Expand All @@ -56,7 +57,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run deterministic tests
run: |
pytest tests/test_componentes.py tests/test_code_sql.py tests/test_nodes.py \
uv run --no-sync pytest tests/test_componentes.py tests/test_code_sql.py tests/test_nodes.py \
tests/test_integracao.py tests/test_main_engine_integracao.py \
tests/test_biblioteca_integracao.py tests/test_data_exploration.py \
tests/test_data_exploration_postgres.py \
Expand Down Expand Up @@ -86,10 +87,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.12.19"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt && pip install -e ".[postgres,mysql]"
run: uv sync --locked --python 3.11 --extra dev --extra postgres --extra mysql

# Mesmo setup de banco dos outros jobs
- name: Download test database
Expand All @@ -116,7 +118,7 @@ jobs:
- name: Record or update VCR cassettes
if: steps.check_key.outputs.available == 'true' # só roda se tiver key
run: |
pytest tests/test_nodes.py tests/test_integracao.py \
uv run --no-sync pytest tests/test_nodes.py tests/test_integracao.py \
-v -s --record-mode=rewrite -m "not real_api"

# Commita os cassettes de volta no repo
Expand Down Expand Up @@ -152,10 +154,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.12.19"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt && pip install -e ".[postgres,mysql]"
run: uv sync --locked --python 3.11 --extra dev --extra postgres --extra mysql

# ✅ Banco de dados presente aqui também
- name: Download test database
Expand All @@ -180,4 +183,4 @@ jobs:

- name: Run real API smoke tests
if: steps.check_key.outputs.available == 'true' # ✅ condição correta
run: pytest tests/test_real_api_smoke.py -v -s -m real_api
run: uv run --no-sync pytest tests/test_real_api_smoke.py -v -s -m real_api
2 changes: 1 addition & 1 deletion INDICE.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
├── 📄 DESENVOLVIMENTO.md Guia de setup e desenvolvimento local
│
├── 🔧 pyproject.toml Metadados e dependências do projeto
├── 📋 requirements.txt Dependências pip
├── 📋 uv.lock Versões usadas no desenvolvimento e CI
├── .gitignore Padrões ignorados pelo git
│
├── 🚀 main.py Script de execução principal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ text-to-insight --db-url postgresql://usuario:senha@host:5432/banco --docs-dir .

## Desenvolvimento

- [Guia de desenvolvimento e testes](https://github.com/gruporaia/TextToInsight/blob/main/docs/DESENVOLVIMENTO.md)
Para contribuir a partir de um clone, siga o [guia de desenvolvimento e testes](docs/DESENVOLVIMENTO.md). Ele usa o uv para instalar o código local e as mesmas versões de dependências que os testes do GitHub usam.

- [Arquitetura](https://github.com/gruporaia/TextToInsight/blob/main/docs/ARQUITETURA.md)
- Benchmarks: [BIRD](https://github.com/gruporaia/TextToInsight/blob/main/docs/BENCHMARK_BIRD.md), [Spider 1.0 e 2.0](https://github.com/gruporaia/TextToInsight/blob/main/docs/BENCHMARK_SPIDER.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/BENCHMARK_BIRD.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ flowchart TD
## 2. Preparacao do Ambiente e Download dos Dados

### 2.1. Ativacao do Ambiente Virtual
Certifique-se de que o ambiente virtual do projeto esteja ativo antes de executar os scripts:
Prepare a `.venv` seguindo o [setup local do guia de desenvolvimento](DESENVOLVIMENTO.md#setup-local). Ative o ambiente se for executar os exemplos abaixo com `python` diretamente:
```bash
source .venv/bin/activate
```
Expand Down Expand Up @@ -78,7 +78,7 @@ Antes de iniciar execucoes com chamadas a modelos de linguagem, valide a integri
### 3.1. Testes Unitarios Locais
Execute a suite de testes unitarios da integracao BIRD via pytest:
```bash
pytest tests/test_bird_eval.py -v
uv run --no-sync pytest tests/test_bird_eval.py -v
```
Caracteristicas da suite:
- Nao consome chamadas de rede nem tokens de LLM.
Expand Down
4 changes: 2 additions & 2 deletions docs/BENCHMARK_SPIDER.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ flowchart TD
## 2. Environment & Spider 2.0 Lite Dataset Setup

### 2.1. Virtual Environment Activation
Ensure that the project's virtual environment is activated before running evaluation scripts:
Create the project's `.venv` by following the [development setup guide](DESENVOLVIMENTO.md#setup-local). Activate it if you run the examples below directly with `python`:
```bash
source .venv/bin/activate
```
Expand Down Expand Up @@ -87,7 +87,7 @@ Before launching live model evaluation runs, verify system integrity using the a
### 3.1. Fast Isolated Unit Tests
Execute the comprehensive Spider 2.0 test suite via `pytest`:
```bash
pytest tests/test_spider2_eval.py -v
uv run --no-sync pytest tests/test_spider2_eval.py -v
```
Characteristics of this test suite:
- **Zero API Dependencies:** Requires no active network connection, OpenAI, or Google API credits.
Expand Down
Loading
Loading