arandu 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arandu-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +44 -0
- arandu-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +28 -0
- arandu-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- arandu-0.1.0/.github/workflows/ci.yml +43 -0
- arandu-0.1.0/.github/workflows/docs.yml +48 -0
- arandu-0.1.0/.github/workflows/publish.yml +29 -0
- arandu-0.1.0/.gitignore +12 -0
- arandu-0.1.0/.vibeflow/prds/oss-ready.md +77 -0
- arandu-0.1.0/.vibeflow/specs/oss-ready-part-1.md +69 -0
- arandu-0.1.0/.vibeflow/specs/oss-ready-part-2.md +72 -0
- arandu-0.1.0/CODE_OF_CONDUCT.md +9 -0
- arandu-0.1.0/CONTRIBUTING.md +110 -0
- arandu-0.1.0/LICENSE +21 -0
- arandu-0.1.0/PKG-INFO +138 -0
- arandu-0.1.0/README.md +104 -0
- arandu-0.1.0/SECURITY.md +21 -0
- arandu-0.1.0/alembic/env.py +60 -0
- arandu-0.1.0/alembic/versions/001_initial.py +280 -0
- arandu-0.1.0/alembic.ini +36 -0
- arandu-0.1.0/docs/en/advanced/data-types.md +339 -0
- arandu-0.1.0/docs/en/advanced/database.md +105 -0
- arandu-0.1.0/docs/en/advanced/read-api.md +550 -0
- arandu-0.1.0/docs/en/advanced/write-api.md +391 -0
- arandu-0.1.0/docs/en/concepts/background-jobs.md +318 -0
- arandu-0.1.0/docs/en/concepts/design-philosophy.md +219 -0
- arandu-0.1.0/docs/en/concepts/read-pipeline.md +268 -0
- arandu-0.1.0/docs/en/concepts/write-pipeline.md +264 -0
- arandu-0.1.0/docs/en/configuration.md +259 -0
- arandu-0.1.0/docs/en/cookbook.md +350 -0
- arandu-0.1.0/docs/en/custom-providers.md +254 -0
- arandu-0.1.0/docs/en/getting-started.md +303 -0
- arandu-0.1.0/docs/en/index.md +140 -0
- arandu-0.1.0/docs/en/llms-full.txt +3991 -0
- arandu-0.1.0/docs/en/llms.txt +26 -0
- arandu-0.1.0/docs/en/reference/index.md +254 -0
- arandu-0.1.0/docs/pt-BR/advanced/data-types.md +339 -0
- arandu-0.1.0/docs/pt-BR/advanced/database.md +105 -0
- arandu-0.1.0/docs/pt-BR/advanced/read-api.md +550 -0
- arandu-0.1.0/docs/pt-BR/advanced/write-api.md +391 -0
- arandu-0.1.0/docs/pt-BR/concepts/background-jobs.md +318 -0
- arandu-0.1.0/docs/pt-BR/concepts/design-philosophy.md +219 -0
- arandu-0.1.0/docs/pt-BR/concepts/read-pipeline.md +268 -0
- arandu-0.1.0/docs/pt-BR/concepts/write-pipeline.md +264 -0
- arandu-0.1.0/docs/pt-BR/configuration.md +259 -0
- arandu-0.1.0/docs/pt-BR/cookbook.md +350 -0
- arandu-0.1.0/docs/pt-BR/custom-providers.md +254 -0
- arandu-0.1.0/docs/pt-BR/getting-started.md +303 -0
- arandu-0.1.0/docs/pt-BR/index.md +140 -0
- arandu-0.1.0/docs/pt-BR/reference/index.md +254 -0
- arandu-0.1.0/mkdocs.yml +134 -0
- arandu-0.1.0/pyproject.toml +82 -0
- arandu-0.1.0/scripts/check_docs_coverage.py +149 -0
- arandu-0.1.0/scripts/generate_llms_txt.py +222 -0
- arandu-0.1.0/src/arandu/__init__.py +64 -0
- arandu-0.1.0/src/arandu/background/__init__.py +45 -0
- arandu-0.1.0/src/arandu/background/clustering.py +636 -0
- arandu-0.1.0/src/arandu/background/consolidation.py +542 -0
- arandu-0.1.0/src/arandu/background/memify.py +425 -0
- arandu-0.1.0/src/arandu/background/sleep_time.py +429 -0
- arandu-0.1.0/src/arandu/client.py +170 -0
- arandu-0.1.0/src/arandu/config.py +117 -0
- arandu-0.1.0/src/arandu/constants.py +264 -0
- arandu-0.1.0/src/arandu/db.py +48 -0
- arandu-0.1.0/src/arandu/exceptions.py +68 -0
- arandu-0.1.0/src/arandu/models.py +318 -0
- arandu-0.1.0/src/arandu/protocols.py +60 -0
- arandu-0.1.0/src/arandu/providers/__init__.py +5 -0
- arandu-0.1.0/src/arandu/providers/openai.py +108 -0
- arandu-0.1.0/src/arandu/py.typed +0 -0
- arandu-0.1.0/src/arandu/read/__init__.py +61 -0
- arandu-0.1.0/src/arandu/read/_helpers.py +133 -0
- arandu-0.1.0/src/arandu/read/context_compression.py +391 -0
- arandu-0.1.0/src/arandu/read/emotional_trends.py +452 -0
- arandu-0.1.0/src/arandu/read/graph_retrieval.py +408 -0
- arandu-0.1.0/src/arandu/read/importance.py +72 -0
- arandu-0.1.0/src/arandu/read/pipeline.py +329 -0
- arandu-0.1.0/src/arandu/read/procedural.py +438 -0
- arandu-0.1.0/src/arandu/read/query_expansion.py +267 -0
- arandu-0.1.0/src/arandu/read/reranker.py +100 -0
- arandu-0.1.0/src/arandu/read/retrieval.py +391 -0
- arandu-0.1.0/src/arandu/read/retrieval_agent.py +393 -0
- arandu-0.1.0/src/arandu/read/spreading_activation.py +493 -0
- arandu-0.1.0/src/arandu/write/__init__.py +55 -0
- arandu-0.1.0/src/arandu/write/canonicalization.py +185 -0
- arandu-0.1.0/src/arandu/write/correction.py +109 -0
- arandu-0.1.0/src/arandu/write/entity_helpers.py +124 -0
- arandu-0.1.0/src/arandu/write/entity_resolution.py +683 -0
- arandu-0.1.0/src/arandu/write/extract.py +473 -0
- arandu-0.1.0/src/arandu/write/extraction_strategy.py +185 -0
- arandu-0.1.0/src/arandu/write/pending_ops.py +110 -0
- arandu-0.1.0/src/arandu/write/pipeline.py +232 -0
- arandu-0.1.0/src/arandu/write/reconcile.py +438 -0
- arandu-0.1.0/src/arandu/write/upsert.py +419 -0
- arandu-0.1.0/tests/conftest.py +118 -0
- arandu-0.1.0/tests/test_canonicalization.py +114 -0
- arandu-0.1.0/tests/test_clustering.py +120 -0
- arandu-0.1.0/tests/test_consolidation.py +127 -0
- arandu-0.1.0/tests/test_constants_complete.py +106 -0
- arandu-0.1.0/tests/test_context_compression.py +173 -0
- arandu-0.1.0/tests/test_e2e.py +188 -0
- arandu-0.1.0/tests/test_emotional_trends.py +107 -0
- arandu-0.1.0/tests/test_full_integration.py +166 -0
- arandu-0.1.0/tests/test_graph_retrieval.py +110 -0
- arandu-0.1.0/tests/test_importance.py +87 -0
- arandu-0.1.0/tests/test_memify.py +174 -0
- arandu-0.1.0/tests/test_procedural.py +115 -0
- arandu-0.1.0/tests/test_query_expansion.py +44 -0
- arandu-0.1.0/tests/test_read_pipeline.py +381 -0
- arandu-0.1.0/tests/test_retrieval_agent.py +229 -0
- arandu-0.1.0/tests/test_sdk_adapter_contracts.py +375 -0
- arandu-0.1.0/tests/test_sdk_background_contracts.py +183 -0
- arandu-0.1.0/tests/test_sdk_integration.py +313 -0
- arandu-0.1.0/tests/test_sleep_time.py +101 -0
- arandu-0.1.0/tests/test_spreading_activation.py +145 -0
- arandu-0.1.0/tests/test_write_helpers.py +171 -0
- arandu-0.1.0/tests/test_write_pipeline.py +373 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in arandu
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description
|
|
9
|
+
description: A clear description of the bug.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: steps
|
|
15
|
+
attributes:
|
|
16
|
+
label: Steps to Reproduce
|
|
17
|
+
description: Steps to reproduce the behavior.
|
|
18
|
+
placeholder: |
|
|
19
|
+
1. Initialize MemoryClient with ...
|
|
20
|
+
2. Call memory.write(...)
|
|
21
|
+
3. See error
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: expected
|
|
27
|
+
attributes:
|
|
28
|
+
label: Expected Behavior
|
|
29
|
+
description: What you expected to happen.
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: environment
|
|
35
|
+
attributes:
|
|
36
|
+
label: Environment
|
|
37
|
+
description: Your environment details.
|
|
38
|
+
placeholder: |
|
|
39
|
+
- Python version: 3.11
|
|
40
|
+
- arandu version: 0.1.0
|
|
41
|
+
- OS: Ubuntu 22.04
|
|
42
|
+
- PostgreSQL version: 16
|
|
43
|
+
validations:
|
|
44
|
+
required: false
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature for arandu
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What problem does this feature solve?
|
|
10
|
+
placeholder: I'm always frustrated when ...
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: solution
|
|
16
|
+
attributes:
|
|
17
|
+
label: Proposed Solution
|
|
18
|
+
description: How would you like this to work?
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Alternatives Considered
|
|
26
|
+
description: Any alternative solutions or workarounds you've considered.
|
|
27
|
+
validations:
|
|
28
|
+
required: false
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- What does this PR do? Why is this change needed? -->
|
|
4
|
+
|
|
5
|
+
## Checklist
|
|
6
|
+
|
|
7
|
+
- [ ] Tests pass (`pytest`)
|
|
8
|
+
- [ ] Lint passes (`ruff check .` and `ruff format --check .`)
|
|
9
|
+
- [ ] Type check passes (`mypy src/`)
|
|
10
|
+
- [ ] No breaking changes (or documented below)
|
|
11
|
+
|
|
12
|
+
## Breaking Changes
|
|
13
|
+
|
|
14
|
+
<!-- If this PR introduces breaking changes, describe them here. Otherwise, delete this section. -->
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.11", "3.12"]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
|
|
22
|
+
- name: Cache pip dependencies
|
|
23
|
+
uses: actions/cache@v4
|
|
24
|
+
with:
|
|
25
|
+
path: ~/.cache/pip
|
|
26
|
+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
|
|
27
|
+
restore-keys: |
|
|
28
|
+
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pip install -e ".[dev]"
|
|
32
|
+
|
|
33
|
+
- name: Lint
|
|
34
|
+
run: ruff check .
|
|
35
|
+
|
|
36
|
+
- name: Format check
|
|
37
|
+
run: ruff format --check .
|
|
38
|
+
|
|
39
|
+
- name: Type check
|
|
40
|
+
run: mypy src/
|
|
41
|
+
|
|
42
|
+
- name: Tests
|
|
43
|
+
run: pytest
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- 'mkdocs.yml'
|
|
9
|
+
- 'src/**'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.11'
|
|
24
|
+
|
|
25
|
+
- name: Cache pip dependencies
|
|
26
|
+
uses: actions/cache@v4
|
|
27
|
+
with:
|
|
28
|
+
path: ~/.cache/pip
|
|
29
|
+
key: ${{ runner.os }}-pip-docs-${{ hashFiles('mkdocs.yml') }}
|
|
30
|
+
restore-keys: |
|
|
31
|
+
${{ runner.os }}-pip-docs-
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
pip install mkdocs-material mkdocstrings[python] pymdown-extensions mkdocs-static-i18n
|
|
36
|
+
pip install -e ".[openai]"
|
|
37
|
+
|
|
38
|
+
- name: Check docs coverage
|
|
39
|
+
run: python scripts/check_docs_coverage.py
|
|
40
|
+
|
|
41
|
+
- name: Generate llms.txt
|
|
42
|
+
run: python scripts/generate_llms_txt.py
|
|
43
|
+
|
|
44
|
+
- name: Build docs
|
|
45
|
+
run: mkdocs build --strict
|
|
46
|
+
|
|
47
|
+
- name: Deploy to GitHub Pages
|
|
48
|
+
run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build tools
|
|
23
|
+
run: pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
arandu-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# PRD: Preparar o repositório arandu para open-source
|
|
2
|
+
|
|
3
|
+
> Generated via /vibeflow:discover on 2026-03-18
|
|
4
|
+
|
|
5
|
+
## Problem
|
|
6
|
+
|
|
7
|
+
O arandu (long-term memory para AI agents) é um projeto funcional com ~40 arquivos de código, 23 suítes de teste e documentação bilíngue (EN/PT-BR), mas o repositório não tem a infraestrutura que desenvolvedores open-source sérios esperam. Faltam sinais básicos de maturidade: CI rodando testes, arquivo de licença, guia de contribuição, templates de issues/PRs, e o README contém links quebrados referenciando um nome antigo ("personal-genius") e paths que não existem ("packages/memory-sdk"). Além disso, o pacote ainda não foi publicado no PyPI.
|
|
8
|
+
|
|
9
|
+
Quem chega no GitHub hoje vê um projeto sem CI, sem licença-arquivo, com links 404 no README — e descarta. O objetivo é que um dev experiente bata o olho e pense "projeto bem mantido, posso confiar e contribuir".
|
|
10
|
+
|
|
11
|
+
## Target Audience
|
|
12
|
+
|
|
13
|
+
Desenvolvedores Python que trabalham com AI/LLM agents e buscam uma solução de memória de longo prazo. Perfil: engenheiros de software que avaliam qualidade de OSS antes de adotar — olham CI, licença, contribuição, e atividade do projeto.
|
|
14
|
+
|
|
15
|
+
## Proposed Solution
|
|
16
|
+
|
|
17
|
+
Adicionar toda a infraestrutura padrão de um projeto open-source profissional e publicar o pacote no PyPI:
|
|
18
|
+
|
|
19
|
+
- **README corrigido** — links reais, URLs corretas, path de setup correto
|
|
20
|
+
- **Arquivo LICENSE** (MIT)
|
|
21
|
+
- **CONTRIBUTING.md** — setup de dev, como rodar testes, padrão de PRs
|
|
22
|
+
- **CODE_OF_CONDUCT.md** — Contributor Covenant
|
|
23
|
+
- **SECURITY.md** — política de reporte de vulnerabilidades
|
|
24
|
+
- **CI completo** — GitHub Actions com pytest + ruff + mypy
|
|
25
|
+
- **Issue templates e PR template** — bug report, feature request, PR checklist
|
|
26
|
+
- **pyproject.toml completo** — URLs (homepage, repo, issues), email do autor
|
|
27
|
+
- **Publicação no PyPI** — workflow de CD com Trusted Publishers (OIDC)
|
|
28
|
+
|
|
29
|
+
## Success Criteria
|
|
30
|
+
|
|
31
|
+
1. Um dev clona o repo, roda `pip install -e ".[dev]"` e `pytest` — funciona sem fricção
|
|
32
|
+
2. O README não tem nenhum link quebrado e mostra badges reais (CI, PyPI, license)
|
|
33
|
+
3. CI roda em todo push/PR: testes passam, lint passa, type check passa
|
|
34
|
+
4. `pip install arandu` funciona via PyPI
|
|
35
|
+
5. Existe guia claro de como contribuir (CONTRIBUTING.md)
|
|
36
|
+
6. Issue templates aparecem ao criar nova issue no GitHub
|
|
37
|
+
|
|
38
|
+
## Scope v0
|
|
39
|
+
|
|
40
|
+
- [ ] Corrigir README.md (links, badges, paths, URL real do GitHub Pages)
|
|
41
|
+
- [ ] Criar arquivo `LICENSE` (MIT, autor Pedro Menezes)
|
|
42
|
+
- [ ] Criar `CONTRIBUTING.md` (setup, testes, lint, PR guidelines)
|
|
43
|
+
- [ ] Criar `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1)
|
|
44
|
+
- [ ] Criar `SECURITY.md` (política de vulnerabilidades)
|
|
45
|
+
- [ ] Criar `.github/workflows/ci.yml` (pytest + ruff + mypy)
|
|
46
|
+
- [ ] Criar `.github/workflows/publish.yml` (PyPI via Trusted Publishers)
|
|
47
|
+
- [ ] Criar `.github/ISSUE_TEMPLATE/bug_report.yml`
|
|
48
|
+
- [ ] Criar `.github/ISSUE_TEMPLATE/feature_request.yml`
|
|
49
|
+
- [ ] Criar `.github/PULL_REQUEST_TEMPLATE.md`
|
|
50
|
+
- [ ] Atualizar `pyproject.toml` (urls, email, classifiers)
|
|
51
|
+
|
|
52
|
+
## Anti-scope
|
|
53
|
+
|
|
54
|
+
- **CHANGELOG.md** — usar GitHub Releases por agora
|
|
55
|
+
- **Bot de stale issues** — overhead desnecessário pra v0.1.0
|
|
56
|
+
- **GitHub Discussions** — pode ativar depois se houver comunidade
|
|
57
|
+
- **Pre-commit hooks** — CI já cobre lint/format
|
|
58
|
+
- **Docker / docker-compose** — testes rodam com mock, não precisa de Postgres no CI
|
|
59
|
+
- **Badges de cobertura (codecov)** — pode adicionar depois
|
|
60
|
+
- **Configuração de branch protection rules** — é manual no GitHub, fora do repo
|
|
61
|
+
- **Tradução dos arquivos de OSS** — CONTRIBUTING/CODE_OF_CONDUCT ficam em inglês (padrão)
|
|
62
|
+
- **Reestruturação de código** — foco é infraestrutura, não refactoring
|
|
63
|
+
|
|
64
|
+
## Technical Context
|
|
65
|
+
|
|
66
|
+
- **Stack:** Python 3.11+, hatchling (build), SQLAlchemy, pgvector, pydantic
|
|
67
|
+
- **Testes:** Todos com mock (FakeLLMProvider, FakeEmbeddingProvider) — não precisam de Postgres no CI
|
|
68
|
+
- **Lint/format:** ruff já configurado no pyproject.toml
|
|
69
|
+
- **Type check:** mypy strict já configurado no pyproject.toml
|
|
70
|
+
- **Docs:** MkDocs Material, bilíngue, deploy via GitHub Actions (já funciona)
|
|
71
|
+
- **GitHub:** repo `pe-menezes/arandu`, Pages em `pe-menezes.github.io/arandu/`
|
|
72
|
+
- **PyPI:** conta `pe-menezes`, Trusted Publisher configurado (arandu → pe-menezes/arandu, workflow publish.yml, environment pypi)
|
|
73
|
+
- **Email do autor:** pedromenezesrs@gmail.com
|
|
74
|
+
|
|
75
|
+
## Open Questions
|
|
76
|
+
|
|
77
|
+
Nenhuma questão aberta. Todas as dependências externas foram resolvidas.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Spec: OSS-Ready — Part 1: Core Files
|
|
2
|
+
|
|
3
|
+
> Source PRD: `.vibeflow/prds/oss-ready.md`
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Tornar o repositório arandu reconhecível como projeto open-source profissional adicionando os arquivos-base que devs experientes esperam (LICENSE, CONTRIBUTING, README correto, pyproject.toml completo).
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
O README atual tem 6 links apontando para `your-org.github.io/personal-genius/` (URL errada — o correto é `pe-menezes.github.io/arandu/`), referencia um path `packages/memory-sdk` que não existe, e não tem badges funcionais. O `pyproject.toml` não tem `[project.urls]` nem email do autor. Não existe arquivo LICENSE (apesar de declarar MIT), nem CONTRIBUTING, CODE_OF_CONDUCT ou SECURITY.
|
|
12
|
+
|
|
13
|
+
## Definition of Done
|
|
14
|
+
|
|
15
|
+
1. **LICENSE existe** — Arquivo `LICENSE` na raiz com texto completo da MIT, copyright "Pedro Menezes".
|
|
16
|
+
2. **README sem links quebrados** — Todos os links no README.md apontam para URLs reais (`pe-menezes.github.io/arandu/`, `github.com/pe-menezes/arandu`, `pypi.org/project/arandu/`). Nenhuma ocorrência de `your-org` ou `personal-genius`.
|
|
17
|
+
3. **README com badges reais** — Badges de CI (workflow `ci.yml`), PyPI, License, e Docs apontam para URLs corretas.
|
|
18
|
+
4. **CONTRIBUTING.md existe** — Com seções: Prerequisites, Development Setup, Running Tests, Code Style, Pull Request Guidelines.
|
|
19
|
+
5. **CODE_OF_CONDUCT.md e SECURITY.md existem** — Contributor Covenant 2.1 e política de reporte de vulnerabilidades.
|
|
20
|
+
6. **pyproject.toml completo** — Contém `[project.urls]` (Homepage, Repository, Documentation, Issues, Changelog) e email do autor.
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
- Criar `LICENSE` (MIT, 2025, Pedro Menezes)
|
|
25
|
+
- Reescrever `README.md`: corrigir todos os links, adicionar badges reais, remover referência a `packages/memory-sdk` (trocar por `await memory.initialize()`), remover seção "Database Setup" com alembic (o SDK cria as tabelas automaticamente)
|
|
26
|
+
- Criar `CONTRIBUTING.md` em inglês
|
|
27
|
+
- Criar `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1)
|
|
28
|
+
- Criar `SECURITY.md` (reportar via email pedromenezesrs@gmail.com)
|
|
29
|
+
- Atualizar `pyproject.toml`: adicionar `[project.urls]`, adicionar email ao autor
|
|
30
|
+
|
|
31
|
+
## Anti-scope
|
|
32
|
+
|
|
33
|
+
- NÃO alterar código-fonte em `src/`
|
|
34
|
+
- NÃO criar workflows (Part 2)
|
|
35
|
+
- NÃO criar issue/PR templates (Part 2)
|
|
36
|
+
- NÃO traduzir CONTRIBUTING/CODE_OF_CONDUCT para PT-BR
|
|
37
|
+
- NÃO adicionar CHANGELOG.md
|
|
38
|
+
- NÃO modificar conteúdo da documentação MkDocs
|
|
39
|
+
|
|
40
|
+
## Technical Decisions
|
|
41
|
+
|
|
42
|
+
| Decisão | Escolha | Justificativa |
|
|
43
|
+
|---------|---------|---------------|
|
|
44
|
+
| Idioma dos arquivos OSS | Inglês | Padrão da indústria; devs de qualquer país leem |
|
|
45
|
+
| License year | 2025 | Ano de início do projeto |
|
|
46
|
+
| CONTRIBUTING: install command | `pip install -e ".[dev]"` | Já funciona com o pyproject.toml atual |
|
|
47
|
+
| CONTRIBUTING: test command | `pytest` | asyncio_mode=auto já configurado |
|
|
48
|
+
| CONTRIBUTING: lint command | `ruff check . && ruff format --check .` | Já configurado no pyproject.toml |
|
|
49
|
+
| CONTRIBUTING: type check | `mypy src/` | Strict mode já configurado |
|
|
50
|
+
| Badge de CI | Aponta para workflow `ci.yml` | Será criado na Part 2; badge já fica correto |
|
|
51
|
+
| Seção "Database Setup" do README | Remover referência a alembic/packages | O path `packages/memory-sdk` não existe; `await memory.initialize()` já é documentado |
|
|
52
|
+
|
|
53
|
+
## Applicable Patterns
|
|
54
|
+
|
|
55
|
+
Nenhum `.vibeflow/patterns/` existe. Convenções inferidas do código:
|
|
56
|
+
- Markdown files usam heading hierarchy padrão
|
|
57
|
+
- pyproject.toml usa hatchling como build backend
|
|
58
|
+
- Projeto é bilíngue mas arquivos de governança ficam em inglês
|
|
59
|
+
|
|
60
|
+
## Risks
|
|
61
|
+
|
|
62
|
+
| Risco | Mitigação |
|
|
63
|
+
|-------|-----------|
|
|
64
|
+
| Badge de CI vai mostrar "not found" até Part 2 ser implementada | Aceitável — badge aponta para URL correta, só precisa do workflow existir |
|
|
65
|
+
| README pode ter links que dependem de paths futuros | Usar apenas URLs que já existem hoje (GitHub Pages, GitHub repo, PyPI project) |
|
|
66
|
+
|
|
67
|
+
## Budget
|
|
68
|
+
|
|
69
|
+
6 arquivos: `LICENSE`, `README.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`, `pyproject.toml`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Spec: OSS-Ready — Part 2: CI/CD + GitHub Templates
|
|
2
|
+
|
|
3
|
+
> Source PRD: `.vibeflow/prds/oss-ready.md`
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Automatizar qualidade (CI em todo push/PR) e publicação no PyPI, e padronizar a contribuição com templates de issues e PRs.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
O repo já tem um workflow `docs.yml` para deploy de documentação. Não existe CI para testes/lint/typecheck — qualquer PR pode quebrar o código sem ninguém perceber. O Trusted Publisher do PyPI já está configurado (arandu → pe-menezes/arandu, workflow publish.yml, environment pypi). Faltam templates para issues e PRs.
|
|
12
|
+
|
|
13
|
+
## Dependencies
|
|
14
|
+
|
|
15
|
+
- `.vibeflow/specs/oss-ready-part-1.md` — pyproject.toml precisa estar atualizado (URLs, email) antes do publish workflow rodar.
|
|
16
|
+
|
|
17
|
+
## Definition of Done
|
|
18
|
+
|
|
19
|
+
1. **CI roda em push/PR** — Workflow `.github/workflows/ci.yml` executa pytest, ruff check, ruff format --check, e mypy em Python 3.11 e 3.12.
|
|
20
|
+
2. **Publish workflow existe** — `.github/workflows/publish.yml` publica no PyPI via Trusted Publishers quando uma release é criada no GitHub.
|
|
21
|
+
3. **Bug report template funciona** — `.github/ISSUE_TEMPLATE/bug_report.yml` com campos: description, steps to reproduce, expected behavior, environment.
|
|
22
|
+
4. **Feature request template funciona** — `.github/ISSUE_TEMPLATE/feature_request.yml` com campos: problem, proposed solution, alternatives considered.
|
|
23
|
+
5. **PR template existe** — `.github/PULL_REQUEST_TEMPLATE.md` com checklist: description, tests, lint, breaking changes.
|
|
24
|
+
|
|
25
|
+
## Scope
|
|
26
|
+
|
|
27
|
+
- Criar `.github/workflows/ci.yml`
|
|
28
|
+
- Criar `.github/workflows/publish.yml`
|
|
29
|
+
- Criar `.github/ISSUE_TEMPLATE/bug_report.yml` (YAML form, não markdown)
|
|
30
|
+
- Criar `.github/ISSUE_TEMPLATE/feature_request.yml` (YAML form)
|
|
31
|
+
- Criar `.github/PULL_REQUEST_TEMPLATE.md`
|
|
32
|
+
|
|
33
|
+
## Anti-scope
|
|
34
|
+
|
|
35
|
+
- NÃO modificar `docs.yml` existente
|
|
36
|
+
- NÃO adicionar codecov/coverage reporting
|
|
37
|
+
- NÃO adicionar pre-commit hooks
|
|
38
|
+
- NÃO adicionar dependabot/renovate
|
|
39
|
+
- NÃO criar workflow de release notes automáticas
|
|
40
|
+
- NÃO usar matriz com OS (ubuntu-only é suficiente)
|
|
41
|
+
- NÃO rodar testes com Postgres real (todos usam mock)
|
|
42
|
+
|
|
43
|
+
## Technical Decisions
|
|
44
|
+
|
|
45
|
+
| Decisão | Escolha | Justificativa |
|
|
46
|
+
|---------|---------|---------------|
|
|
47
|
+
| CI matrix | Python 3.11 + 3.12 no ubuntu-latest | pyproject.toml declara >=3.11; testar nas 2 versões estáveis |
|
|
48
|
+
| CI trigger | push to main + pull_request | Padrão; PR verifica antes de merge, push garante main limpo |
|
|
49
|
+
| Publish trigger | `on: release: types: [published]` | Padrão PyPI; tag-based é alternativa mas release é mais explícito |
|
|
50
|
+
| Publish method | Trusted Publishers (OIDC) | Já configurado no PyPI; sem tokens para gerenciar |
|
|
51
|
+
| PyPI environment | `pypi` | Configurado no Trusted Publisher |
|
|
52
|
+
| Issue templates | YAML forms (não .md) | UX melhor: campos estruturados, dropdowns, validação |
|
|
53
|
+
| Build tool no publish | `hatchling` via `python -m build` | Já é o build backend do projeto |
|
|
54
|
+
|
|
55
|
+
## Applicable Patterns
|
|
56
|
+
|
|
57
|
+
Nenhum `.vibeflow/patterns/` existe. Convenções inferidas:
|
|
58
|
+
- Workflow existente (`docs.yml`) usa `actions/checkout@v4`, `actions/setup-python@v5`, `actions/cache@v4`
|
|
59
|
+
- pip install com `pip install -e ".[dev]"` para testes
|
|
60
|
+
|
|
61
|
+
## Risks
|
|
62
|
+
|
|
63
|
+
| Risco | Mitigação |
|
|
64
|
+
|-------|-----------|
|
|
65
|
+
| Testes falham no CI por dependência não declarada | CI instala `pip install -e ".[dev]"` — mesmo comando do dev local |
|
|
66
|
+
| mypy falha no CI por tipagem incompleta | mypy já roda local com strict; se passa local, passa no CI |
|
|
67
|
+
| Publish falha por Trusted Publisher mal configurado | Já verificado: screenshot confirma config correta no PyPI |
|
|
68
|
+
| Rate limit no PyPI em primeiro publish | Improvável para projeto novo; retry manual se necessário |
|
|
69
|
+
|
|
70
|
+
## Budget
|
|
71
|
+
|
|
72
|
+
5 arquivos: `ci.yml`, `publish.yml`, `bug_report.yml`, `feature_request.yml`, `PULL_REQUEST_TEMPLATE.md`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project follows the [Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
|
|
4
|
+
|
|
5
|
+
By participating in this project, you agree to abide by its terms.
|
|
6
|
+
|
|
7
|
+
## Reporting
|
|
8
|
+
|
|
9
|
+
If you experience or witness unacceptable behavior, please report it by emailing **pedromenezesrs@gmail.com**. All reports will be handled with discretion.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Contributing to arandu
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to arandu! This guide will help you get started.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Python 3.11 or later
|
|
8
|
+
- Git
|
|
9
|
+
|
|
10
|
+
## Development Setup
|
|
11
|
+
|
|
12
|
+
1. **Fork and clone the repository:**
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/<your-username>/arandu.git
|
|
16
|
+
cd arandu
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Create a virtual environment:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python -m venv .venv
|
|
23
|
+
source .venv/bin/activate # Linux/macOS
|
|
24
|
+
# or
|
|
25
|
+
.venv\Scripts\activate # Windows
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. **Install in development mode:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install -e ".[dev]"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Running Tests
|
|
35
|
+
|
|
36
|
+
All tests use mock providers (no database required):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pytest
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To run a specific test file:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pytest tests/test_extraction.py
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Code Style
|
|
49
|
+
|
|
50
|
+
This project uses [ruff](https://docs.astral.sh/ruff/) for linting and formatting, and [mypy](https://mypy-lang.org/) for type checking.
|
|
51
|
+
|
|
52
|
+
**Check linting and formatting:**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ruff check .
|
|
56
|
+
ruff format --check .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Auto-fix lint issues and format code:**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
ruff check --fix .
|
|
63
|
+
ruff format .
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Run type checking:**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
mypy src/
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Please ensure all three checks pass before submitting a pull request.
|
|
73
|
+
|
|
74
|
+
## Pull Request Guidelines
|
|
75
|
+
|
|
76
|
+
1. **Create a feature branch** from `main`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git checkout -b feature/my-feature
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. **Keep changes focused.** One pull request per feature or bug fix.
|
|
83
|
+
|
|
84
|
+
3. **Write tests** for new functionality.
|
|
85
|
+
|
|
86
|
+
4. **Ensure all checks pass:**
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pytest
|
|
90
|
+
ruff check .
|
|
91
|
+
ruff format --check .
|
|
92
|
+
mypy src/
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
5. **Write a clear PR description** explaining what changed and why.
|
|
96
|
+
|
|
97
|
+
6. **Link related issues** in the PR description (e.g., "Closes #42").
|
|
98
|
+
|
|
99
|
+
## Reporting Bugs
|
|
100
|
+
|
|
101
|
+
Please use the [GitHub Issues](https://github.com/pe-menezes/arandu/issues) page to report bugs. Include:
|
|
102
|
+
|
|
103
|
+
- A clear description of the problem
|
|
104
|
+
- Steps to reproduce
|
|
105
|
+
- Expected vs. actual behavior
|
|
106
|
+
- Python version and OS
|
|
107
|
+
|
|
108
|
+
## Questions?
|
|
109
|
+
|
|
110
|
+
Feel free to open an issue for questions or discussions about the project.
|
arandu-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Pedro Menezes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|