From 56b6b961fc5d564bd62c7582c9c9aa0cfc54b771 Mon Sep 17 00:00:00 2001 From: Sumanjeet Date: Mon, 6 Jul 2026 11:40:04 +0530 Subject: [PATCH 1/2] feat: add version.json to match go-multicodec --- pyproject.toml | 189 ------------------------------------------------- version.json | 3 + 2 files changed, 3 insertions(+), 189 deletions(-) create mode 100644 version.json diff --git a/pyproject.toml b/pyproject.toml index 8fbc7cd..e69de29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,189 +0,0 @@ -[build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "py-multicodec" -version = "0.2.1" -description = "Multicodec implementation in Python" -readme = "README.rst" -authors = [{ name = "Dhruv Baldawa", email = "dhruv@dhruvb.com" }] -license = { text = "MIT" } -keywords = ["multicodec", "multiformats", "CID", "IPFS", "IPLD"] -classifiers = [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", -] -requires-python = ">=3.10, <4.0" -dependencies = [ - "varint>=1.0.2,<2.0.0", -] - -[project.urls] -Homepage = "https://github.com/multiformats/py-multicodec" -Download = "https://github.com/multiformats/py-multicodec/tarball/0.2.1" - -[project.optional-dependencies] -dev = [ - "Sphinx>=5.0.0", - "build>=0.9.0", - "bump-my-version>=1.2.0", - "codecov", - "coverage>=6.5.0", - "mypy", - "pre-commit", - "pytest", - "pytest-cov", - "pytest-runner", - "ruff", - "towncrier>=24,<25", - "tox>=4.10.0", - "twine", - "watchdog>=3.0.0", - "wheel>=0.31.0", -] - -[tool.setuptools] -include-package-data = true -zip-safe = false - -[tool.setuptools.packages.find] -where = ["."] -include = ["multicodec*"] - -[tool.pytest.ini_options] -testpaths = ["tests"] -python_classes = "*TestCase" - -[tool.coverage.run] -source = ["multicodec"] - -[tool.coverage.report] -exclude_lines = [ - "pragma: no cover", - "def __repr__", - "if self.debug:", - "if settings.DEBUG", - "raise AssertionError", - "raise NotImplementedError", - "if 0:", - "if __name__ == .__main__.:", -] - -[tool.towncrier] -# Read https://github.com/multiformats/py-multicodec/blob/master/newsfragments/README.md for instructions -directory = "newsfragments" -filename = "HISTORY.rst" -issue_format = "`#{issue} `__" -package = "multicodec" -title_format = "py-multicodec v{version} ({project_date})" -underlines = ["-", "~", "^"] -ignore = ["validate_files.py", "README.md"] - -[[tool.towncrier.type]] -directory = "breaking" -name = "Breaking Changes" -showcontent = true - -[[tool.towncrier.type]] -directory = "bugfix" -name = "Bugfixes" -showcontent = true - -[[tool.towncrier.type]] -directory = "deprecation" -name = "Deprecations" -showcontent = true - -[[tool.towncrier.type]] -directory = "docs" -name = "Improved Documentation" -showcontent = true - -[[tool.towncrier.type]] -directory = "feature" -name = "Features" -showcontent = true - -[[tool.towncrier.type]] -directory = "internal" -name = "Internal Changes - for py-multicodec Contributors" -showcontent = true - -[[tool.towncrier.type]] -directory = "misc" -name = "Miscellaneous Changes" -showcontent = false - -[[tool.towncrier.type]] -directory = "performance" -name = "Performance Improvements" -showcontent = true - -[[tool.towncrier.type]] -directory = "removal" -name = "Removals" -showcontent = true - -[tool.bumpversion] -current_version = "0.2.1" -parse = """ - (?P\\d+) - \\.(?P\\d+) - \\.(?P\\d+) -""" -serialize = [ - "{major}.{minor}.{patch}", -] -search = "{current_version}" -replace = "{new_version}" -regex = false -ignore_missing_version = false -tag = true -sign_tags = true -tag_name = "v{new_version}" -tag_message = "Bump version: {current_version} → {new_version}" -allow_dirty = false -commit = true -message = "Bump version: {current_version} → {new_version}" - -[[tool.bumpversion.files]] -filename = "pyproject.toml" -search = "version = \"{current_version}\"" -replace = "version = \"{new_version}\"" - -[[tool.bumpversion.files]] -filename = "multicodec/__init__.py" -search = "__version__ = '{current_version}'" -replace = "__version__ = '{new_version}'" - -[[tool.bumpversion.files]] -filename = "pyproject.toml" -search = "Download = \"https://github.com/multiformats/py-multicodec/tarball/{current_version}\"" -replace = "Download = \"https://github.com/multiformats/py-multicodec/tarball/{new_version}\"" - -[tool.mypy] -python_version = "3.10" -check_untyped_defs = false -disallow_any_generics = false -disallow_incomplete_defs = false -disallow_subclassing_any = false -disallow_untyped_calls = false -disallow_untyped_decorators = false -disallow_untyped_defs = false -ignore_missing_imports = true -incremental = false -strict_equality = false -strict_optional = false -warn_redundant_casts = false -warn_return_any = false -warn_unused_configs = true -warn_unused_ignores = false diff --git a/version.json b/version.json new file mode 100644 index 0000000..77dfc03 --- /dev/null +++ b/version.json @@ -0,0 +1,3 @@ +{ + "version": "v1.0.0" +} From 35029d808b1edb68fd44bba58adc9a1c50144d76 Mon Sep 17 00:00:00 2001 From: Sumanjeet Date: Mon, 6 Jul 2026 11:40:41 +0530 Subject: [PATCH 2/2] feat: add version.json to match go-multicodec --- pyproject.toml | 176 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e69de29..0448a11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -0,0 +1,176 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "py-multicodec" +version = "1.0.0" +description = "Multicodec implementation in Python" +readme = "README.rst" +authors = [{ name = "Dhruv Baldawa", email = "dhruv@dhruvb.com" }] +license = { text = "MIT" } +keywords = ["multicodec", "multiformats", "CID", "IPFS", "IPLD"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +requires-python = ">=3.10, <4.0" +dependencies = [ + "varint>=1.0.2,<2.0.0", +] + +[project.urls] +Homepage = "https://github.com/multiformats/py-multicodec" +Download = "https://github.com/multiformats/py-multicodec/tarball/1.0.0" + +[project.optional-dependencies] +dev = [ + "Sphinx>=5.0.0", + "build>=0.9.0", + "bump-my-version>=1.2.0", + "mypy", + "pre-commit", + "pytest", + "pytest-runner", + "ruff", + "towncrier>=24,<25", + "tox>=4.10.0", + "twine", + "watchdog>=3.0.0", + "wheel>=0.31.0", +] + +[tool.setuptools] +include-package-data = true +zip-safe = false + +[tool.setuptools.packages.find] +where = ["."] +include = ["multicodec*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_classes = "*TestCase" + +[tool.towncrier] +# Read https://github.com/multiformats/py-multicodec/blob/master/newsfragments/README.md for instructions +directory = "newsfragments" +filename = "HISTORY.rst" +issue_format = "`#{issue} `__" +package = "multicodec" +title_format = "py-multicodec v{version} ({project_date})" +underlines = ["-", "~", "^"] +ignore = ["validate_files.py", "README.md"] + +[[tool.towncrier.type]] +directory = "breaking" +name = "Breaking Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "bugfix" +name = "Bugfixes" +showcontent = true + +[[tool.towncrier.type]] +directory = "deprecation" +name = "Deprecations" +showcontent = true + +[[tool.towncrier.type]] +directory = "docs" +name = "Improved Documentation" +showcontent = true + +[[tool.towncrier.type]] +directory = "feature" +name = "Features" +showcontent = true + +[[tool.towncrier.type]] +directory = "internal" +name = "Internal Changes - for py-multicodec Contributors" +showcontent = true + +[[tool.towncrier.type]] +directory = "misc" +name = "Miscellaneous Changes" +showcontent = false + +[[tool.towncrier.type]] +directory = "performance" +name = "Performance Improvements" +showcontent = true + +[[tool.towncrier.type]] +directory = "removal" +name = "Removals" +showcontent = true + +[tool.bumpversion] +current_version = "1.0.0" +parse = """ + (?P\\d+) + \\.(?P\\d+) + \\.(?P\\d+) +""" +serialize = [ + "{major}.{minor}.{patch}", +] +search = "{current_version}" +replace = "{new_version}" +regex = false +ignore_missing_version = false +tag = true +sign_tags = true +tag_name = "v{new_version}" +tag_message = "Bump version: {current_version} → {new_version}" +allow_dirty = false +commit = true +message = "Bump version: {current_version} → {new_version}" + +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = "version = \"{current_version}\"" +replace = "version = \"{new_version}\"" + +[[tool.bumpversion.files]] +filename = "multicodec/__init__.py" +search = "__version__ = \"{current_version}\"" +replace = "__version__ = \"{new_version}\"" + +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = "Download = \"https://github.com/multiformats/py-multicodec/tarball/{current_version}\"" +replace = "Download = \"https://github.com/multiformats/py-multicodec/tarball/{new_version}\"" + +[[tool.bumpversion.files]] +filename = "version.json" +search = '"version": "v{current_version}"' +replace = '"version": "v{new_version}"' + +[tool.mypy] +python_version = "3.10" +check_untyped_defs = false +disallow_any_generics = false +disallow_incomplete_defs = false +disallow_subclassing_any = false +disallow_untyped_calls = false +disallow_untyped_decorators = false +disallow_untyped_defs = false +ignore_missing_imports = true +incremental = false +strict_equality = false +strict_optional = false +warn_redundant_casts = false +warn_return_any = false +warn_unused_configs = true +warn_unused_ignores = false