Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criar busca de exemplo para DOU e Querido Diário simultâneo #132

Merged
merged 2 commits into from
Aug 30, 2024
Merged
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
14 changes: 11 additions & 3 deletions dag_confs/examples_and_tests/multiple_searchs_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ dag:
id: multiple_searchs_example
description: DAG de teste com múltiplas buscas
schedule: 0 8 * * MON-FRI
tags:
- inlabs
search:
- header: "Pesquisa no DOU"
sources:
- INLABS
- DOU
terms:
- dados abertos
- governo aberto
Expand All @@ -23,6 +21,16 @@ dag:
- lei de acesso à informação
force_rematch: On
ignore_signature_match: On
- header: "Pesquisa no DOU e QD (misto)"
sources:
- DOU
- QD
terms:
- dados abertos
- governo aberto
- lei de acesso à informação
force_rematch: On
ignore_signature_match: On
report:
emails:
- destination@economia.gov.br
Expand Down
43 changes: 43 additions & 0 deletions docs/docs/como_funciona/exemplos.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,47 @@ dag:
emails:
- destination@gestao.gov.br
subject: "Teste do Ro-dou"
```

### Exemplo 11
Esta configuração permite múltiplas buscas utilizando o mesmo arquivo.
O Ro-dou permite numa mesma busca juntar resultados do DOU e Querido Diário.

```yaml
dag:
id: multiple_searchs_example
description: DAG de teste com múltiplas buscas
search:
- header: "Pesquisa no DOU"
sources:
- DOU
terms:
- dados abertos
- governo aberto
- lei de acesso à informação
force_rematch: On
ignore_signature_match: On
- header: "Pesquisa no QD"
sources:
- QD
terms:
- dados abertos
- governo aberto
- lei de acesso à informação
force_rematch: On
ignore_signature_match: On
- header: "Pesquisa no DOU e QD (misto)"
sources:
- DOU
- QD
terms:
- dados abertos
- governo aberto
- lei de acesso à informação
force_rematch: On
ignore_signature_match: On
report:
emails:
- destination@gestao.gov.br
subject: "Teste do Ro-dou"
```
25 changes: 23 additions & 2 deletions tests/parsers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"dataset": None,
"description": "DAG de teste com múltiplas buscas",
"doc_md": None,
"tags": {"dou", "generated_dag", "inlabs"},
"tags": {"dou", "generated_dag"},
"owner": [],
"search": [
{
Expand All @@ -419,7 +419,7 @@
"lei de acesso à informação",
],
"header": "Pesquisa no DOU",
"sources": ["INLABS"],
"sources": ["DOU"],
"sql": None,
"conn_id": None,
"territory_id": None,
Expand Down Expand Up @@ -454,6 +454,27 @@
"use_summary": False,
"department": None,
},
{
"terms": [
"dados abertos",
"governo aberto",
"lei de acesso à informação",
],
"header": "Pesquisa no DOU e QD (misto)",
"sources": ["DOU", "QD"],
"sql": None,
"conn_id": None,
"territory_id": None,
"dou_sections": ["TODOS"],
"date": "DIA",
"field": "TUDO",
"is_exact_search": True,
"ignore_signature_match": True,
"force_rematch": True,
"full_text": False,
"use_summary": False,
"department": None,
},
],
"report": {
"emails": ["destination@economia.gov.br"],
Expand Down
Loading