refactor(did): sdata.did als dokumentiertes Subpackage + Tests#10
Merged
Conversation
- echtes Subpackage: relative Importe, kuratiertes __init__ mit Lazy-Loading
(PEP 562) und __all__; CLIs via `python -m sdata.did.<modul>`
- neue Module errors.py (Ausnahmehierarchie) und jose.py (gemeinsame
Compact-JWS/EdDSA-Schicht; entfernt Duplizierung in issue_vc/verify_vp)
- Bibliothekscode wirft VerificationError/ResolutionError statt SystemExit;
neue verify_presentation() mit aud/nonce/Gueltigkeitspruefung
- Logging statt print; vollstaendige Type-Hints und Docstrings; README.md
- pure-Python-Krypto beibehalten (python-ecdsa); ed25519.py als nicht
constant-time Lern-Referenz markiert (nicht im Funktionspfad)
- setup.py: extras_require {did: ecdsa, base58}, python_requires>=3.7,
Klassifizierer aktualisiert
- tests/test_did.py: 44 Tests ueber die Paket-API, ohne Netzwerk (gemockt)
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 48 minor |
| Security | 50 high |
| Complexity | 2 medium |
🟢 Metrics 165 complexity · 0 duplication
Metric Results Complexity 165 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Überblick
Refactor des
sdata/did/-Bereichs zu einem sauberen, dokumentierten Subpackagesdata.did(pure-Python-Designziel beibehalten).Änderungen
__init__mit Lazy-Loading (PEP 562) und__all__; CLIs viapython -m sdata.did.<modul>.errors.py(AusnahmehierarchieDidError/EncodingError/ResolutionError/VerificationError) undjose.py(gemeinsame Compact-JWS/EdDSA-Schicht — entfernt die Duplizierung zwischenissue_vcundverify_vp).VerificationError/ResolutionErrorstattSystemExit; neueverify_presentation()mitaud/nonce/Gültigkeitsprüfung (nbf/exp, testbarenow=).python-ecdsa+base58);ed25519.pyals nicht constant-time Lern-Referenz markiert (nicht im Funktionspfad).sdata/did/README.md.setup.pymitextras_require={'did': ['ecdsa','base58']}(behebt zuvor undeklarierte Abhängigkeiten),python_requires>=3.7, aktualisierte Klassifizierer.Tests
tests/test_did.py: 44 Tests über die Paket-API, ohne Netzwerk (HTTP gemockt). Lokal grün (44 passed).Sicherheitshinweis
Der produktive Krypto-Pfad (
python-ecdsa) ist bewusst dependency-arm, aber nicht garantiert constant-time. Für hochsensible Umgebungen ist ein libsodium-/cryptography-Backend empfehlenswert (im Code/README dokumentiert).