python-semantic-release 9.12.2__tar.gz → 9.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. {python_semantic_release-9.12.2/src/python_semantic_release.egg-info → python_semantic_release-9.14.0}/PKG-INFO +2 -2
  2. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/automatic-releases/github-actions.rst +5 -5
  3. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/changelog_templates.rst +78 -34
  4. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/commit-parsing.rst +46 -22
  5. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/conf.py +1 -1
  6. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/configuration.rst +30 -0
  7. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/index.rst +2 -2
  8. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/pyproject.toml +2 -2
  9. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0/src/python_semantic_release.egg-info}/PKG-INFO +2 -2
  10. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/SOURCES.txt +5 -0
  11. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/requires.txt +1 -1
  12. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/__init__.py +1 -1
  13. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/changelog/context.py +9 -0
  14. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/changelog_writer.py +5 -4
  15. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/changelog.py +1 -0
  16. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/version.py +1 -0
  17. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/config.py +4 -0
  18. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/angular.py +60 -33
  19. python_semantic_release-9.14.0/src/semantic_release/commit_parser/emoji.py +162 -0
  20. python_semantic_release-9.14.0/src/semantic_release/commit_parser/scipy.py +152 -0
  21. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/token.py +30 -0
  22. python_semantic_release-9.14.0/src/semantic_release/commit_parser/util.py +58 -0
  23. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +29 -0
  24. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +16 -7
  25. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +44 -0
  26. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +11 -0
  27. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/macros.md.j2 +69 -0
  28. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +13 -0
  29. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +1 -4
  30. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +29 -0
  31. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +16 -7
  32. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +76 -0
  33. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2 +20 -0
  34. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +97 -0
  35. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +1 -4
  36. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/const.py +3 -0
  37. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_changelog/test_changelog.py +245 -190
  38. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_publish/test_publish.py +4 -4
  39. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version.py +7 -7
  40. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_build.py +5 -5
  41. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_bump.py +68 -543
  42. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_changelog.py +102 -91
  43. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_github_actions.py +2 -2
  44. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_print.py +21 -14
  45. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_release_notes.py +2 -2
  46. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_stamp.py +7 -9
  47. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_strict.py +3 -3
  48. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/test_help.py +4 -4
  49. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/test_main.py +12 -12
  50. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/git_repo.py +516 -31
  51. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +193 -230
  52. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +242 -273
  53. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/github_flow/__init__.py +1 -0
  54. python_semantic_release-9.14.0/tests/fixtures/repos/github_flow/repo_w_default_release.py +485 -0
  55. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +186 -85
  56. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/repo_initial_commit.py +21 -24
  57. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +27 -39
  58. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +44 -43
  59. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +34 -31
  60. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/conftest.py +114 -0
  61. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +8 -0
  62. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/test_default_changelog.py +248 -0
  63. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_release_history.py +36 -20
  64. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/test_release_notes.py +188 -0
  65. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_config.py +2 -2
  66. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_angular.py +43 -0
  67. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +43 -0
  68. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +69 -11
  69. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/util.py +1 -0
  70. python_semantic_release-9.12.2/src/semantic_release/commit_parser/emoji.py +0 -115
  71. python_semantic_release-9.12.2/src/semantic_release/commit_parser/scipy.py +0 -203
  72. python_semantic_release-9.12.2/src/semantic_release/commit_parser/util.py +0 -27
  73. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +0 -22
  74. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +0 -16
  75. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +0 -1
  76. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +0 -22
  77. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +0 -36
  78. python_semantic_release-9.12.2/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +0 -16
  79. python_semantic_release-9.12.2/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -217
  80. python_semantic_release-9.12.2/tests/unit/semantic_release/changelog/test_release_notes.py +0 -114
  81. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/AUTHORS.rst +0 -0
  82. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/LICENSE +0 -0
  83. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/MANIFEST.in +0 -0
  84. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/README.rst +0 -0
  85. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/Makefile +0 -0
  86. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/algorithm.rst +0 -0
  87. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/automatic-releases/cronjobs.rst +0 -0
  88. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/automatic-releases/index.rst +0 -0
  89. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/automatic-releases/travis.rst +0 -0
  90. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/commands.rst +0 -0
  91. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/contributing.rst +0 -0
  92. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/contributors.rst +0 -0
  93. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/make.bat +0 -0
  94. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/migrating_from_v7.rst +0 -0
  95. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/multibranch_releases.rst +0 -0
  96. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/strict_mode.rst +0 -0
  97. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/docs/troubleshooting.rst +0 -0
  98. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/setup.cfg +0 -0
  99. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/dependency_links.txt +0 -0
  100. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/entry_points.txt +0 -0
  101. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/top_level.txt +0 -0
  102. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/__main__.py +0 -0
  103. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/changelog/__init__.py +0 -0
  104. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/changelog/release_history.py +0 -0
  105. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/changelog/template.py +0 -0
  106. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/__init__.py +0 -0
  107. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/cli_context.py +0 -0
  108. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  109. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  110. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/main.py +0 -0
  111. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/publish.py +0 -0
  112. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/const.py +0 -0
  113. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/github_actions_output.py +0 -0
  114. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/masking_filter.py +0 -0
  115. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/cli/util.py +0 -0
  116. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/__init__.py +0 -0
  117. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/_base.py +0 -0
  118. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/tag.py +0 -0
  119. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/const.py +0 -0
  120. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
  121. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +0 -0
  122. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +0 -0
  123. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
  124. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +0 -0
  125. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +0 -0
  126. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/enums.py +0 -0
  127. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/errors.py +0 -0
  128. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/gitproject.py +0 -0
  129. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/globals.py +0 -0
  130. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/helpers.py +0 -0
  131. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/__init__.py +0 -0
  132. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/_base.py +0 -0
  133. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
  134. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/gitea.py +0 -0
  135. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/github.py +0 -0
  136. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/gitlab.py +0 -0
  137. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  138. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  139. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/util.py +0 -0
  140. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/version/__init__.py +0 -0
  141. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/version/algorithm.py +0 -0
  142. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/version/declaration.py +0 -0
  143. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/version/translator.py +0 -0
  144. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/src/semantic_release/version/version.py +0 -0
  145. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/__init__.py +0 -0
  146. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/conftest.py +0 -0
  147. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/__init__.py +0 -0
  148. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  149. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_config/__init__.py +0 -0
  150. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  151. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  152. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/__init__.py +0 -0
  153. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/e2e/conftest.py +0 -0
  154. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/__init__.py +0 -0
  155. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/commit_parsers.py +0 -0
  156. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/example_project.py +0 -0
  157. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/__init__.py +0 -0
  158. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  159. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  160. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/fixtures/scipy.py +0 -0
  161. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/__init__.py +0 -0
  162. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/conftest.py +0 -0
  163. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/__init__.py +0 -0
  164. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  165. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  166. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  167. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
  168. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  169. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  170. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
  171. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  172. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  173. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  174. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  175. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  176. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  177. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  178. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  179. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  180. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  181. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  182. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  183. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/test_helpers.py +0 -0
  184. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/__init__.py +0 -0
  185. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  186. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  187. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  188. {python_semantic_release-9.12.2 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.12.2
3
+ Version: 9.14.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -58,7 +58,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
58
58
  Requires-Dist: tox~=4.11; extra == "dev"
59
59
  Requires-Dist: ruff==0.6.1; extra == "dev"
60
60
  Provides-Extra: mypy
61
- Requires-Dist: mypy==1.11.2; extra == "mypy"
61
+ Requires-Dist: mypy==1.13.0; extra == "mypy"
62
62
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
63
63
 
64
64
  Python Semantic Release
@@ -337,7 +337,7 @@ before the :ref:`version <cmd-version>` subcommand.
337
337
 
338
338
  .. code:: yaml
339
339
 
340
- - uses: python-semantic-release/python-semantic-release@v9.12.2
340
+ - uses: python-semantic-release/python-semantic-release@v9.14.0
341
341
  with:
342
342
  root_options: "-vv --noop"
343
343
 
@@ -684,7 +684,7 @@ to the GitHub Release Assets as well.
684
684
  - name: Action | Semantic Version Release
685
685
  id: release
686
686
  # Adjust tag with desired version if applicable.
687
- uses: python-semantic-release/python-semantic-release@v9.12.2
687
+ uses: python-semantic-release/python-semantic-release@v9.14.0
688
688
  with:
689
689
  github_token: ${{ secrets.GITHUB_TOKEN }}
690
690
  git_committer_name: "github-actions"
@@ -744,7 +744,7 @@ The equivalent GitHub Action configuration would be:
744
744
 
745
745
  - name: Action | Semantic Version Release
746
746
  # Adjust tag with desired version if applicable.
747
- uses: python-semantic-release/python-semantic-release@v9.12.2
747
+ uses: python-semantic-release/python-semantic-release@v9.14.0
748
748
  with:
749
749
  github_token: ${{ secrets.GITHUB_TOKEN }}
750
750
  force: patch
@@ -772,13 +772,13 @@ Publish Action.
772
772
  .. code:: yaml
773
773
 
774
774
  - name: Release Project 1
775
- uses: python-semantic-release/python-semantic-release@v9.12.2
775
+ uses: python-semantic-release/python-semantic-release@v9.14.0
776
776
  with:
777
777
  directory: ./project1
778
778
  github_token: ${{ secrets.GITHUB_TOKEN }}
779
779
 
780
780
  - name: Release Project 2
781
- uses: python-semantic-release/python-semantic-release@v9.12.2
781
+ uses: python-semantic-release/python-semantic-release@v9.14.0
782
782
  with:
783
783
  directory: ./project2
784
784
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -470,6 +470,26 @@ the ``context`` object has the following attributes:
470
470
  #}{% endif
471
471
  %}
472
472
 
473
+ * ``mask_initial_release (bool)``: a boolean value indicating whether the initial release
474
+ should be masked with a generic message. This value is passed directly from the
475
+ :ref:`changelog.default_templates.mask_initial_release <config-changelog-default_templates-mask_initial_release>`
476
+ configuration setting.
477
+
478
+ *Introduced in v9.14.0.*
479
+
480
+ **Example Usage:**
481
+
482
+ .. code:: jinja
483
+
484
+ #}{% if releases | length == 1 and ctx.mask_initial_release
485
+ %}{# # On a first release, generate a generic message
486
+ #}{% include ".components/first_release.md.j2"
487
+ %}{% else
488
+ %}{# # Not the first release
489
+ #}{% include ".components/versioned_changes.md.j2"
490
+ %}{% endif
491
+ %}
492
+
473
493
  * ``repo_name (str)``: the name of the current repository parsed from the Git url.
474
494
 
475
495
  **Example Usage:**
@@ -512,60 +532,72 @@ the ``context`` object has the following attributes:
512
532
  Release History
513
533
  """""""""""""""
514
534
 
515
- A ``ReleaseHistory`` object has two attributes: ``released`` and ``unreleased``.
535
+ A :py:class:`ReleaseHistory <semantic_release.changelog.release_history.ReleaseHistory>`
536
+ object has two attributes: ``released`` and ``unreleased``.
516
537
 
517
538
  The ``unreleased`` attribute is of type ``Dict[str, List[ParseResult]]``. Each commit
518
539
  in the current branch's commit history since the last release on this branch is grouped
519
- by the ``type`` attribute of the ``ParsedCommit`` returned by the commit parser,
520
- or if the parser returned a ``ParseError`` then the result is grouped under the
521
- ``"unknown"`` key.
540
+ by the ``type`` attribute of the
541
+ :py:class:`ParsedCommit <semantic_release.commit_parser.token.ParsedCommit>`
542
+ returned by the commit parser, or if the parser returned a
543
+ :py:class:`ParseError <semantic_release.commit_parser.token.ParseError>`
544
+ then the result is grouped under the ``"unknown"`` key.
522
545
 
523
546
  For this reason, every element of ``ReleaseHistory.unreleased["unknown"]`` is a
524
- ``ParseError``, and every element of every other value in ``ReleaseHistory.unreleased``
525
- is of type ``ParsedCommit``.
547
+ :py:class:`ParseError <semantic_release.commit_parser.token.ParseError>`, and
548
+ every element of every other value in ``ReleaseHistory.unreleased`` is of type
549
+ :py:class:`ParsedCommit <semantic_release.commit_parser.token.ParsedCommit>`.
526
550
 
527
551
  Typically, commit types will be ``"feature"``, ``"fix"``, ``"breaking"``, though the
528
552
  specific types are determined by the parser. For example, the
529
- :py:class:`semantic_release.commit_parser.EmojiCommitParser` uses a textual
530
- representation of the emoji corresponding to the most significant change introduced
531
- in a commit (e.g. ``":boom:"``) as the different commit types. As a template author,
532
- you are free to customise how these are presented in the rendered template.
553
+ :py:class:`EmojiCommitParser <semantic_release.commit_parser.emoji.EmojiCommitParser>`
554
+ uses a textual representation of the emoji corresponding to the most significant change
555
+ introduced in a commit (e.g. ``":boom:"``) as the different commit types. As a template
556
+ author, you are free to customize how these are presented in the rendered template.
533
557
 
534
558
  .. note::
535
559
  If you are using a custom commit parser following the guide at
536
560
  :ref:`commit-parser-writing-your-own-parser`, your custom implementations of
537
- :py:class:`semantic_release.ParseResult`, :py:class:`semantic_release.ParseError`
538
- and :py:class:`semantic_release.ParsedCommit` will be used in place of the built-in
539
- types.
561
+ :py:class:`ParseResult <semantic_release.commit_parser.token.ParseResult>`,
562
+ :py:class:`ParseError <semantic_release.commit_parser.token.ParseError>`
563
+ and :py:class:`ParsedCommit <semantic_release.commit_parser.token.ParsedCommit>`
564
+ will be used in place of the built-in types.
540
565
 
541
566
  The ``released`` attribute is of type ``Dict[Version, Release]``. The keys of this
542
567
  dictionary correspond to each version released within this branch's history, and
543
- are of type ``semantic_release.Version``. You can use the ``as_tag()`` method to
544
- render these as the Git tag that they correspond to inside your template.
545
-
546
- A ``Release`` object has an ``elements`` attribute, which has the same
547
- structure as the ``unreleased`` attribute of a ``ReleaseHistory``; that is,
548
- ``elements`` is of type ``Dict[str, List[ParseResult]]``, where every element
549
- of ``elements["unknown"]`` is a ``ParseError``, and elements of every other
550
- value correspond to the ``type`` attribute of the ``ParsedCommit`` returned
568
+ are of type :py:class:`Version <semantic_release.version.version.Version>`. You can
569
+ use the ``as_tag()`` method to render these as the Git tag that they correspond to
570
+ inside your template.
571
+
572
+ A :py:class:`Release <semantic_release.changelog.release_history.Release>`object
573
+ has an ``elements`` attribute, which has the same structure as the ``unreleased``
574
+ attribute of a
575
+ :py:class:`ReleaseHistory <semantic_release.changelog.release_history.ReleaseHistory>`;
576
+ that is, ``elements`` is of type ``Dict[str, List[ParseResult]]``, where every element
577
+ of ``elements["unknown"]`` is a
578
+ :py:class:`ParseError <semantic_release.commit_parser.token.ParseError>`, and elements
579
+ of every other value correspond to the ``type`` attribute of the
580
+ :py:class:`ParsedCommit <semantic_release.commit_parser.token.ParsedCommit>` returned
551
581
  by the commit parser.
552
582
 
553
583
  The commits represented within each ``ReleaseHistory.released[version].elements``
554
- grouping are the commits which were made between ``version`` and the release
555
- corresponding to the previous version.
556
- That is, given two releases ``Version(1, 0, 0)`` and ``Version(1, 1, 0)``,
557
- ``ReleaseHistory.released[Version(1, 0, 0)].elements`` contains only commits
558
- made after the release of ``Version(1, 0, 0)`` up to and including the release
559
- of ``Version(1, 1, 0)``.
584
+ grouping are the commits which were made between version and the release corresponding
585
+ to the previous version. That is, given two releases ``Version(1, 0, 0)`` and
586
+ ``Version(1, 1, 0)``, ``ReleaseHistory.released[Version(1, 0, 0)].elements`` contains
587
+ only commits made after the release of ``Version(1, 0, 0)`` up to and including the
588
+ release of ``Version(1, 1, 0)``.
560
589
 
561
590
  To maintain a consistent order of subsections in the changelog headed by the commit
562
- type, it's recommended to use Jinja's `dictsort <https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.dictsort>`_
591
+ type, it's recommended to use Jinja's
592
+ `dictsort <https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.dictsort>`_
563
593
  filter.
564
594
 
565
595
  Each ``Release`` object also has the following attributes:
566
596
 
567
597
  * ``tagger: git.Actor``: The tagger who tagged the release.
598
+
568
599
  * ``committer: git.Actor``: The committer who made the release commit.
600
+
569
601
  * ``tagged_date: datetime``: The date and time at which the release was tagged.
570
602
 
571
603
  .. seealso::
@@ -724,11 +756,17 @@ The filters provided vary based on the VCS configured and available features:
724
756
 
725
757
  .. code:: jinja
726
758
 
727
- {{ "29" | merge_request_url }}
759
+ {{
760
+ "[%s](%s)" | format(
761
+ commit.linked_merge_request,
762
+ commit.linked_merge_request | merge_request_url
763
+ )
764
+ }}
765
+ {# commit.linked_merge_request is only available in v9.13.0 or greater #}
728
766
 
729
767
  .. code:: markdown
730
768
 
731
- https://example.com/example/repo/-/merge_requests/29
769
+ [#29](https://example.com/example/repo/-/merge_requests/29)
732
770
 
733
771
  * ``pull_request_url (Callable[[PullReqStr | PullReqInt], UrlStr])``: given a pull
734
772
  request number, return a URL to the pull request in the remote. For remote vcs'
@@ -743,11 +781,17 @@ The filters provided vary based on the VCS configured and available features:
743
781
 
744
782
  .. code:: jinja
745
783
 
746
- {{ "29" | pull_request_url }}
784
+ {{
785
+ "[%s](%s)" | format(
786
+ commit.linked_merge_request,
787
+ commit.linked_merge_request | pull_request_url
788
+ )
789
+ }}
790
+ {# commit.linked_merge_request is only available in v9.13.0 or greater #}
747
791
 
748
792
  .. code:: markdown
749
793
 
750
- https://example.com/example/repo/pull/29
794
+ [#29](https://example.com/example/repo/pull/29)
751
795
 
752
796
  * ``read_file (Callable[[str], str])``: given a file path, read the file and
753
797
  return the contents as a string. This function was added specifically to
@@ -883,12 +927,12 @@ exposed to the `Jinja`_ template when rendering the release notes.
883
927
 
884
928
  Additionally, the following two globals are available to the template:
885
929
 
886
- * ``release`` (:class:`Release <semantic_release.changelog.release_history.Release>`):
930
+ * ``release`` (:py:class:`Release <semantic_release.changelog.release_history.Release>`):
887
931
  contains metadata about the content of the release, as parsed from commit logs
888
932
 
889
933
  *Introduced in v8.0.0.*
890
934
 
891
- * ``version`` (:class:`Version <semantic_release.version.version.Version>`): contains
935
+ * ``version`` (:py:class:`Version <semantic_release.version.version.Version>`): contains
892
936
  metadata about the software version to be released and its ``git`` tag
893
937
 
894
938
  *Introduced in v8.0.0.*
@@ -45,9 +45,12 @@ The following parsers are built in to Python Semantic Release:
45
45
  ``semantic_release.commit_parser.AngularCommitParser``
46
46
  """"""""""""""""""""""""""""""""""""""""""""""""""""""
47
47
 
48
- The default parser, which uses the `Angular commit style <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits>`_ with the following differences:
48
+ The default parser, which uses the
49
+ `Angular commit style <https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits>`_
50
+ with the following differences:
49
51
 
50
52
  - Multiple ``BREAKING CHANGE:`` paragraphs are supported
53
+
51
54
  - ``revert`` is not currently supported
52
55
 
53
56
  The default configuration options for
@@ -222,26 +225,41 @@ as the commit history of a repository is being parsed. Python Semantic Release d
222
225
  not raise an exception if a commit cannot be parsed.
223
226
 
224
227
  Python Semantic Release uses :py:class:`semantic_release.ParsedCommit`
225
- as the return type of a successful parse operation, and :py:class:`semantic_release.ParseError`
226
- as the return type from an unsuccessful parse of a commit. :py:class:`semantic_release.ParsedCommit` is a `namedtuple`_ which has the following fields:
227
-
228
- * bump: a :py:class:`semantic_release.LevelBump` indicating what type of change this commit introduces.
229
- * type: the *type* of the commit as a string, per the commit message style. This is up to the
230
- parser to implement; for example, the :py:class:`semantic_release.commit_parser.EmojiCommitParser`
231
- parser fills this field with the emoji representing the most significant change for the commit.
232
- The field is named after the representation in the Angular commit specification.
233
- * scope: The scope, as a string, parsed from the commit. Commit styles which do not have a meaningful
234
- concept of "scope" should fill this field with an empty string.
235
- * descriptions: A list of paragraphs (strings) (delimited by a double-newline) from the commit message.
236
- * breaking_descriptions: A list of paragraphs (strings) which are deemed to identify and describe
237
- breaking changes by the parser. An example would be a paragraph which begins with the text
238
- ``BREAKING CHANGE:``.
239
- * commit: The original commit object that was parsed.
228
+ as the return type of a successful parse operation, and
229
+ :py:class:`semantic_release.ParseError` as the return type from an unsuccessful
230
+ parse of a commit. :py:class:`semantic_release.ParsedCommit` is a `namedtuple`_
231
+ which has the following fields:
232
+
233
+ * **bump**: a :py:class:`semantic_release.LevelBump` indicating what type of change
234
+ this commit introduces.
235
+
236
+ * **type**: the *type* of the commit as a string, per the commit message style. This
237
+ is up to the parser to implement; for example, the
238
+ :py:class:`semantic_release.commit_parser.EmojiCommitParser` parser fills this field
239
+ with the emoji representing the most significant change for the commit. The field is
240
+ named after the representation in the Angular commit specification.
241
+
242
+ * **scope**: The scope, as a string, parsed from the commit. Commit styles which do
243
+ not have a meaningful concept of "scope" should fill this field with an empty string.
244
+
245
+ * **descriptions**: A list of paragraphs (strings) (delimited by a double-newline)
246
+ from the commit message.
247
+
248
+ * **breaking_descriptions**: A list of paragraphs (strings) which are deemed to
249
+ identify and describe breaking changes by the parser. An example would be a
250
+ paragraph which begins with the text ``BREAKING CHANGE:``.
251
+
252
+ * **commit**: The original commit object (a class defined by GitPython) that was parsed.
253
+
254
+ * **linked_merge_request**: A pull request or merge request definition, if the commit is
255
+ labeled with a pull/merge request number. This is a string value which includes any
256
+ special character prefix used by the VCS (e.g. ``#`` for GitLab, ``!`` for Bitbucket).
240
257
 
241
258
  :py:class:`semantic_release.ParseError` is a `namedtuple`_ which has the following fields:
242
259
 
243
- * commit: The original commit object that was parsed.
244
- * error: A string with a meaningful error message as to why the commit parsing failed.
260
+ * **commit**: The original commit object that was parsed.
261
+
262
+ * **error**: A string with a meaningful error message as to why the commit parsing failed.
245
263
 
246
264
  In addition, :py:class:`semantic_release.ParseError` implements an additional method, ``raise_error``.
247
265
  This method raises a :py:class:`semantic_release.CommitParseError` with the message contained in the
@@ -252,10 +270,12 @@ attributes available, each implemented as a ``property`` which is computed, as a
252
270
  convenience for template authors - therefore custom implementations should ensure
253
271
  these properties can also be computed:
254
272
 
255
- * message: the ``message`` attribute of the ``commit``; where the message is of type ``bytes``
256
- this should be decoded to a ``UTF-8`` string.
257
- * hexsha: the ``hexsha`` attribute of the ``commit``, representing its hash.
258
- * short_hash: the first 7 characters of the ``hexsha`` attribute of the ``commit``.
273
+ * **message**: the ``message`` attribute of the ``commit``; where the message is of type
274
+ ``bytes`` this should be decoded to a ``UTF-8`` string.
275
+
276
+ * **hexsha**: the ``hexsha`` attribute of the ``commit``, representing its hash.
277
+
278
+ * **short_hash**: the first 7 characters of the ``hexsha`` attribute of the ``commit``.
259
279
 
260
280
  In Python Semantic Release, the class :py:class:`semantic_release.ParseResult`
261
281
  is defined as ``ParseResultType[ParsedCommit, ParseError]``, as a convenient shorthand.
@@ -268,7 +288,9 @@ type returned on an unsuccessful parse of the ``commit``.
268
288
  A custom parser result type, therefore, could be implemented as follows:
269
289
 
270
290
  * ``MyParsedCommit`` subclasses ``ParsedCommit``
291
+
271
292
  * ``MyParseError`` subclasses ``ParseError``
293
+
272
294
  * ``MyParseResult = ParseResultType[MyParsedCommit, MyParseError]``
273
295
 
274
296
  Internally, Python Semantic Release uses ``isinstance`` to determine if the result
@@ -326,8 +348,10 @@ the following:
326
348
 
327
349
  * A class-level attribute ``parser_options``, which must be set to
328
350
  :py:class:`semantic_release.ParserOptions` or a subclass of this.
351
+
329
352
  * An ``__init__`` method which takes a single parameter, ``options``, that should be
330
353
  of the same type as the class' ``parser_options`` attribute.
354
+
331
355
  * A method, ``parse``, which takes a single parameter ``commit`` that is of type
332
356
  `git.objects.commit.Commit <gitpython-commit-object>`_, and returns
333
357
  :py:class:`semantic_release.token.ParseResult`, or a subclass of this.
@@ -38,7 +38,7 @@ htmlhelp_basename = "python-semantic-releasedoc"
38
38
 
39
39
  docs_path = os.path.dirname(__file__)
40
40
  apidoc_output_dir = os.path.join(docs_path, "api")
41
- apidoc_module_dir = os.path.join(docs_path, "..", "semantic_release")
41
+ apidoc_module_dir = os.path.join(docs_path, "..", "src")
42
42
  apidoc_separate_modules = True
43
43
  apidoc_module_first = True
44
44
  apidoc_extra_args = ["-d", "3"]
@@ -362,6 +362,36 @@ this setting is not used. See :ref:`config-changelog-template_dir` for more info
362
362
 
363
363
  ----
364
364
 
365
+ .. _config-changelog-default_templates-mask_initial_release:
366
+
367
+ ``mask_initial_release``
368
+ '''''''''''''''''''''''
369
+
370
+ *Introduced in v9.14.0*
371
+
372
+ **Type:** ``bool``
373
+
374
+ This option toggles the behavior of the changelog and release note templates to mask
375
+ the release details specifically for the first release. When set to ``true``, the
376
+ first version release notes will be masked with a generic message as opposed to the
377
+ usual commit details. When set to ``false``, the release notes will be generated as
378
+ normal.
379
+
380
+ The reason for this setting is to improve clarity to your audience. It conceptually
381
+ does **NOT** make sense to have a list of changes (i.e. a Changelog) for the first release
382
+ since nothing has been published yet, therefore in the eyes of your consumers what change
383
+ is there to document?
384
+
385
+ The message details can be found in the ``first_release.md.j2`` and ``first_release.rst.j2``
386
+ templates of the default changelog template directory.
387
+
388
+ **Default:** ``false``
389
+
390
+ .. seealso::
391
+ - :ref:`changelog-templates-default_changelog`
392
+
393
+ ----
394
+
365
395
  .. _config-changelog-default_templates-output_format:
366
396
 
367
397
  ``output_format``
@@ -30,8 +30,8 @@ Read more about the setup and configuration in our `getting started guide`_.
30
30
  .. _GitHub Action: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
31
31
  .. _conda-forge: https://anaconda.org/conda-forge/python-semantic-release
32
32
 
33
- .. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/main.yml?branch=master&label=Test%20Status&logo=github
34
- :target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/main.yml
33
+ .. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/cicd.yml?branch=master&label=Test%20Status&logo=github
34
+ :target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/cicd.yml
35
35
  :alt: test-status
36
36
  .. |PyPI Version| image:: https://img.shields.io/pypi/v/python-semantic-release?label=PyPI&logo=pypi
37
37
  :target: https://pypi.org/project/python-semantic-release/
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.12.2"
9
+ version = "9.14.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -78,7 +78,7 @@ dev = [
78
78
  "ruff == 0.6.1"
79
79
  ]
80
80
  mypy = [
81
- "mypy == 1.11.2",
81
+ "mypy == 1.13.0",
82
82
  "types-requests ~= 2.32.0",
83
83
  ]
84
84
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.12.2
3
+ Version: 9.14.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -58,7 +58,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
58
58
  Requires-Dist: tox~=4.11; extra == "dev"
59
59
  Requires-Dist: ruff==0.6.1; extra == "dev"
60
60
  Provides-Extra: mypy
61
- Requires-Dist: mypy==1.11.2; extra == "mypy"
61
+ Requires-Dist: mypy==1.13.0; extra == "mypy"
62
62
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
63
63
 
64
64
  Python Semantic Release
@@ -68,6 +68,8 @@ src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j
68
68
  src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
69
69
  src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
70
70
  src/semantic_release/data/templates/angular/md/.components/changes.md.j2
71
+ src/semantic_release/data/templates/angular/md/.components/first_release.md.j2
72
+ src/semantic_release/data/templates/angular/md/.components/macros.md.j2
71
73
  src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
72
74
  src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
73
75
  src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2
@@ -75,6 +77,7 @@ src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst
75
77
  src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
76
78
  src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
77
79
  src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2
80
+ src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2
78
81
  src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2
79
82
  src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
80
83
  src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
@@ -127,6 +130,7 @@ tests/fixtures/repos/git_flow/__init__.py
127
130
  tests/fixtures/repos/git_flow/repo_w_2_release_channels.py
128
131
  tests/fixtures/repos/git_flow/repo_w_3_release_channels.py
129
132
  tests/fixtures/repos/github_flow/__init__.py
133
+ tests/fixtures/repos/github_flow/repo_w_default_release.py
130
134
  tests/fixtures/repos/github_flow/repo_w_release_channels.py
131
135
  tests/fixtures/repos/trunk_based_dev/__init__.py
132
136
  tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py
@@ -137,6 +141,7 @@ tests/unit/conftest.py
137
141
  tests/unit/semantic_release/__init__.py
138
142
  tests/unit/semantic_release/test_helpers.py
139
143
  tests/unit/semantic_release/changelog/__init__.py
144
+ tests/unit/semantic_release/changelog/conftest.py
140
145
  tests/unit/semantic_release/changelog/test_changelog_context.py
141
146
  tests/unit/semantic_release/changelog/test_default_changelog.py
142
147
  tests/unit/semantic_release/changelog/test_release_history.py
@@ -26,7 +26,7 @@ sphinx-autobuild==2024.2.4
26
26
  furo~=2024.1
27
27
 
28
28
  [mypy]
29
- mypy==1.11.2
29
+ mypy==1.13.0
30
30
  types-requests~=2.32.0
31
31
 
32
32
  [test]
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.12.2"
27
+ __version__ = "9.14.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -23,6 +23,7 @@ class ReleaseNotesContext:
23
23
  hvcs_type: str
24
24
  version: Version
25
25
  release: Release
26
+ mask_initial_release: bool
26
27
  filters: tuple[Callable[..., Any], ...] = ()
27
28
 
28
29
  def bind_to_environment(self, env: Environment) -> Environment:
@@ -53,6 +54,7 @@ class ChangelogContext:
53
54
  changelog_mode: Literal["update", "init"]
54
55
  prev_changelog_file: str
55
56
  changelog_insertion_flag: str
57
+ mask_initial_release: bool
56
58
  filters: tuple[Callable[..., Any], ...] = ()
57
59
 
58
60
  def bind_to_environment(self, env: Environment) -> Environment:
@@ -69,6 +71,7 @@ def make_changelog_context(
69
71
  mode: ChangelogMode,
70
72
  prev_changelog_file: Path,
71
73
  insertion_flag: str,
74
+ mask_initial_release: bool,
72
75
  ) -> ChangelogContext:
73
76
  return ChangelogContext(
74
77
  repo_name=hvcs_client.repo_name,
@@ -76,6 +79,7 @@ def make_changelog_context(
76
79
  history=release_history,
77
80
  changelog_mode=mode.value,
78
81
  changelog_insertion_flag=insertion_flag,
82
+ mask_initial_release=mask_initial_release,
79
83
  prev_changelog_file=str(prev_changelog_file),
80
84
  hvcs_type=hvcs_client.__class__.__name__.lower(),
81
85
  filters=(
@@ -111,6 +115,11 @@ def convert_md_to_rst(md_content: str) -> str:
111
115
  "bullets": (regexp(r"^(\s*)-(\s)"), r"\1*\2"),
112
116
  # Replace markdown inline raw content with rst inline raw content
113
117
  "raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])"), r"`\1`"),
118
+ # Replace markdown inline link with rst inline link
119
+ "link-inline": (
120
+ regexp(r"(?<=\s)\[([^\]]+)\]\(([^)]+)\)(?=\s|$)"),
121
+ r"`\1 <\2>`_",
122
+ ),
114
123
  }
115
124
 
116
125
  for pattern, replacement in replacements.values():
@@ -178,6 +178,7 @@ def write_changelog_files(
178
178
  mode=runtime_ctx.changelog_mode,
179
179
  insertion_flag=runtime_ctx.changelog_insertion_flag,
180
180
  prev_changelog_file=runtime_ctx.changelog_file,
181
+ mask_initial_release=runtime_ctx.changelog_mask_initial_release,
181
182
  )
182
183
 
183
184
  user_templates = []
@@ -226,6 +227,7 @@ def generate_release_notes(
226
227
  template_dir: Path,
227
228
  history: ReleaseHistory,
228
229
  style: str,
230
+ mask_initial_release: bool,
229
231
  ) -> str:
230
232
  users_tpl_file = template_dir / DEFAULT_RELEASE_NOTES_TPL_FILE
231
233
 
@@ -251,6 +253,7 @@ def generate_release_notes(
251
253
  hvcs_type=hvcs_client.__class__.__name__.lower(),
252
254
  version=release["version"],
253
255
  release=release,
256
+ mask_initial_release=mask_initial_release,
254
257
  filters=(*hvcs_client.get_changelog_context_filters(), autofit_text_width),
255
258
  ).bind_to_environment(
256
259
  # Use a new, non-configurable environment for release notes -
@@ -259,11 +262,9 @@ def generate_release_notes(
259
262
  )
260
263
 
261
264
  # TODO: Remove in v10
262
- release_notes_env.globals["context"] = {
263
- "history": history,
264
- }
265
- release_notes_env.globals["ctx"] = {
265
+ release_notes_env.globals["context"] = release_notes_env.globals["ctx"] = {
266
266
  "history": history,
267
+ "mask_initial_release": mask_initial_release,
267
268
  }
268
269
 
269
270
  return render_release_notes(
@@ -119,6 +119,7 @@ def changelog(cli_ctx: CliContextObj, release_tag: str | None) -> None:
119
119
  runtime.template_dir,
120
120
  release_history,
121
121
  style=runtime.changelog_style,
122
+ mask_initial_release=runtime.changelog_mask_initial_release,
122
123
  )
123
124
 
124
125
  try:
@@ -696,6 +696,7 @@ def version( # noqa: C901
696
696
  runtime.template_dir,
697
697
  history=release_history,
698
698
  style=runtime.changelog_style,
699
+ mask_initial_release=runtime.changelog_mask_initial_release,
699
700
  )
700
701
 
701
702
  exception: Exception | None = None
@@ -123,6 +123,8 @@ class ChangelogEnvironmentConfig(BaseModel):
123
123
  class DefaultChangelogTemplatesConfig(BaseModel):
124
124
  changelog_file: str = "CHANGELOG.md"
125
125
  output_format: ChangelogOutputFormat = ChangelogOutputFormat.NONE
126
+ # TODO: Breaking Change v10, it will become True
127
+ mask_initial_release: bool = False
126
128
 
127
129
  @model_validator(mode="after")
128
130
  def interpret_output_format(self) -> Self:
@@ -511,6 +513,7 @@ class RuntimeContext:
511
513
  version_declarations: Tuple[VersionDeclarationABC, ...]
512
514
  hvcs_client: hvcs.HvcsBase
513
515
  changelog_insertion_flag: str
516
+ changelog_mask_initial_release: bool
514
517
  changelog_mode: ChangelogMode
515
518
  changelog_file: Path
516
519
  changelog_style: str
@@ -795,6 +798,7 @@ class RuntimeContext:
795
798
  hvcs_client=hvcs_client,
796
799
  changelog_file=changelog_file,
797
800
  changelog_mode=raw.changelog.mode,
801
+ changelog_mask_initial_release=raw.changelog.default_templates.mask_initial_release,
798
802
  changelog_insertion_flag=raw.changelog.insertion_flag,
799
803
  assets=raw.assets,
800
804
  commit_author=commit_author,