diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 8b6006c..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[bumpversion] -current_version = 0.7.2 -commit = True -tag = True -parse = (?P\d+)\.(?P\d+)\.(?P\d+) -serialize = - {major}.{minor}.{patch} -tag_name = {new_version} -message = Version {new_version} - -[bumpversion:file:openapi_spec_validator/__init__.py] - -[bumpversion:file:Dockerfile] - -[bumpversion:file:pyproject.toml] -search = version = "{current_version}" -replace = version = "{new_version}" diff --git a/poetry.lock b/poetry.lock index 5903926..a9fcd89 100644 --- a/poetry.lock +++ b/poetry.lock @@ -130,18 +130,6 @@ d = ["aiohttp (>=3.10)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] -[[package]] -name = "bump2version" -version = "1.0.1" -description = "Version-bump your software with a single command!" -optional = false -python-versions = ">=3.5" -groups = ["dev"] -files = [ - {file = "bump2version-1.0.1-py2.py3-none-any.whl", hash = "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410"}, - {file = "bump2version-1.0.1.tar.gz", hash = "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6"}, -] - [[package]] name = "cachetools" version = "6.0.0" @@ -292,6 +280,23 @@ files = [ {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, ] +[[package]] +name = "cli-ui" +version = "0.19.0" +description = "Build Nice User Interfaces In The Terminal" +optional = false +python-versions = "<4.0,>=3.9" +groups = ["dev"] +files = [ + {file = "cli_ui-0.19.0-py3-none-any.whl", hash = "sha256:1cf1b93328f7377730db29507e10bcb29ccc1427ceef45714b522d1f2055e7cd"}, + {file = "cli_ui-0.19.0.tar.gz", hash = "sha256:59cdab0c6a2a6703c61b31cb75a1943076888907f015fffe15c5a8eb41a933aa"}, +] + +[package.dependencies] +colorama = ">=0.4.1,<0.5.0" +tabulate = ">=0.9.0,<0.10.0" +unidecode = ">=1.3.6,<2.0.0" + [[package]] name = "click" version = "8.1.8" @@ -448,6 +453,17 @@ files = [ {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, ] +[[package]] +name = "docopt" +version = "0.6.2" +description = "Pythonic argument parser, that will make you smile" +optional = false +python-versions = "*" +groups = ["dev"] +files = [ + {file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"}, +] + [[package]] name = "docutils" version = "0.21.2" @@ -1534,6 +1550,18 @@ files = [ {file = "rpds_py-0.25.1.tar.gz", hash = "sha256:8960b6dac09b62dac26e75d7e2c4a22efb835d827a7278c34f72b2b84fa160e3"}, ] +[[package]] +name = "schema" +version = "0.7.7" +description = "Simple data validation library" +optional = false +python-versions = "*" +groups = ["dev"] +files = [ + {file = "schema-0.7.7-py2.py3-none-any.whl", hash = "sha256:5d976a5b50f36e74e2157b47097b60002bd4d42e65425fcc9c9befadb4255dde"}, + {file = "schema-0.7.7.tar.gz", hash = "sha256:7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807"}, +] + [[package]] name = "six" version = "1.17.0" @@ -1724,6 +1752,39 @@ lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] +[[package]] +name = "tabulate" +version = "0.9.0" +description = "Pretty-print tabular data" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, + {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, +] + +[package.extras] +widechars = ["wcwidth"] + +[[package]] +name = "tbump" +version = "6.11.0" +description = "Bump software releases" +optional = false +python-versions = ">=3.7,<4.0" +groups = ["dev"] +files = [ + {file = "tbump-6.11.0-py3-none-any.whl", hash = "sha256:6b181fe6f3ae84ce0b9af8cc2009a8bca41ded34e73f623a7413b9684f1b4526"}, + {file = "tbump-6.11.0.tar.gz", hash = "sha256:385e710eedf0a8a6ff959cf1e9f3cfd17c873617132fc0ec5f629af0c355c870"}, +] + +[package.dependencies] +cli-ui = ">=0.10.3" +docopt = ">=0.6.2,<0.7.0" +schema = ">=0.7.1,<0.8.0" +tomlkit = ">=0.11,<0.12" + [[package]] name = "tomli" version = "2.2.1" @@ -1767,6 +1828,18 @@ files = [ ] markers = {dev = "python_full_version <= \"3.11.0a6\"", docs = "python_version < \"3.11\""} +[[package]] +name = "tomlkit" +version = "0.11.8" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, + {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, +] + [[package]] name = "tox" version = "4.26.0" @@ -1823,6 +1896,18 @@ files = [ [package.dependencies] typing-extensions = ">=4.12.0" +[[package]] +name = "unidecode" +version = "1.4.0" +description = "ASCII transliterations of Unicode text" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "Unidecode-1.4.0-py3-none-any.whl", hash = "sha256:c3c7606c27503ad8d501270406e345ddb480a7b5f38827eafe4fa82a137f0021"}, + {file = "Unidecode-1.4.0.tar.gz", hash = "sha256:ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23"}, +] + [[package]] name = "urllib3" version = "2.4.0" @@ -1889,4 +1974,4 @@ docs = [] [metadata] lock-version = "2.1" python-versions = "^3.9.0" -content-hash = "27d9ece6cbd06df707419ed7b67c143176f9c3ff3124347924a63d6ac8fe4602" +content-hash = "cc97a2a2a1dabc2dd6aff33bfd9842bffbb3c0ac85434979d809fb2c4c63c5f4" diff --git a/pyproject.toml b/pyproject.toml index ec02457..62b20de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,15 @@ lazy-object-proxy = "^1.7.1" [tool.poetry.extras] docs = ["sphinx", "sphinx-immaterial"] -[tool.poetry.dev-dependencies] +[tool.poetry.scripts] +openapi-spec-validator = "openapi_spec_validator.__main__:main" + +[tool.poetry.group.docs.dependencies] +sphinx = ">=5.3,<8.0" +sphinx-immaterial = ">=0.11,<0.13" + +[tool.poetry.group.dev.dependencies] +tbump = "^6.11.0" pre-commit = "*" pytest = "^8.2.2" pytest-flake8 = "=1.3.0" @@ -75,14 +83,6 @@ flynt = "^1.0" deptry = "^0.23.0" flake8 = "^5.0.4" pyflakes = "^2.5.0" -bump2version = "^1.0.1" - -[tool.poetry.scripts] -openapi-spec-validator = "openapi_spec_validator.__main__:main" - -[tool.poetry.group.docs.dependencies] -sphinx = ">=5.3,<8.0" -sphinx-immaterial = ">=0.11,<0.13" [tool.pytest.ini_options] addopts = """ @@ -105,3 +105,30 @@ line-length = 79 profile = "black" line_length = 79 force_single_line = true + +[tool.tbump] + +[tool.tbump.git] +message_template = "Version {new_version}" +tag_template = "{new_version}" + +[tool.tbump.version] +current = "0.7.2" +regex = ''' + (?P\d+) + \. + (?P\d+) + \. + (?P\d+) + (?P[a-z]+\d+)? +''' + +[[tool.tbump.file]] +src = "openapi_spec_validator/__init__.py" + +[[tool.tbump.file]] +src = "Dockerfile" + +[[tool.tbump.file]] +src = "pyproject.toml" +search = 'version = "{current_version}"'