python-semantic-release 9.15.2__tar.gz → 9.16.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 (201) hide show
  1. {python_semantic_release-9.15.2/src/python_semantic_release.egg-info → python_semantic_release-9.16.0}/PKG-INFO +2 -2
  2. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/automatic-releases/github-actions.rst +5 -5
  3. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/commit_parsing.rst +34 -13
  4. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/configuration.rst +1 -1
  5. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/pyproject.toml +2 -2
  6. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0/src/python_semantic_release.egg-info}/PKG-INFO +2 -2
  7. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/python_semantic_release.egg-info/SOURCES.txt +1 -0
  8. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/python_semantic_release.egg-info/requires.txt +1 -1
  9. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/__init__.py +1 -1
  10. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/version.py +16 -8
  11. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/config.py +38 -9
  12. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/helpers.py +41 -4
  13. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/version/algorithm.py +1 -0
  14. python_semantic_release-9.16.0/tests/e2e/cmd_version/bump_version/conftest.py +60 -0
  15. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +4 -7
  16. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +4 -7
  17. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +4 -7
  18. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +4 -7
  19. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +4 -7
  20. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +4 -7
  21. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +4 -7
  22. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +4 -7
  23. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +4 -7
  24. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +4 -7
  25. python_semantic_release-9.16.0/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +218 -0
  26. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_print.py +425 -9
  27. python_semantic_release-9.16.0/tests/e2e/conftest.py +191 -0
  28. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/example_project.py +2 -12
  29. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/git_repo.py +30 -3
  30. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +44 -0
  31. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +39 -0
  32. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/test_config.py +86 -6
  33. python_semantic_release-9.15.2/tests/e2e/cmd_version/bump_version/conftest.py +0 -135
  34. python_semantic_release-9.15.2/tests/e2e/conftest.py +0 -107
  35. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/AUTHORS.rst +0 -0
  36. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/LICENSE +0 -0
  37. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/MANIFEST.in +0 -0
  38. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/README.rst +0 -0
  39. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/Makefile +0 -0
  40. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/algorithm.rst +0 -0
  41. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/automatic-releases/cronjobs.rst +0 -0
  42. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/automatic-releases/index.rst +0 -0
  43. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/automatic-releases/travis.rst +0 -0
  44. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/changelog_templates.rst +0 -0
  45. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/commands.rst +0 -0
  46. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/conf.py +0 -0
  47. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/contributing.rst +0 -0
  48. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/contributors.rst +0 -0
  49. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/index.rst +0 -0
  50. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/make.bat +0 -0
  51. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/migrating_from_v7.rst +0 -0
  52. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/multibranch_releases.rst +0 -0
  53. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/strict_mode.rst +0 -0
  54. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/docs/troubleshooting.rst +0 -0
  55. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/setup.cfg +0 -0
  56. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/python_semantic_release.egg-info/dependency_links.txt +0 -0
  57. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/python_semantic_release.egg-info/entry_points.txt +0 -0
  58. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/python_semantic_release.egg-info/top_level.txt +0 -0
  59. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/__main__.py +0 -0
  60. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/changelog/__init__.py +0 -0
  61. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/changelog/context.py +0 -0
  62. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/changelog/release_history.py +0 -0
  63. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/changelog/template.py +0 -0
  64. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/__init__.py +0 -0
  65. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/changelog_writer.py +0 -0
  66. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/cli_context.py +0 -0
  67. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  68. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/changelog.py +0 -0
  69. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  70. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/main.py +0 -0
  71. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/commands/publish.py +0 -0
  72. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/const.py +0 -0
  73. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/github_actions_output.py +0 -0
  74. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/masking_filter.py +0 -0
  75. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/cli/util.py +0 -0
  76. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/__init__.py +0 -0
  77. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/_base.py +0 -0
  78. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/angular.py +0 -0
  79. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/emoji.py +0 -0
  80. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/scipy.py +0 -0
  81. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/tag.py +0 -0
  82. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/token.py +0 -0
  83. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/commit_parser/util.py +0 -0
  84. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/const.py +0 -0
  85. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
  86. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +0 -0
  87. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +0 -0
  88. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +0 -0
  89. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +0 -0
  90. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/macros.md.j2 +0 -0
  91. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +0 -0
  92. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +0 -0
  93. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +0 -0
  94. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +0 -0
  95. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
  96. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +0 -0
  97. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +0 -0
  98. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +0 -0
  99. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2 +0 -0
  100. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +0 -0
  101. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +0 -0
  102. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +0 -0
  103. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +0 -0
  104. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/enums.py +0 -0
  105. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/errors.py +0 -0
  106. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/gitproject.py +0 -0
  107. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/globals.py +0 -0
  108. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/__init__.py +0 -0
  109. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/_base.py +0 -0
  110. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
  111. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/gitea.py +0 -0
  112. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/github.py +0 -0
  113. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/gitlab.py +0 -0
  114. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  115. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  116. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/hvcs/util.py +0 -0
  117. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/py.typed +0 -0
  118. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/version/__init__.py +0 -0
  119. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/version/declaration.py +0 -0
  120. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/version/translator.py +0 -0
  121. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/src/semantic_release/version/version.py +0 -0
  122. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/__init__.py +0 -0
  123. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/conftest.py +0 -0
  124. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/const.py +0 -0
  125. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/__init__.py +0 -0
  126. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  127. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_changelog/test_changelog.py +0 -0
  128. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +0 -0
  129. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_config/__init__.py +0 -0
  130. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  131. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  132. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
  133. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/__init__.py +0 -0
  134. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
  135. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
  136. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
  137. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
  138. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version.py +0 -0
  139. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_build.py +0 -0
  140. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
  141. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
  142. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_github_actions.py +0 -0
  143. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
  144. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
  145. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  146. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/test_help.py +0 -0
  147. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/e2e/test_main.py +0 -0
  148. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/__init__.py +0 -0
  149. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/commit_parsers.py +0 -0
  150. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/__init__.py +0 -0
  151. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  152. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +0 -0
  153. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  154. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  155. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +0 -0
  156. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  157. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +0 -0
  158. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  159. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/repo_initial_commit.py +0 -0
  160. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  161. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +0 -0
  162. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +0 -0
  163. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  164. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/fixtures/scipy.py +0 -0
  165. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/__init__.py +0 -0
  166. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/conftest.py +0 -0
  167. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/__init__.py +0 -0
  168. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  169. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
  170. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
  171. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  172. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  173. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  174. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  175. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  176. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
  177. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  178. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  179. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
  180. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  181. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  182. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
  183. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  184. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  185. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  186. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  187. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  188. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  189. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  190. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  191. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  192. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  193. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  194. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  195. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/test_helpers.py +0 -0
  196. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/version/__init__.py +0 -0
  197. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  198. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  199. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  200. {python_semantic_release-9.15.2 → python_semantic_release-9.16.0}/tests/unit/semantic_release/version/test_version.py +0 -0
  201. {python_semantic_release-9.15.2 → python_semantic_release-9.16.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.15.2
3
+ Version: 9.16.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -62,7 +62,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
62
62
  Requires-Dist: tox~=4.11; extra == "dev"
63
63
  Requires-Dist: ruff==0.6.1; extra == "dev"
64
64
  Provides-Extra: mypy
65
- Requires-Dist: mypy==1.13.0; extra == "mypy"
65
+ Requires-Dist: mypy==1.14.1; extra == "mypy"
66
66
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
67
67
  Requires-Dist: types-pyyaml~=6.0; extra == "mypy"
68
68
 
@@ -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.15.2
340
+ - uses: python-semantic-release/python-semantic-release@v9.16.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.15.2
687
+ uses: python-semantic-release/python-semantic-release@v9.16.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.15.2
747
+ uses: python-semantic-release/python-semantic-release@v9.16.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.15.2
775
+ uses: python-semantic-release/python-semantic-release@v9.16.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.15.2
781
+ uses: python-semantic-release/python-semantic-release@v9.16.0
782
782
  with:
783
783
  directory: ./project2
784
784
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -334,19 +334,40 @@ where appropriate to assist with static type-checking.
334
334
 
335
335
  The :ref:`commit_parser <config-commit_parser>` option, if set to a string which
336
336
  does not match one of Python Semantic Release's built-in commit parsers, will be
337
- used to attempt to dynamically import a custom commit parser class. As such you will
338
- need to ensure that your custom commit parser is import-able from the environment in
339
- which you are running Python Semantic Release. The string should be structured in the
340
- standard ``module:attr`` format; for example, to import the class ``MyCommitParser``
341
- from the file ``custom_parser.py`` at the root of your repository, you should specify
342
- ``"commit_parser=custom_parser:MyCommitParser"`` in your configuration, and run the
343
- ``semantic-release`` command line interface from the root of your repository. Equally
344
- you can ensure that the module containing your parser class is installed in the same
345
- virtual environment as semantic-release. If you can run
346
- ``python -c "from $MODULE import $CLASS"`` successfully, specifying
347
- ``commit_parser="$MODULE:$CLASS"`` is sufficient. You may need to set the
348
- ``PYTHONPATH`` environment variable to the directory containing the module with
349
- your commit parser.
337
+ used to attempt to dynamically import a custom commit parser class.
338
+
339
+ In order to use your custom parser, you must provide how to import the module and class
340
+ via the configuration option. There are two ways to provide the import string:
341
+
342
+ 1. **File Path & Class**: The format is ``"path/to/module_file.py:ClassName"``. This
343
+ is the easiest way to provide a custom parser. This method allows you to store your
344
+ custom parser directly in the repository with no additional installation steps. PSR
345
+ will locate the file, load the module, and instantiate the class. Relative paths are
346
+ recommended and it should be provided relative to the current working directory. This
347
+ import variant is available in v9.16.0 and later.
348
+
349
+ 2. **Module Path & Class**: The format is ``"package.module_name:ClassName"``. This
350
+ method allows you to store your custom parser in a package that is installed in the
351
+ same environment as PSR. This method is useful if you want to share your custom parser
352
+ across multiple repositories. To share it across multiple repositories generally you will
353
+ need to publish the parser as its own separate package and then ``pip install`` it into
354
+ the current virtual environment. You can also keep it in the same repository as your
355
+ project as long as it is in the current directory of the virtual environment and is
356
+ locatable by the Python import system. You may need to set the ``PYTHONPATH`` environment
357
+ variable if you have a more complex directory structure. This import variant is available
358
+ in v8.0.0 and later.
359
+
360
+ To test that your custom parser is importable, you can run the following command in the
361
+ directory where PSR will be executed:
362
+
363
+ .. code-block:: bash
364
+
365
+ python -c "from package.module_name import ClassName"
366
+
367
+ .. note::
368
+ Remember this is basic python import rules so the package name is optional and generally
369
+ packages are defined by a directory with ``__init__.py`` files.
370
+
350
371
 
351
372
  .. _commit_parser-tokens:
352
373
 
@@ -796,7 +796,7 @@ Built-in parsers:
796
796
  * ``tag`` - :ref:`TagCommitParser <commit_parser-builtin-tag>` *(deprecated in v9.12.0)*
797
797
 
798
798
  You can set any of the built-in parsers by their keyword but you can also specify
799
- your own commit parser in ``module:attr`` form.
799
+ your own commit parser in ``path/to/module_file.py:Class`` or ``module:Class`` form.
800
800
 
801
801
  For more information see :ref:`commit-parsing`.
802
802
 
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.15.2"
9
+ version = "9.16.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -82,7 +82,7 @@ dev = [
82
82
  "ruff == 0.6.1"
83
83
  ]
84
84
  mypy = [
85
- "mypy == 1.13.0",
85
+ "mypy == 1.14.1",
86
86
  "types-requests ~= 2.32.0",
87
87
  "types-pyyaml ~= 6.0",
88
88
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.15.2
3
+ Version: 9.16.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -62,7 +62,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
62
62
  Requires-Dist: tox~=4.11; extra == "dev"
63
63
  Requires-Dist: ruff==0.6.1; extra == "dev"
64
64
  Provides-Extra: mypy
65
- Requires-Dist: mypy==1.13.0; extra == "mypy"
65
+ Requires-Dist: mypy==1.14.1; extra == "mypy"
66
66
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
67
67
  Requires-Dist: types-pyyaml~=6.0; extra == "mypy"
68
68
 
@@ -116,6 +116,7 @@ tests/e2e/cmd_version/test_version.py
116
116
  tests/e2e/cmd_version/test_version_build.py
117
117
  tests/e2e/cmd_version/test_version_bump.py
118
118
  tests/e2e/cmd_version/test_version_changelog.py
119
+ tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py
119
120
  tests/e2e/cmd_version/test_version_github_actions.py
120
121
  tests/e2e/cmd_version/test_version_print.py
121
122
  tests/e2e/cmd_version/test_version_release_notes.py
@@ -26,7 +26,7 @@ sphinx-autobuild==2024.2.4
26
26
  furo~=2024.1
27
27
 
28
28
  [mypy]
29
- mypy==1.13.0
29
+ mypy==1.14.1
30
30
  types-requests~=2.32.0
31
31
  types-pyyaml~=6.0
32
32
 
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.15.2"
27
+ __version__ = "9.16.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -26,6 +26,7 @@ from semantic_release.enums import LevelBump
26
26
  from semantic_release.errors import (
27
27
  BuildDistributionsError,
28
28
  GitCommitEmptyIndexError,
29
+ InternalError,
29
30
  UnexpectedResponse,
30
31
  )
31
32
  from semantic_release.gitproject import GitProject
@@ -35,7 +36,6 @@ from semantic_release.version.algorithm import (
35
36
  tags_and_versions,
36
37
  )
37
38
  from semantic_release.version.translator import VersionTranslator
38
- from semantic_release.version.version import Version
39
39
 
40
40
  if TYPE_CHECKING: # pragma: no cover
41
41
  from pathlib import Path
@@ -45,6 +45,7 @@ if TYPE_CHECKING: # pragma: no cover
45
45
 
46
46
  from semantic_release.cli.cli_context import CliContextObj
47
47
  from semantic_release.version.declaration import VersionDeclarationABC
48
+ from semantic_release.version.version import Version
48
49
 
49
50
 
50
51
  log = logging.getLogger(__name__)
@@ -90,7 +91,18 @@ def version_from_forced_level(
90
91
 
91
92
  # If we have no tags, return the default version
92
93
  if not ts_and_vs:
93
- return Version.parse(DEFAULT_VERSION).bump(forced_level_bump)
94
+ # Since the translator is configured by the user, we can't guarantee that it will
95
+ # be able to parse the default version. So we first cast it to a tag using the default
96
+ # value and the users configured tag format, then parse it back to a version object
97
+ default_initial_version = translator.from_tag(
98
+ translator.str_to_tag(DEFAULT_VERSION)
99
+ )
100
+ if default_initial_version is None:
101
+ # This should never happen, but if it does, it's a bug
102
+ raise InternalError(
103
+ "Translator was unable to parse the embedded default version"
104
+ )
105
+ return default_initial_version.bump(forced_level_bump)
94
106
 
95
107
  _, latest_version = ts_and_vs[0]
96
108
  if forced_level_bump is not LevelBump.PRERELEASE_REVISION:
@@ -516,12 +528,8 @@ def version( # noqa: C901
516
528
  gha_output.version = new_version
517
529
  ctx.call_on_close(gha_output.write_if_possible)
518
530
 
519
- # Make string variant of version && Translate to tag if necessary
520
- version_to_print = (
521
- str(new_version)
522
- if not print_only_tag
523
- else translator.str_to_tag(str(new_version))
524
- )
531
+ # Make string variant of version or appropriate tag as necessary
532
+ version_to_print = str(new_version) if not print_only_tag else new_version.as_tag()
525
533
 
526
534
  # Print the new version so that command-line output capture will work
527
535
  click.echo(version_to_print)
@@ -2,11 +2,17 @@ from __future__ import annotations
2
2
 
3
3
  import logging
4
4
  import os
5
- import re
6
5
  from collections.abc import Mapping
7
6
  from dataclasses import dataclass, is_dataclass
8
7
  from enum import Enum
8
+ from functools import reduce
9
9
  from pathlib import Path
10
+ from re import (
11
+ Pattern,
12
+ compile as regexp,
13
+ error as RegExpError, # noqa: N812
14
+ escape as regex_escape,
15
+ )
10
16
  from typing import Any, ClassVar, Dict, List, Literal, Optional, Tuple, Type, Union
11
17
 
12
18
  from git import Actor, InvalidGitRepositoryError
@@ -157,6 +163,20 @@ class ChangelogConfig(BaseModel):
157
163
  insertion_flag: str = ""
158
164
  template_dir: str = "templates"
159
165
 
166
+ @field_validator("exclude_commit_patterns", mode="after")
167
+ @classmethod
168
+ def validate_match(cls, patterns: Tuple[str, ...]) -> Tuple[str, ...]:
169
+ curr_index = 0
170
+ try:
171
+ for i, pattern in enumerate(patterns):
172
+ curr_index = i
173
+ regexp(pattern)
174
+ except RegExpError as err:
175
+ raise ValueError(
176
+ f"exclude_commit_patterns[{curr_index}]: Invalid regular expression"
177
+ ) from err
178
+ return patterns
179
+
160
180
  @field_validator("changelog_file", mode="after")
161
181
  @classmethod
162
182
  def changelog_file_deprecation_warning(cls, val: str) -> str:
@@ -228,8 +248,8 @@ class BranchConfig(BaseModel):
228
248
  return ".*"
229
249
 
230
250
  try:
231
- re.compile(match)
232
- except re.error as err:
251
+ regexp(match)
252
+ except RegExpError as err:
233
253
  raise ValueError(f"Invalid regex {match!r}") from err
234
254
  return match
235
255
 
@@ -513,7 +533,7 @@ class RuntimeContext:
513
533
  assets: List[str]
514
534
  commit_author: Actor
515
535
  commit_message: str
516
- changelog_excluded_commit_patterns: Tuple[re.Pattern[str], ...]
536
+ changelog_excluded_commit_patterns: Tuple[Pattern[str], ...]
517
537
  version_declarations: Tuple[VersionDeclarationABC, ...]
518
538
  hvcs_client: hvcs.HvcsBase
519
539
  changelog_insertion_flag: str
@@ -545,7 +565,7 @@ class RuntimeContext:
545
565
  choices: Dict[str, BranchConfig], active_branch: str
546
566
  ) -> BranchConfig:
547
567
  for group, options in choices.items():
548
- if re.match(options.match, active_branch):
568
+ if regexp(options.match).match(active_branch):
549
569
  log.info(
550
570
  "Using group %r options, as %r matches %r",
551
571
  group,
@@ -639,12 +659,21 @@ class RuntimeContext:
639
659
 
640
660
  # We always exclude PSR's own release commits from the Changelog
641
661
  # when parsing commits
642
- _psr_release_commit_re = re.compile(
643
- raw.commit_message.replace(r"{version}", r"(?P<version>.*)")
662
+ psr_release_commit_regex = regexp(
663
+ reduce(
664
+ lambda regex_str, pattern: str(regex_str).replace(*pattern),
665
+ (
666
+ # replace the version holder with a regex pattern to match various versions
667
+ (regex_escape("{version}"), r"(?P<version>\d+\.\d+\.\d+\S*)"),
668
+ # TODO: add any other placeholders here
669
+ ),
670
+ # We use re.escape to ensure that the commit message is treated as a literal
671
+ regex_escape(raw.commit_message),
672
+ )
644
673
  )
645
674
  changelog_excluded_commit_patterns = (
646
- _psr_release_commit_re,
647
- *(re.compile(pattern) for pattern in raw.changelog.exclude_commit_patterns),
675
+ psr_release_commit_regex,
676
+ *(regexp(pattern) for pattern in raw.changelog.exclude_commit_patterns),
648
677
  )
649
678
 
650
679
  _commit_author_str = cls.resolve_from_env(raw.commit_author) or ""
@@ -1,9 +1,11 @@
1
- import importlib
1
+ import importlib.util
2
2
  import logging
3
+ import os
3
4
  import re
4
5
  import string
6
+ import sys
5
7
  from functools import lru_cache, wraps
6
- from pathlib import PurePosixPath
8
+ from pathlib import Path, PurePosixPath
7
9
  from typing import Any, Callable, NamedTuple, TypeVar
8
10
  from urllib.parse import urlsplit
9
11
 
@@ -69,8 +71,43 @@ def dynamic_import(import_path: str) -> Any:
69
71
  """
70
72
  log.debug("Trying to import %s", import_path)
71
73
  module_name, attr = import_path.split(":", maxsplit=1)
72
- module = importlib.import_module(module_name)
73
- return getattr(module, attr)
74
+
75
+ # Check if the module is a file path, if it can be resolved and exists on disk then import as a file
76
+ module_filepath = Path(module_name).resolve()
77
+ if module_filepath.exists():
78
+ module_path = (
79
+ module_filepath.stem
80
+ if Path(module_name).is_absolute()
81
+ else str(Path(module_name).with_suffix("")).replace(os.sep, ".")
82
+ )
83
+
84
+ if module_path not in sys.modules:
85
+ spec = importlib.util.spec_from_file_location(
86
+ module_path, str(module_filepath)
87
+ )
88
+ if spec is None:
89
+ raise ImportError(f"Could not import {module_filepath}")
90
+
91
+ module = importlib.util.module_from_spec(spec) # type: ignore[arg-type]
92
+ sys.modules.update({spec.name: module})
93
+ spec.loader.exec_module(module) # type: ignore[union-attr]
94
+
95
+ return getattr(sys.modules[module_path], attr)
96
+
97
+ # Otherwise, import as a module
98
+ try:
99
+ module = importlib.import_module(module_name)
100
+ return getattr(module, attr)
101
+ except TypeError as err:
102
+ raise ImportError(
103
+ str.join(
104
+ "\n",
105
+ [
106
+ str(err.args[0]),
107
+ "Verify the import format matches 'module:attribute' or 'path/to/module:attribute'",
108
+ ],
109
+ )
110
+ ) from err
74
111
 
75
112
 
76
113
  class ParsedGitUrl(NamedTuple):
@@ -270,6 +270,7 @@ def next_version(
270
270
  translator.str_to_tag(DEFAULT_VERSION)
271
271
  )
272
272
  if default_initial_version is None:
273
+ # This should never happen, but if it does, it's a bug
273
274
  raise InternalError(
274
275
  "Translator was unable to parse the embedded default version"
275
276
  )
@@ -0,0 +1,60 @@
1
+ from __future__ import annotations
2
+
3
+ import shutil
4
+ from typing import TYPE_CHECKING
5
+
6
+ import pytest
7
+ from git import Repo
8
+
9
+ if TYPE_CHECKING:
10
+ from pathlib import Path
11
+ from typing import Protocol
12
+
13
+ from tests.fixtures.git_repo import BuildRepoFromDefinitionFn, RepoActionConfigure
14
+
15
+ class InitMirrorRepo4RebuildFn(Protocol):
16
+ def __call__(
17
+ self,
18
+ mirror_repo_dir: Path,
19
+ configuration_step: RepoActionConfigure,
20
+ ) -> Path: ...
21
+
22
+
23
+ @pytest.fixture(scope="session")
24
+ def init_mirror_repo_for_rebuild(
25
+ default_changelog_md_template: Path,
26
+ default_changelog_rst_template: Path,
27
+ changelog_template_dir: Path,
28
+ build_repo_from_definition: BuildRepoFromDefinitionFn,
29
+ ) -> InitMirrorRepo4RebuildFn:
30
+ def _init_mirror_repo_for_rebuild(
31
+ mirror_repo_dir: Path,
32
+ configuration_step: RepoActionConfigure,
33
+ ) -> Path:
34
+ # Create the mirror repo directory
35
+ mirror_repo_dir.mkdir(exist_ok=True, parents=True)
36
+
37
+ # Initialize mirror repository
38
+ build_repo_from_definition(
39
+ dest_dir=mirror_repo_dir,
40
+ repo_construction_steps=[configuration_step],
41
+ )
42
+
43
+ # Force custom changelog to be a copy of the default changelog (md and rst)
44
+ shutil.copytree(
45
+ src=default_changelog_md_template.parent,
46
+ dst=mirror_repo_dir / changelog_template_dir,
47
+ dirs_exist_ok=True,
48
+ )
49
+ shutil.copytree(
50
+ src=default_changelog_rst_template.parent,
51
+ dst=mirror_repo_dir / changelog_template_dir,
52
+ dirs_exist_ok=True,
53
+ )
54
+
55
+ with Repo(mirror_repo_dir) as mirror_git_repo:
56
+ mirror_git_repo.git.add(str(changelog_template_dir))
57
+
58
+ return mirror_repo_dir
59
+
60
+ return _init_mirror_repo_for_rebuild
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_gitflow_repo_rebuild_1_channel(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_gitflow_repo_rebuild_2_channels(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -28,11 +28,8 @@ if TYPE_CHECKING:
28
28
  from click.testing import CliRunner
29
29
  from requests_mock import Mocker
30
30
 
31
- from tests.e2e.cmd_version.bump_version.conftest import (
32
- GetSanitizedMdChangelogContentFn,
33
- GetSanitizedRstChangelogContentFn,
34
- InitMirrorRepo4RebuildFn,
35
- )
31
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
32
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
36
33
  from tests.fixtures.example_project import ExProjectDir
37
34
  from tests.fixtures.git_repo import (
38
35
  BuildRepoFromDefinitionFn,
@@ -73,8 +70,8 @@ def test_gitflow_repo_rebuild_3_channels(
73
70
  post_mocker: Mocker,
74
71
  default_tag_format_str: str,
75
72
  version_py_file: Path,
76
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
77
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
73
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
74
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
78
75
  ):
79
76
  # build target repo into a temporary directory
80
77
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_gitflow_repo_rebuild_4_channels(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_githubflow_repo_rebuild_1_channel(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_githubflow_repo_rebuild_2_channels(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name
@@ -27,11 +27,8 @@ if TYPE_CHECKING:
27
27
  from click.testing import CliRunner
28
28
  from requests_mock import Mocker
29
29
 
30
- from tests.e2e.cmd_version.bump_version.conftest import (
31
- GetSanitizedMdChangelogContentFn,
32
- GetSanitizedRstChangelogContentFn,
33
- InitMirrorRepo4RebuildFn,
34
- )
30
+ from tests.e2e.cmd_version.bump_version.conftest import InitMirrorRepo4RebuildFn
31
+ from tests.e2e.conftest import GetSanitizedChangelogContentFn
35
32
  from tests.fixtures.example_project import ExProjectDir
36
33
  from tests.fixtures.git_repo import (
37
34
  BuildRepoFromDefinitionFn,
@@ -71,8 +68,8 @@ def test_trunk_repo_rebuild_only_official_releases(
71
68
  post_mocker: Mocker,
72
69
  default_tag_format_str: str,
73
70
  version_py_file: Path,
74
- get_sanitized_md_changelog_content: GetSanitizedMdChangelogContentFn,
75
- get_sanitized_rst_changelog_content: GetSanitizedRstChangelogContentFn,
71
+ get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
72
+ get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
76
73
  ):
77
74
  # build target repo into a temporary directory
78
75
  target_repo_dir = example_project_dir / repo_fixture_name