Skip to content

Fix #52: Sync hash constants with upstream and add spec compliance test - #63

Open
sumanjeet0012 wants to merge 3 commits into
multiformats:masterfrom
sumanjeet0012:fix-issue-52
Open

Fix #52: Sync hash constants with upstream and add spec compliance test#63
sumanjeet0012 wants to merge 3 commits into
multiformats:masterfrom
sumanjeet0012:fix-issue-52

Conversation

@sumanjeet0012

Copy link
Copy Markdown
Contributor

This PR resolves #52 by adding a spec validation test that verifies the multihash constants in constants.py and funcs.py match the authoritative upstream multicodec/table.csv.

Changes included:

  • Added multicodec as a git submodule in spec/multicodec to track the authoritative upstream table.
  • Created tests/test_spec.py with test_spec_table_completeness() to assert all multihash codes present in upstream table.csv are properly mapped in HASH_CODES and Func.
  • Regenerated multihash/constants.py and multihash/funcs.py to sync with the latest upstream table, adding many missing hash codes and aligning exact naming strings.
  • Ignored spec folder from ruff formatting, linting and mypy typechecks to preserve the upstream submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No spec compliance test validating hash codes against multicodec/table.csv

1 participant