Parent: #161
Goal
Create fd5.identity module for loading and managing user identity from ~/.fd5/identity.toml.
Spec
Identity dataclass: type (orcid/github/email/anonymous), id (string), name (string)
load_identity() -> Identity — read from ~/.fd5/identity.toml, return anonymous if missing
save_identity(identity: Identity) — write to ~/.fd5/identity.toml
identity_to_dict(identity: Identity) -> dict — for embedding in audit entries
- Support for
type values: orcid, github, email, anonymous
TOML format
[identity]
type = "orcid"
id = "0000-0002-1825-0097"
name = "Lars Gerchow"
TDD
- Test load from valid TOML file
- Test load returns anonymous when file missing
- Test save + load round-trip
- Test validation of identity types
- Test ORCID format validation (XXXX-XXXX-XXXX-XXXX)
Parent: #161
Goal
Create
fd5.identitymodule for loading and managing user identity from~/.fd5/identity.toml.Spec
Identitydataclass:type(orcid/github/email/anonymous),id(string),name(string)load_identity() -> Identity— read from~/.fd5/identity.toml, return anonymous if missingsave_identity(identity: Identity)— write to~/.fd5/identity.tomlidentity_to_dict(identity: Identity) -> dict— for embedding in audit entriestypevalues:orcid,github,email,anonymousTOML format
TDD