AOSSIE-Org / AOSSIE-Org/PictoPy

DOC: Remove dead app/schemas/test.py and compress signature-restating docstrings (follow-up to #1458)

Aperta
#1,499 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
documentation enhancement
Lingua principale
Python
Stelle
284
Fork
680
Merge medio
7g 5h
PR unite (30g)
4

Descrizione

### What's wrong with the existing documentation

Two follow-ups from #1458 that #1480 deliberately left out of scope to keep that PR reviewable. Both are in-code documentation rather than prose docs.

**1. `backend/app/schemas/test.py` is dead, and provably so once #1480 merges.**

51 lines of Pydantic models. On `main` today its only reference anywhere in the repository is a commented-out import:

```
backend/app/routes/test.py:9:# from app.schemas.test import (
```

#1480 deletes `routes/test.py` outright (it was 173 lines, entirely commented out). After that merges, `schemas/test.py` has zero references of any kind, commented or live. It should go the same way. Git remembers it.

This is blocked on #1480 and should not be attempted before it lands.

**2. Multi-line docstrings that restate the signature.**

`AGENTS.md` says comments should be "one or two lines, explaining *why* rather than *what*" and that "the codebase does not use long prose comment blocks or multi-paragraph docstrings". Measured against `main` (`510d4d0`) with an AST walk over all 123 backend Python files:

| | count |
| --- | --- |
| multi-line docstrings | 369 |
| Google-style `Args:` / `Returns:` / `Raises:` blocks | 73 |

Heaviest files:

```
20 backend/app/database/memories.py
15 backend/app/utils/face_clusters.py
15 backend/app/utils/memory_curator.py
14 backend/app/database/folders.py
14 backend/app/utils/videos.py
14 backend/tests/test_memory_curator.py
13 backend/app/utils/memory_scoring.py
13 backend/tests/test_memory_signals_db.py
```

These numbers have grown since I first scoped this in #1480's body, which is an argument for doing it rather than leaving it.

The same rule from #1458 applies: this is not a blanket strip. Per @rohan-pandeyy's steer on that issue, docstrings carrying real reasoning get compressed with the argument intact, and only the ones restating the signature below them get removed. An `Args:` block that names each parameter and its type, when the annotated signature already says both, is the clear case.

Suggested split, since 369 sites is too much for one reviewable PR:

- the dead file on its own, straight after #1480 merges
- `app/database/` and `app/utils/` in one pass
- `tests/` in a second

### Add ScreenShots

Not applicable, this is in-code documentation.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

First verify that #1480 has merged, then read AGENTS.md and inspect backend/app/schemas/test.py plus the app/database/ and app/utils/ docstrings listed in the issue. Remove the dead file and compress only signature-restating docstrings, preserving reasoning; leave the tests/ pass for a separate reviewable change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend, documentation
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
62/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.