Skip to content

Commit e195166

Browse files
committed
dag: doc e build
1 parent 35c9753 commit e195166

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Este é um projeto de exemplo que demonstra o uso de [Bazel](https://bazel.build
2323

2424
bazel run //:create_venv
2525

26+
27+
bazel run //:sync_venv
28+
2629
## Compilando
2730

2831
Para gerar o arquivo `requirements.txt` a partir do `pyproject.toml`, execute:
@@ -43,9 +46,15 @@ Para rodar os testes do projeto, utilize:
4346
bazel test //...
4447
```
4548

49+
## DAG Apache Airflow
50+
51+
bazel run //dag:dag_test
52+
53+
TODO: Adicionar Docker
54+
4655
## Requisitos
4756

48-
- Python >= 3.13
57+
- Python >= 3.12
4958
- Bazel (bzlmod)
5059

5160
## Destaques

dag/BUILD.bazel

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
load("@pypi//:requirements.bzl", "requirement")
2+
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
3+
4+
py_library(
5+
name = "dag",
6+
srcs = ["minimal_dag.py"],
7+
visibility = ["//visibility:public"],
8+
deps = [
9+
requirement("apache-airflow"),
10+
],
11+
)
12+
13+
py_test(
14+
name = "dag_test",
15+
srcs = ["test_dag.py"],
16+
main = "test_dag.py",
17+
deps = [
18+
":dag",
19+
requirement("pytest"),
20+
requirement("apache-airflow"),
21+
],
22+
)
23+
24+
py_binary(
25+
name = "dag_dev",
26+
srcs = ["local_dev.py"],
27+
main = "local_dev.py",
28+
deps = [
29+
":dag",
30+
requirement("apache-airflow"),
31+
],
32+
)

0 commit comments

Comments
 (0)