Add comprehensive codec management functionality - #24
Conversation
|
Hi @sumanjeet0012 thanks, for this PR. 1. Summary of ChangesThis PR introduces comprehensive codec management functionality to Issues Addressed
Files ChangedNew Files:
Modified Files:
Breaking Changes✅ None - All changes are additive. Existing functions ( 2. Branch Sync Status and Merge ConflictsBranch Sync Status
Merge Conflict Analysis
3. Strengths
4. Issues FoundCriticalNone - No critical issues found. MajorMissing Newsfragment
Generator Script Uses
|
6747410 to
768463b
Compare
|
@acul71 I have replaced the eval() with ast.literal_eval(), and added the newsfragment. |
- Add Code Management section to README with usage examples - Add return type annotation to load_codecs_from_file() - Improve newsfragment formatting (remove backticks)
768463b to
deeaf33
Compare
Well done, I've fixed some minor issues, I'm merging this. |
Summary
closes #23
This PR introduces codec management functionality to py-multicodec simillar to go-multicodec, bringing feature parity with the Go library.
File Mapping: Go → Python
code.gomulticodec/code.pyCodetype withSet(),String(),Tag()methodscode_table.gomulticodec/code_table.pySHA2_256,DAG_CBOR, etc.)gen.gotools/gen_code_table.pyChanges
New Module:
multicodec/code.py(mirrorscode.go)Code Type:
Reserved Range Constants:
KnownCodes Function:
New Module:
multicodec/code_table.py(mirrorscode_table.go)460 Named Constants:
New Script:
tools/gen_code_table.py(mirrorsgen.go)Generates
code_table.pyfromconstants.py:Usage Comparison: Go vs Python
Go:
Python (now):
Backward Compatibility
This PR maintains full backward compatibility:
add_prefix,remove_prefix,get_codec, etc.) work unchanged