chore(release): 0.0.3

Squash-merge lib-standardisation: adopt repo standards across packaging,
tooling, docs, and CI.

- standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint)
- add py.typed marker, modernize type hints and Google-style docstrings
- nest generated docs under docs/lib and docs/mcp; add hand-written wiki
- adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate)
- promote generated CHANGELOG.md; bump version to 0.0.3
This commit is contained in:
2026-10-17 02:16:46 +05:30
parent c541577788
commit 371b74806f
96 changed files with 1756 additions and 2200 deletions

View File

@@ -1,8 +1,11 @@
import base64
from mail_intake.parsers import normalize_subject
from mail_intake.parsers import parse_headers, extract_sender
from mail_intake.parsers import extract_body
from mail_intake.parsers import (
extract_body,
extract_sender,
normalize_subject,
parse_headers,
)
def _b64(text: str) -> str:
@@ -13,6 +16,7 @@ def _b64(text: str) -> str:
# Subject parsing
# --------------------
def test_normalize_subject_strips_common_prefixes():
assert normalize_subject("Re: Interview Update") == "Interview Update"
assert normalize_subject("Fwd: Re: Offer Letter") == "Offer Letter"
@@ -32,6 +36,7 @@ def test_normalize_subject_empty_and_none_safe():
# Header parsing
# --------------------
def test_parse_headers_lowercases_keys():
raw_headers = [
{"name": "From", "value": "Alice <alice@example.com>"},
@@ -82,6 +87,7 @@ def test_extract_sender_missing_from():
# Body parsing
# --------------------
def test_extract_body_prefers_text_plain():
payload = {
"parts": [
@@ -116,9 +122,7 @@ def test_extract_body_falls_back_to_html():
def test_extract_body_single_part():
payload = {
"body": {"data": _b64("Single part body")}
}
payload = {"body": {"data": _b64("Single part body")}}
body = extract_body(payload)
assert body == "Single part body"