python-semantic-release 9.16.1__tar.gz → 9.18.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 (213) hide show
  1. {python_semantic_release-9.16.1/src/python_semantic_release.egg-info → python_semantic_release-9.18.0}/PKG-INFO +1 -1
  2. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/automatic-releases/github-actions.rst +7 -7
  3. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/changelog_templates.rst +133 -16
  4. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/commit_parsing.rst +125 -20
  5. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/configuration.rst +5 -57
  6. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/index.rst +1 -0
  7. python_semantic_release-9.18.0/docs/psr_changelog.rst +1 -0
  8. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/pyproject.toml +6 -1
  9. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0/src/python_semantic_release.egg-info}/PKG-INFO +1 -1
  10. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/python_semantic_release.egg-info/SOURCES.txt +3 -0
  11. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/__init__.py +1 -1
  12. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/changelog/context.py +20 -1
  13. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/changelog/release_history.py +100 -56
  14. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/changelog/template.py +0 -1
  15. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/changelog_writer.py +10 -1
  16. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/changelog.py +45 -1
  17. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/version.py +21 -3
  18. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/config.py +25 -3
  19. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/masking_filter.py +1 -1
  20. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/_base.py +1 -1
  21. python_semantic_release-9.18.0/src/semantic_release/commit_parser/angular.py +504 -0
  22. python_semantic_release-9.18.0/src/semantic_release/commit_parser/emoji.py +474 -0
  23. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/scipy.py +7 -7
  24. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/tag.py +3 -1
  25. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/token.py +19 -6
  26. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/util.py +60 -8
  27. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/const.py +2 -0
  28. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +59 -14
  29. python_semantic_release-9.18.0/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +18 -0
  30. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/macros.md.j2 +66 -0
  31. python_semantic_release-9.18.0/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +20 -0
  32. python_semantic_release-9.18.0/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +62 -0
  33. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +68 -23
  34. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2 +2 -0
  35. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +66 -0
  36. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +2 -0
  37. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/helpers.py +90 -2
  38. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/_base.py +1 -1
  39. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/bitbucket.py +15 -0
  40. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/gitea.py +21 -0
  41. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/github.py +21 -0
  42. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/gitlab.py +20 -0
  43. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/version/algorithm.py +48 -13
  44. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/conftest.py +14 -2
  45. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/const.py +5 -1
  46. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_changelog/test_changelog.py +6 -3
  47. python_semantic_release-9.18.0/tests/e2e/cmd_changelog/test_changelog_parsing.py +138 -0
  48. python_semantic_release-9.18.0/tests/e2e/cmd_changelog/test_changelog_release_notes.py +332 -0
  49. python_semantic_release-9.18.0/tests/e2e/cmd_version/test_version_release_notes.py +175 -0
  50. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/example_project.py +5 -1
  51. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/git_repo.py +424 -13
  52. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +2 -1
  53. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/conftest.py +178 -0
  54. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +253 -0
  55. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +447 -0
  56. python_semantic_release-9.18.0/tests/unit/semantic_release/changelog/test_release_notes.py +1048 -0
  57. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/test_config.py +52 -2
  58. python_semantic_release-9.18.0/tests/unit/semantic_release/commit_parser/test_angular.py +1244 -0
  59. python_semantic_release-9.18.0/tests/unit/semantic_release/commit_parser/test_emoji.py +1103 -0
  60. python_semantic_release-9.18.0/tests/unit/semantic_release/commit_parser/test_scipy.py +1141 -0
  61. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test__base.py +2 -5
  62. python_semantic_release-9.18.0/tests/unit/semantic_release/test_helpers.py +297 -0
  63. python_semantic_release-9.16.1/src/semantic_release/commit_parser/angular.py +0 -285
  64. python_semantic_release-9.16.1/src/semantic_release/commit_parser/emoji.py +0 -264
  65. python_semantic_release-9.16.1/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +0 -11
  66. python_semantic_release-9.16.1/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +0 -14
  67. python_semantic_release-9.16.1/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +0 -58
  68. python_semantic_release-9.16.1/tests/e2e/cmd_version/test_version_release_notes.py +0 -78
  69. python_semantic_release-9.16.1/tests/unit/semantic_release/changelog/test_release_notes.py +0 -452
  70. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_angular.py +0 -528
  71. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -420
  72. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -470
  73. python_semantic_release-9.16.1/tests/unit/semantic_release/test_helpers.py +0 -133
  74. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/AUTHORS.rst +0 -0
  75. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/LICENSE +0 -0
  76. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/MANIFEST.in +0 -0
  77. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/README.rst +0 -0
  78. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/Makefile +0 -0
  79. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/algorithm.rst +0 -0
  80. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/automatic-releases/cronjobs.rst +0 -0
  81. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/automatic-releases/index.rst +0 -0
  82. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/automatic-releases/travis.rst +0 -0
  83. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/commands.rst +0 -0
  84. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/conf.py +0 -0
  85. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/contributing.rst +0 -0
  86. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/contributors.rst +0 -0
  87. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/make.bat +0 -0
  88. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/migrating_from_v7.rst +0 -0
  89. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/multibranch_releases.rst +0 -0
  90. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/strict_mode.rst +0 -0
  91. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/docs/troubleshooting.rst +0 -0
  92. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/setup.cfg +0 -0
  93. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/python_semantic_release.egg-info/dependency_links.txt +0 -0
  94. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/python_semantic_release.egg-info/entry_points.txt +0 -0
  95. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/python_semantic_release.egg-info/requires.txt +0 -0
  96. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/python_semantic_release.egg-info/top_level.txt +0 -0
  97. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/__main__.py +0 -0
  98. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/changelog/__init__.py +0 -0
  99. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/__init__.py +0 -0
  100. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/cli_context.py +0 -0
  101. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  102. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  103. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/main.py +0 -0
  104. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/commands/publish.py +0 -0
  105. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/const.py +0 -0
  106. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/github_actions_output.py +0 -0
  107. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/cli/util.py +0 -0
  108. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/commit_parser/__init__.py +0 -0
  109. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
  110. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +0 -0
  111. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +0 -0
  112. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +0 -0
  113. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +0 -0
  114. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
  115. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +0 -0
  116. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +0 -0
  117. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +0 -0
  118. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +0 -0
  119. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/enums.py +0 -0
  120. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/errors.py +0 -0
  121. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/gitproject.py +0 -0
  122. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/globals.py +0 -0
  123. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/__init__.py +0 -0
  124. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  125. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  126. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/hvcs/util.py +0 -0
  127. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/py.typed +0 -0
  128. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/version/__init__.py +0 -0
  129. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/version/declaration.py +0 -0
  130. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/version/translator.py +0 -0
  131. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/src/semantic_release/version/version.py +0 -0
  132. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/__init__.py +0 -0
  133. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/__init__.py +0 -0
  134. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  135. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +0 -0
  136. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_config/__init__.py +0 -0
  137. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  138. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  139. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
  140. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/__init__.py +0 -0
  141. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
  142. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/conftest.py +0 -0
  143. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
  144. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +0 -0
  145. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +0 -0
  146. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +0 -0
  147. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +0 -0
  148. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
  149. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +0 -0
  150. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +0 -0
  151. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
  152. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +0 -0
  153. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +0 -0
  154. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +0 -0
  155. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +0 -0
  156. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version.py +0 -0
  157. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_build.py +0 -0
  158. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
  159. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
  160. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +0 -0
  161. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_github_actions.py +0 -0
  162. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_print.py +0 -0
  163. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
  164. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  165. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/conftest.py +0 -0
  166. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/test_help.py +0 -0
  167. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/e2e/test_main.py +0 -0
  168. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/__init__.py +0 -0
  169. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/commit_parsers.py +0 -0
  170. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/__init__.py +0 -0
  171. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  172. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +0 -0
  173. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  174. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  175. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +0 -0
  176. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  177. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  178. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/repo_initial_commit.py +0 -0
  179. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  180. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +0 -0
  181. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +0 -0
  182. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
  183. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  184. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
  185. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/fixtures/scipy.py +0 -0
  186. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/__init__.py +0 -0
  187. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/conftest.py +0 -0
  188. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/__init__.py +0 -0
  189. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  190. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  191. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  192. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  193. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
  194. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  195. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  196. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
  197. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  198. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  199. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  200. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  201. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  202. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  203. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  204. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  205. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  206. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  207. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  208. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/version/__init__.py +0 -0
  209. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  210. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  211. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  212. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/unit/semantic_release/version/test_version.py +0 -0
  213. {python_semantic_release-9.16.1 → python_semantic_release-9.18.0}/tests/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.16.1
3
+ Version: 9.18.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -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.16.0
340
+ - uses: python-semantic-release/python-semantic-release@v9.17.0
341
341
  with:
342
342
  root_options: "-vv --noop"
343
343
 
@@ -576,7 +576,7 @@ before the :ref:`publish <cmd-publish>` subcommand.
576
576
 
577
577
  .. code:: yaml
578
578
 
579
- - uses: python-semantic-release/publish-action@v9.16.0
579
+ - uses: python-semantic-release/publish-action@v9.17.0
580
580
  with:
581
581
  root_options: "-vv --noop"
582
582
 
@@ -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.16.0
687
+ uses: python-semantic-release/python-semantic-release@v9.17.0
688
688
  with:
689
689
  github_token: ${{ secrets.GITHUB_TOKEN }}
690
690
  git_committer_name: "github-actions"
@@ -695,7 +695,7 @@ to the GitHub Release Assets as well.
695
695
  if: steps.release.outputs.released == 'true'
696
696
 
697
697
  - name: Publish | Upload to GitHub Release Assets
698
- uses: python-semantic-release/publish-action@v9.16.0
698
+ uses: python-semantic-release/publish-action@v9.17.0
699
699
  if: steps.release.outputs.released == 'true'
700
700
  with:
701
701
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -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.16.0
747
+ uses: python-semantic-release/python-semantic-release@v9.17.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.16.0
775
+ uses: python-semantic-release/python-semantic-release@v9.17.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.16.0
781
+ uses: python-semantic-release/python-semantic-release@v9.17.0
782
782
  with:
783
783
  directory: ./project2
784
784
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -246,6 +246,11 @@ Configuration Examples
246
246
  '''Merged? .*''',
247
247
  ]
248
248
 
249
+ If identified or supported by the parser, the default changelog templates will include
250
+ a separate section of breaking changes and additional release information. Refer to the
251
+ :ref:`commit parsing <commit-parsing>` section to see how to write commit messages that
252
+ will be properly parsed and displayed in these sections.
253
+
249
254
 
250
255
  .. _changelog-templates-default_release_notes:
251
256
 
@@ -260,16 +265,37 @@ default built-in template out-of-the-box for generating release notes.
260
265
 
261
266
  The difference between the changelog and release notes is that the release notes
262
267
  only contain the changes for the current release. Due to the modularity of the
263
- PSR templates, the format is identical to an individual version of the default
264
- changelog.
268
+ PSR templates, the format is similar to an individual version of the default
269
+ changelog but may include other version specific information.
265
270
 
266
271
  At this time, the default template for version release notes is only available
267
272
  in Markdown format for all VCS types.
268
273
 
274
+ If you want to review what the default release notes look like you can use the
275
+ following command to print the release notes to the console (remove any configuration
276
+ for defining a custom template directory):
277
+
278
+ .. code:: console
279
+
280
+ # Create a current tag
281
+ git tag v1.0.0
282
+ semantic-release --noop changelog --post-to-release-tag v1.0.0
283
+
284
+ The default template provided by PSR will respect the
285
+ :ref:`<config-changelog-default_templates-mask_initial_release>` setting and
286
+ will also add a comparison link to the previous release if one exists without
287
+ customization.
288
+
289
+ As of ``${NEW_RELEASE_TAG}``, the default release notes will also include a statement to
290
+ declare which license the project was released under. PSR determines which license
291
+ to declare based on the value of ``project.license-expression`` in the ``pyproject.toml``
292
+ file as defined in the `PEP 639`_ specification.
293
+
269
294
  .. seealso::
270
295
  - To personalize your release notes, see the
271
296
  :ref:`changelog-templates-custom_release_notes` section.
272
297
 
298
+ .. _PEP 639: https://peps.python.org/pep-0639/
273
299
 
274
300
  .. _changelog-templates-template-rendering:
275
301
 
@@ -658,6 +684,45 @@ The filters provided vary based on the VCS configured and available features:
658
684
  )
659
685
  }}
660
686
 
687
+ * ``create_pypi_url(package_name: str, version: str = "")``: given a package name and an optional
688
+ version, return a URL to the PyPI page for the package. If a version is provided, the URL will
689
+ point to the specific version page. If no version is provided, the URL will point to the package
690
+ page.
691
+
692
+ *Introduced in ${NEW_RELEASE_TAG}.*
693
+
694
+ **Example Usage:**
695
+
696
+ .. code:: jinja
697
+
698
+ {{ "example-package" | create_pypi_url }}
699
+ {{ "example-package" | create_pypi_url("1.0.0") }}
700
+
701
+ **Markdown Output:**
702
+
703
+ .. code:: markdown
704
+
705
+ https://pypi.org/project/example-package
706
+ https://pypi.org/project/example-package/1.0.0
707
+
708
+ * ``create_release_url (Callable[[TagStr], UrlStr])``: given a tag, return a URL to the release
709
+ page on the remote vcs. This filter is useful when you want to link to the release page on the
710
+ remote vcs.
711
+
712
+ *Introduced in ${NEW_RELEASE_TAG}.*
713
+
714
+ **Example Usage:**
715
+
716
+ .. code:: jinja
717
+
718
+ {{ "v1.0.0" | create_release_url }}
719
+
720
+ **Markdown Output:**
721
+
722
+ .. code:: markdown
723
+
724
+ https://example.com/example/repo/releases/tag/v1.0.0
725
+
661
726
  * ``create_server_url (Callable[[PathStr, AuthStr | None, QueryStr | None, FragmentStr | None], UrlStr])``:
662
727
  when given a path, prepend the configured vcs server host and url scheme. Optionally you
663
728
  can provide, a auth string, a query string or a url fragment to be normalized into the
@@ -817,6 +882,29 @@ The filters provided vary based on the VCS configured and available features:
817
882
 
818
883
  [#29](https://example.com/example/repo/pull/29)
819
884
 
885
+ * ``format_w_official_vcs_name (Callable[[str], str])``: given a format string, insert
886
+ the official VCS type name into the string and return. This filter is useful when you want to
887
+ display the proper name of the VCS type in a changelog or release notes. The filter supports
888
+ three different replace formats: ``%s``, ``{}``, and ``{vcs_name}``.
889
+
890
+ *Introduced in ${NEW_RELEASE_TAG}.*
891
+
892
+ **Example Usage:**
893
+
894
+ .. code:: jinja
895
+
896
+ {{ "%s Releases" | format_w_official_vcs_name }}
897
+ {{ "{} Releases" | format_w_official_vcs_name }}
898
+ {{ "{vcs_name} Releases" | format_w_official_vcs_name }}
899
+
900
+ **Markdown Output:**
901
+
902
+ .. code:: markdown
903
+
904
+ GitHub Releases
905
+ GitHub Releases
906
+ GitHub Releases
907
+
820
908
  * ``read_file (Callable[[str], str])``: given a file path, read the file and
821
909
  return the contents as a string. This function was added specifically to
822
910
  enable the changelog update feature where it would load the existing changelog
@@ -831,22 +919,51 @@ The filters provided vary based on the VCS configured and available features:
831
919
  {% set prev_changelog_contents = prev_changelog_file | read_file | safe %}
832
920
 
833
921
 
922
+ * ``sort_numerically (Callable[[Iterable[str], bool], list[str]])``: given a
923
+ sequence of strings with possibly some non-number characters as a prefix or suffix,
924
+ sort the strings as if they were just numbers from lowest to highest. This filter
925
+ is useful when you want to sort issue numbers or other strings that have a numeric
926
+ component in them but cannot be cast to a number directly to sort them. If you want
927
+ to sort the strings in reverse order, you can pass a boolean value of ``True`` as the
928
+ second argument.
929
+
930
+ *Introduced in v9.16.0.*
931
+
932
+ **Example Usage:**
933
+
934
+ .. code:: jinja
935
+
936
+ {{ ["#222", "#1023", "#444"] | sort_numerically }}
937
+ {{ ["#222", "#1023", "#444"] | sort_numerically(True) }}
938
+
939
+ **Markdown Output:**
940
+
941
+ .. code:: markdown
942
+
943
+ ['#222', '#444', '#1023']
944
+ ['#1023', '#444', '#222']
945
+
946
+
834
947
  Availability of the documented filters can be found in the table below:
835
948
 
836
- ====================== ========= ===== ====== ======
837
- **filter - hvcs_type** bitbucket gitea github gitlab
838
- ====================== ========= ===== ====== ======
839
- autofit_text_width ✅ ✅ ✅ ✅
840
- convert_md_to_rst ✅ ✅ ✅ ✅
841
- create_server_url ✅ ✅ ✅ ✅
842
- create_repo_url ✅ ✅ ✅ ✅
843
- commit_hash_url ✅ ✅ ✅ ✅
844
- compare_url ✅ ✅
845
- issue_url ❌ ✅ ✅ ✅
846
- merge_request_url ❌
847
- pull_request_url ✅ ✅ ✅ ✅
848
- read_file ✅ ✅ ✅ ✅
849
- ====================== ========= ===== ====== ======
949
+ ========================== ========= ===== ====== ======
950
+ **filter - hvcs_type** bitbucket gitea github gitlab
951
+ ========================== ========= ===== ====== ======
952
+ autofit_text_width ✅ ✅ ✅ ✅
953
+ convert_md_to_rst ✅ ✅ ✅ ✅
954
+ create_pypi_url ✅ ✅ ✅ ✅
955
+ create_server_url ✅ ✅ ✅ ✅
956
+ create_release_url ❌ ✅ ✅ ✅
957
+ create_repo_url ✅ ✅
958
+ commit_hash_url ✅ ✅ ✅ ✅
959
+ compare_url ✅
960
+ format_w_official_vcs_name ✅ ✅ ✅ ✅
961
+ issue_url ❌ ✅ ✅ ✅
962
+ merge_request_url ❌ ❌ ❌ ✅
963
+ pull_request_url ✅ ✅ ✅ ✅
964
+ read_file ✅ ✅ ✅ ✅
965
+ sort_numerically ✅ ✅ ✅ ✅
966
+ ========================== ========= ===== ====== ======
850
967
 
851
968
  .. seealso::
852
969
  * `Filters <https://jinja.palletsprojects.com/en/3.1.x/templates/#filters>`_
@@ -108,13 +108,19 @@ logic in relation to how PSR's core features:
108
108
  message. If no issue numbers are found, the parser will return an empty tuple. *Feature
109
109
  available in v9.15.0+.*
110
110
 
111
- **Limitations:**
111
+ - **Squash Commit Evaluation**: This parser implements PSR's
112
+ :ref:`commit_parser-builtin-squash_commit_evaluation` to identify and extract each commit
113
+ message as a separate commit message within a single squashed commit. You can toggle this
114
+ feature on/off via the :ref:`config-commit_parser_options` setting. *Feature available in
115
+ v9.17.0+.*
112
116
 
113
- - Squash commits are not currently supported. This means that the level bump for a squash
114
- commit is only determined by the subject line of the squash commit. Our default changelog
115
- template currently writes out the entire commit message body in the changelog in order to
116
- provide the full detail of the changes. Track the implementation of this feature with
117
- the issues `#733`_, `#1085`_, and `PR#1112`_.
117
+ - **Release Notice Footer Detection**: This parser implements PSR's
118
+ :ref:`commit_parser-builtin-release_notice_footer_detection`, which is a custom extension
119
+ to traditional `Angular Commit Style Guidelines`_ to use the ``NOTICE`` keyword as a git
120
+ footer to document additional release information that is not considered a breaking change.
121
+ *Feature available in ${NEW_RELEASE_TAG}+.*
122
+
123
+ **Limitations**:
118
124
 
119
125
  - Commits with the ``revert`` type are not currently supported. Track the implementation
120
126
  of this feature in the issue `#402`_.
@@ -179,6 +185,17 @@ how PSR's core features:
179
185
  enabled by setting the configuration option ``commit_parser_options.parse_linked_issues``
180
186
  to ``true``. *Feature available in v9.15.0+.*
181
187
 
188
+ - **Squash Commit Evaluation**: This parser implements PSR's
189
+ :ref:`commit_parser-builtin-squash_commit_evaluation` to identify and extract each commit
190
+ message as a separate commit message within a single squashed commit. You can toggle this
191
+ feature on/off via the :ref:`config-commit_parser_options` setting. *Feature available in
192
+ v9.17.0+.*
193
+
194
+ - **Release Notice Footer Detection**: This parser implements PSR's
195
+ :ref:`commit_parser-builtin-release_notice_footer_detection`, which is a custom extension
196
+ that uses the ``NOTICE`` keyword as a git footer to document additional release information
197
+ that is not considered a breaking change. *Feature available in ${NEW_RELEASE_TAG}+.*
198
+
182
199
  If no commit parser options are provided via the configuration, the parser will use PSR's
183
200
  built-in :py:class:`defaults <semantic_release.commit_parser.emoji.EmojiParserOptions>`.
184
201
 
@@ -304,6 +321,99 @@ return an empty tuple.
304
321
 
305
322
  ----
306
323
 
324
+ .. _commit_parser-builtin-release_notice_footer_detection:
325
+
326
+ Common Release Notice Footer Detection
327
+ """"""""""""""""""""""""""""""""""""""
328
+
329
+ *Introduced in ${NEW_RELEASE_TAG}**
330
+
331
+ All of the PSR built-in parsers implement common release notice footer detection logic
332
+ to identify and extract a ``NOTICE`` git trailer that documents any additional release
333
+ information the developer wants to provide to the software consumer. The idea extends
334
+ from the concept of the ``BREAKING CHANGE:`` git trailer to document any breaking change
335
+ descriptions but the ``NOTICE`` trailer is intended to document any information that is
336
+ below the threshold of a breaking change while still important for the software consumer
337
+ to be aware of. Common uses would be to provide deprecation warnings or more detailed
338
+ change usage information for that release. Parsers will collapse single newlines after
339
+ the ``NOTICE`` trailer into a single line paragraph. Commits may have more than one
340
+ ``NOTICE`` trailer in a single commit message. Each
341
+ :py:class:`ParsedCommit <semantic_release.commit_parser.token.ParsedCommit>` will have
342
+ a ``release_notices`` attribute that is a tuple of string paragraphs to identify each
343
+ release notice.
344
+
345
+ In the default changelog and release notes template, these release notices will be
346
+ formatted into their own section called **ADDITIONAL RELEASE INFORMATION**. Each will
347
+ include any commit scope defined and each release notice in alphabetical order.
348
+
349
+ ----
350
+
351
+ .. _commit_parser-builtin-squash_commit_evaluation:
352
+
353
+ Common Squash Commit Evaluation
354
+ """""""""""""""""""""""""""""""
355
+
356
+ *Introduced in v9.17.0*
357
+
358
+ All of the PSR built-in parsers implement common squash commit evaluation logic to identify
359
+ and extract individual commit messages from a single squashed commit. The parsers will
360
+ look for common squash commit delimiters and multiple matches of the commit message
361
+ format to identify each individual commit message that was squashed. The parsers will
362
+ return a list containing each commit message as a separate commit object. Squashed commits
363
+ will be evaluated individually for both the level bump and changelog generation. If no
364
+ squash commits are found, a list with the single commit object will be returned.
365
+
366
+ Currently, PSR has been tested against GitHub, BitBucket, and official ``git`` squash
367
+ merge commmit messages. GitLab does not have a default template for squash commit messages
368
+ but can be customized per project or server. If you are using GitLab, you will need to
369
+ ensure that the squash commit message format is similar to the example below.
370
+
371
+ **Example**:
372
+
373
+ *The following example will extract three separate commit messages from a single GitHub
374
+ formatted squash commit message of conventional commit style:*
375
+
376
+ .. code-block:: text
377
+
378
+ feat(config): add new config option (#123)
379
+
380
+ * refactor(config): change the implementation of config loading
381
+
382
+ * docs(configuration): defined new config option for the project
383
+
384
+ When parsed with the default angular parser with squash commits toggled on, the version
385
+ bump will be determined by the highest level bump of the three commits (in this case, a
386
+ minor bump because of the feature commit) and the release notes would look similar to
387
+ the following:
388
+
389
+ .. code-block:: markdown
390
+
391
+ ## Features
392
+
393
+ - **config**: add new config option (#123)
394
+
395
+ ## Documentation
396
+
397
+ - **configuration**: defined new config option for the project (#123)
398
+
399
+ ## Refactoring
400
+
401
+ - **config**: change the implementation of config loading (#123)
402
+
403
+ Merge request numbers and commit hash values will be the same across all extracted
404
+ commits. Additionally, any :ref:`config-changelog-exclude_commit_patterns` will be
405
+ applied individually to each extracted commit so if you are have an exclusion match
406
+ for ignoring ``refactor`` commits, the second commit in the example above would be
407
+ excluded from the changelog.
408
+
409
+ .. important::
410
+ When squash commit evaluation is enabled, if you squashed a higher level bump commit
411
+ into the body of a lower level bump commit, the higher level bump commit will be
412
+ evaluated as the level bump for the entire squashed commit. This includes breaking
413
+ change descriptions.
414
+
415
+ ----
416
+
307
417
  .. _commit_parser-builtin-customization:
308
418
 
309
419
  Customization
@@ -429,28 +539,23 @@ available.
429
539
  .. _catching exceptions in Python is slower: https://docs.python.org/3/faq/design.html#how-fast-are-exceptions
430
540
  .. _namedtuple: https://docs.python.org/3/library/typing.html#typing.NamedTuple
431
541
 
432
- .. _commit-parsing-parser-options:
542
+ .. _commit_parser-parser-options:
433
543
 
434
544
  Parser Options
435
545
  """"""""""""""
436
546
 
437
- To provide options to the commit parser which is configured in the :ref:`configuration file
438
- <configuration>`, Python Semantic Release includes a
439
- :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>`
440
- class. Each parser built into Python Semantic Release has a corresponding "options" class, which
441
- subclasses :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>`.
442
-
443
- The configuration in :ref:`commit_parser_options <config-commit_parser_options>` is passed to the
444
- "options" class which is specified by the configured :ref:`commit_parser <config-commit_parser>` -
445
- more information on how this is specified is below.
547
+ When writing your own parser, you should accompany the parser with an "options" class
548
+ which accepts the appropriate keyword arguments. This class' ``__init__`` method should
549
+ store the values that are needed for parsing appropriately. Python Semantic Release will
550
+ pass any configuration options from the configuration file's
551
+ :ref:`commit_parser_options <config-commit_parser_options>`, into your custom parser options
552
+ class. To ensure that the configuration options are passed correctly, the options class
553
+ should inherit from the
554
+ :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>` class.
446
555
 
447
556
  The "options" class is used to validate the options which are configured in the repository,
448
557
  and to provide default values for these options where appropriate.
449
558
 
450
- If you are writing your own parser, you should accompany it with an "options" class
451
- which accepts the appropriate keyword arguments. This class' ``__init__`` method should
452
- store the values that are needed for parsing appropriately.
453
-
454
559
  .. _commit-parsing-commit-parsers:
455
560
 
456
561
  Commit Parsers
@@ -811,66 +811,14 @@ For more information see :ref:`commit-parsing`.
811
811
 
812
812
  **Type:** ``dict[str, Any]``
813
813
 
814
- These options are passed directly to the ``parser_options`` method of
815
- :ref:`the commit parser <config-commit_parser>`, without validation
816
- or transformation.
814
+ This set of options are passed directly to the commit parser class specified in
815
+ :ref:`the commit parser <config-commit_parser>` configuration option.
817
816
 
818
- For more information, see :ref:`commit-parsing-parser-options`.
819
-
820
- The default value for this setting depends on what you specify as
821
- :ref:`commit_parser <config-commit_parser>`. The table below outlines
822
- the expections from ``commit_parser`` value to default options value.
823
-
824
- ================== == =================================
825
- ``commit_parser`` Default ``commit_parser_options``
826
- ================== == =================================
827
- ``"angular"`` -> .. code-block:: toml
828
-
829
- [semantic_release.commit_parser_options]
830
- allowed_types = [
831
- "build", "chore", "ci", "docs", "feat", "fix",
832
- "perf", "style", "refactor", "test"
833
- ]
834
- minor_types = ["feat"]
835
- patch_types = ["fix", "perf"]
836
-
837
- ``"emoji"`` -> .. code-block:: toml
838
-
839
- [semantic_release.commit_parser_options]
840
- major_tags = [":boom:"]
841
- minor_tags = [
842
- ":sparkles:", ":children_crossing:", ":lipstick:",
843
- ":iphone:", ":egg:", ":chart_with_upwards_trend:"
844
- ]
845
- patch_tags = [
846
- ":ambulance:", ":lock:", ":bug:", ":zap:", ":goal_net:",
847
- ":alien:", ":wheelchair:", ":speech_balloon:", ":mag:",
848
- ":apple:", ":penguin:", ":checkered_flag:", ":robot:",
849
- ":green_apple:"
850
- ]
851
-
852
- ``"scipy"`` -> .. code-block:: toml
853
-
854
- [semantic_release.commit_parser_options]
855
- allowed_tags = [
856
- "API", "DEP", "ENH", "REV", "BUG", "MAINT", "BENCH",
857
- "BLD", "DEV", "DOC", "STY", "TST", "REL", "FEAT", "TEST",
858
- ]
859
- major_tags = ["API",]
860
- minor_tags = ["DEP", "DEV", "ENH", "REV", "FEAT"]
861
- patch_tags = ["BLD", "BUG", "MAINT"]
862
-
863
- ``"tag"`` -> .. code-block:: toml
864
-
865
- [semantic_release.commit_parser_options]
866
- minor_tag = ":sparkles:"
867
- patch_tag = ":nut_and_bolt:"
868
-
869
- ``"module:class"`` -> ``**module:class.parser_options()``
870
- ================== == =================================
817
+ For more information (to include defaults), see
818
+ :ref:`commit_parser-builtin-customization`.
871
819
 
872
820
  **Default:** ``ParserOptions { ... }``, where ``...`` depends on
873
- :ref:`config-commit_parser` as indicated above.
821
+ :ref:`commit_parser <config-commit_parser>`.
874
822
 
875
823
  ----
876
824
 
@@ -69,6 +69,7 @@ Documentation Contents
69
69
  Migrating from Python Semantic Release v7 <migrating_from_v7>
70
70
  Internal API <api/modules>
71
71
  Algorithm <algorithm>
72
+ Changelog <psr_changelog>
72
73
  View on GitHub <https://github.com/python-semantic-release/python-semantic-release>
73
74
 
74
75
  Getting Started
@@ -0,0 +1 @@
1
+ .. include:: ../CHANGELOG.rst
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.16.1"
9
+ version = "9.18.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -399,6 +399,7 @@ ignore_names = ["change_to_ex_proj_dir", "init_example_project"]
399
399
  [tool.semantic_release]
400
400
  logging_use_named_masks = true
401
401
  commit_parser = "angular"
402
+ commit_parser_options = { parse_squash_commits = true, ignore_merge_commits = true }
402
403
  build_command = """
403
404
  python -m pip install -e .[build]
404
405
  python -m build .
@@ -408,6 +409,7 @@ version_variables = ["src/semantic_release/__init__.py:__version__"]
408
409
  version_toml = ["pyproject.toml:project.version"]
409
410
 
410
411
  [tool.semantic_release.changelog]
412
+ # default_templates = { changelog_file = "CHANGELOG.rst" }
411
413
  exclude_commit_patterns = [
412
414
  '''chore(?:\([^)]*?\))?: .+''',
413
415
  '''ci(?:\([^)]*?\))?: .+''',
@@ -420,6 +422,9 @@ exclude_commit_patterns = [
420
422
  # Old semantic-release version commits
421
423
  '''^\d+\.\d+\.\d+''',
422
424
  ]
425
+ insertion_flag = "=========\nCHANGELOG\n========="
426
+ mode = "update"
427
+ template_dir = "config/release-templates"
423
428
 
424
429
  [tool.semantic_release.branches.main]
425
430
  match = "(main|master)"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.16.1
3
+ Version: 9.18.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -16,6 +16,7 @@ docs/index.rst
16
16
  docs/make.bat
17
17
  docs/migrating_from_v7.rst
18
18
  docs/multibranch_releases.rst
19
+ docs/psr_changelog.rst
19
20
  docs/strict_mode.rst
20
21
  docs/troubleshooting.rst
21
22
  docs/automatic-releases/cronjobs.rst
@@ -107,6 +108,8 @@ tests/e2e/test_main.py
107
108
  tests/e2e/cmd_changelog/__init__.py
108
109
  tests/e2e/cmd_changelog/test_changelog.py
109
110
  tests/e2e/cmd_changelog/test_changelog_custom_parser.py
111
+ tests/e2e/cmd_changelog/test_changelog_parsing.py
112
+ tests/e2e/cmd_changelog/test_changelog_release_notes.py
110
113
  tests/e2e/cmd_config/__init__.py
111
114
  tests/e2e/cmd_config/test_generate_config.py
112
115
  tests/e2e/cmd_publish/__init__.py
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.16.1"
27
+ __version__ = "9.18.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -4,10 +4,15 @@ import logging
4
4
  import os
5
5
  from dataclasses import dataclass
6
6
  from enum import Enum
7
- from pathlib import Path
7
+ from pathlib import Path, PurePosixPath
8
8
  from re import compile as regexp
9
9
  from typing import TYPE_CHECKING, Any, Callable, Literal
10
10
 
11
+ from urllib3.util import Url
12
+
13
+ from semantic_release.const import PYPI_WEB_DOMAIN
14
+ from semantic_release.helpers import sort_numerically
15
+
11
16
  if TYPE_CHECKING: # pragma: no cover
12
17
  from jinja2 import Environment
13
18
 
@@ -24,6 +29,7 @@ class ReleaseNotesContext:
24
29
  version: Version
25
30
  release: Release
26
31
  mask_initial_release: bool
32
+ license_name: str
27
33
  filters: tuple[Callable[..., Any], ...] = ()
28
34
 
29
35
  def bind_to_environment(self, env: Environment) -> Environment:
@@ -84,13 +90,26 @@ def make_changelog_context(
84
90
  hvcs_type=hvcs_client.__class__.__name__.lower(),
85
91
  filters=(
86
92
  *hvcs_client.get_changelog_context_filters(),
93
+ create_pypi_url,
87
94
  read_file,
88
95
  convert_md_to_rst,
89
96
  autofit_text_width,
97
+ sort_numerically,
90
98
  ),
91
99
  )
92
100
 
93
101
 
102
+ def create_pypi_url(package_name: str, version: str = "") -> str:
103
+ project_name = package_name.strip("/").strip()
104
+ if not project_name:
105
+ raise ValueError("package_name must not be empty!")
106
+ return Url(
107
+ scheme="https",
108
+ host=PYPI_WEB_DOMAIN,
109
+ path=str(PurePosixPath("project", project_name, version.strip("/").strip())),
110
+ ).url.rstrip("/")
111
+
112
+
94
113
  def read_file(filepath: str) -> str:
95
114
  try:
96
115
  if not filepath: