python-semantic-release 10.3.1__tar.gz → 10.4.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 (234) hide show
  1. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/PKG-INFO +2 -2
  2. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/commit_parsing.rst +88 -2
  3. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/automatic-releases/github-actions.rst +7 -7
  4. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/configuration-guides/index.rst +1 -0
  5. python_semantic_release-10.4.0/docs/configuration/configuration-guides/monorepos-ex-easy-before-release.png +0 -0
  6. python_semantic_release-10.4.0/docs/configuration/configuration-guides/monorepos-ex-easy-post-release.png +0 -0
  7. python_semantic_release-10.4.0/docs/configuration/configuration-guides/monorepos.rst +358 -0
  8. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/configuration-guides/uv_integration.rst +1 -1
  9. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/configuration.rst +1 -0
  10. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/pyproject.toml +2 -2
  11. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/python_semantic_release.egg-info/SOURCES.txt +21 -1
  12. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/version.py +3 -6
  13. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/config.py +4 -2
  14. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/github_actions_output.py +8 -2
  15. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/__init__.py +23 -0
  16. python_semantic_release-10.4.0/src/semantic_release/commit_parser/conventional/__init__.py +17 -0
  17. python_semantic_release-10.4.0/src/semantic_release/commit_parser/conventional/options.py +72 -0
  18. python_semantic_release-10.4.0/src/semantic_release/commit_parser/conventional/options_monorepo.py +90 -0
  19. python_semantic_release-10.3.1/src/semantic_release/commit_parser/conventional.py → python_semantic_release-10.4.0/src/semantic_release/commit_parser/conventional/parser.py +85 -127
  20. python_semantic_release-10.4.0/src/semantic_release/commit_parser/conventional/parser_monorepo.py +467 -0
  21. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/algorithm.py +5 -18
  22. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/conftest.py +28 -5
  23. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/const.py +3 -0
  24. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_changelog/test_changelog.py +21 -10
  25. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +8 -2
  26. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_changelog/test_changelog_release_notes.py +18 -29
  27. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/conftest.py +37 -12
  28. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +26 -22
  29. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +26 -22
  30. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +26 -22
  31. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +26 -22
  32. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +26 -22
  33. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel_branch_update_merge.py +26 -22
  34. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +26 -22
  35. python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/github_flow_monorepo/test_monorepo_1_channel.py +251 -0
  36. python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/github_flow_monorepo/test_monorepo_2_channels.py +250 -0
  37. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +26 -22
  38. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +26 -22
  39. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +27 -22
  40. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +26 -22
  41. python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/trunk_based_dev_monorepo/test_monorepo_trunk.py +251 -0
  42. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_bump.py +42 -26
  43. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_changelog.py +37 -32
  44. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +11 -15
  45. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_github_actions.py +4 -11
  46. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_print.py +33 -23
  47. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_stamp.py +2 -1
  48. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/conftest.py +18 -9
  49. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/test_main.py +6 -3
  50. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/__init__.py +1 -0
  51. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/example_project.py +335 -61
  52. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/git_repo.py +586 -230
  53. python_semantic_release-10.4.0/tests/fixtures/monorepos/__init__.py +4 -0
  54. python_semantic_release-10.4.0/tests/fixtures/monorepos/example_monorepo.py +523 -0
  55. python_semantic_release-10.4.0/tests/fixtures/monorepos/git_monorepo.py +206 -0
  56. python_semantic_release-10.4.0/tests/fixtures/monorepos/github_flow/__init__.py +2 -0
  57. python_semantic_release-10.4.0/tests/fixtures/monorepos/github_flow/monorepo_w_default_release.py +954 -0
  58. python_semantic_release-10.4.0/tests/fixtures/monorepos/github_flow/monorepo_w_release_channels.py +888 -0
  59. python_semantic_release-10.4.0/tests/fixtures/monorepos/trunk_based_dev/__init__.py +1 -0
  60. python_semantic_release-10.4.0/tests/fixtures/monorepos/trunk_based_dev/monorepo_w_tags.py +623 -0
  61. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +342 -207
  62. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +305 -160
  63. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +327 -189
  64. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +328 -197
  65. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +74 -10
  66. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/github_flow/repo_w_default_release_w_branch_update_merge.py +184 -93
  67. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +123 -71
  68. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/repo_initial_commit.py +30 -2
  69. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +55 -11
  70. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +71 -15
  71. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +36 -3
  72. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +55 -11
  73. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +46 -7
  74. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/cli/test_util.py +17 -10
  75. python_semantic_release-10.4.0/tests/unit/semantic_release/version/__init__.py +0 -0
  76. python_semantic_release-10.4.0/tests/unit/semantic_release/version/declarations/__init__.py +0 -0
  77. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/util.py +10 -2
  78. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/LICENSE +0 -0
  79. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/MANIFEST.in +0 -0
  80. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/README.rst +0 -0
  81. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/Makefile +0 -0
  82. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/api/commands.rst +0 -0
  83. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/changelog_templates.rst +0 -0
  84. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/getting_started.rst +0 -0
  85. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/index.rst +0 -0
  86. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/installation.rst +0 -0
  87. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/multibranch_releases.rst +0 -0
  88. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/concepts/strict_mode.rst +0 -0
  89. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/conf.py +0 -0
  90. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/automatic-releases/cronjobs.rst +0 -0
  91. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/automatic-releases/index.rst +0 -0
  92. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/automatic-releases/travis.rst +0 -0
  93. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/configuration/index.rst +0 -0
  94. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/contributing/contributing_guide.rst +0 -0
  95. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/contributing/index.rst +0 -0
  96. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/index.rst +0 -0
  97. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/make.bat +0 -0
  98. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/misc/psr_changelog.rst +0 -0
  99. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/misc/troubleshooting.rst +0 -0
  100. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/upgrading/08-upgrade.rst +0 -0
  101. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/upgrading/09-upgrade.rst +0 -0
  102. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/upgrading/10-upgrade.rst +0 -0
  103. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/docs/upgrading/index.rst +0 -0
  104. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/setup.cfg +0 -0
  105. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/__init__.py +0 -0
  106. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/__main__.py +0 -0
  107. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/changelog/__init__.py +0 -0
  108. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/changelog/context.py +0 -0
  109. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/changelog/release_history.py +0 -0
  110. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/changelog/template.py +0 -0
  111. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/__init__.py +0 -0
  112. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/changelog_writer.py +0 -0
  113. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/cli_context.py +0 -0
  114. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  115. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/changelog.py +0 -0
  116. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  117. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/main.py +0 -0
  118. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/commands/publish.py +0 -0
  119. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/const.py +0 -0
  120. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/masking_filter.py +0 -0
  121. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/cli/util.py +0 -0
  122. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/_base.py +0 -0
  123. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/angular.py +0 -0
  124. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/emoji.py +0 -0
  125. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/scipy.py +0 -0
  126. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/tag.py +0 -0
  127. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/token.py +0 -0
  128. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/commit_parser/util.py +0 -0
  129. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/const.py +0 -0
  130. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_header.md.j2 +0 -0
  131. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_init.md.j2 +0 -0
  132. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_update.md.j2 +0 -0
  133. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/changes.md.j2 +0 -0
  134. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/first_release.md.j2 +0 -0
  135. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/macros.md.j2 +0 -0
  136. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/unreleased_changes.md.j2 +0 -0
  137. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.components/versioned_changes.md.j2 +0 -0
  138. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/.release_notes.md.j2 +0 -0
  139. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/md/CHANGELOG.md.j2 +0 -0
  140. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_header.rst.j2 +0 -0
  141. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_init.rst.j2 +0 -0
  142. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_update.rst.j2 +0 -0
  143. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/changes.rst.j2 +0 -0
  144. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/first_release.rst.j2 +0 -0
  145. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/macros.rst.j2 +0 -0
  146. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/unreleased_changes.rst.j2 +0 -0
  147. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/.components/versioned_changes.rst.j2 +0 -0
  148. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/data/templates/conventional/rst/CHANGELOG.rst.j2 +0 -0
  149. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/enums.py +0 -0
  150. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/errors.py +0 -0
  151. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/gitproject.py +0 -0
  152. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/globals.py +0 -0
  153. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/helpers.py +0 -0
  154. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/__init__.py +0 -0
  155. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/_base.py +0 -0
  156. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
  157. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/gitea.py +0 -0
  158. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/github.py +0 -0
  159. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/gitlab.py +0 -0
  160. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  161. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  162. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/hvcs/util.py +0 -0
  163. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/py.typed +0 -0
  164. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/__init__.py +0 -0
  165. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declaration.py +0 -0
  166. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declarations/__init__.py +0 -0
  167. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declarations/enum.py +0 -0
  168. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declarations/i_version_replacer.py +0 -0
  169. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declarations/pattern.py +0 -0
  170. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/declarations/toml.py +0 -0
  171. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/translator.py +0 -0
  172. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/src/semantic_release/version/version.py +0 -0
  173. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/__init__.py +0 -0
  174. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/__init__.py +0 -0
  175. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  176. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_changelog/test_changelog_parsing.py +0 -0
  177. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_config/__init__.py +0 -0
  178. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  179. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  180. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
  181. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/__init__.py +0 -0
  182. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
  183. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
  184. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
  185. {python_semantic_release-10.3.1/tests/e2e/cmd_version/bump_version/trunk_based_dev → python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/github_flow_monorepo}/__init__.py +0 -0
  186. {python_semantic_release-10.3.1/tests/unit → python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/trunk_based_dev}/__init__.py +0 -0
  187. {python_semantic_release-10.3.1/tests/unit/semantic_release → python_semantic_release-10.4.0/tests/e2e/cmd_version/bump_version/trunk_based_dev_monorepo}/__init__.py +0 -0
  188. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version.py +0 -0
  189. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_build.py +0 -0
  190. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
  191. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  192. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/e2e/test_help.py +0 -0
  193. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/commit_parsers.py +0 -0
  194. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/__init__.py +0 -0
  195. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  196. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  197. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  198. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/fixtures/scipy.py +0 -0
  199. {python_semantic_release-10.3.1/tests/unit/semantic_release/changelog → python_semantic_release-10.4.0/tests/unit}/__init__.py +0 -0
  200. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/conftest.py +0 -0
  201. {python_semantic_release-10.3.1/tests/unit/semantic_release/cli → python_semantic_release-10.4.0/tests/unit/semantic_release}/__init__.py +0 -0
  202. {python_semantic_release-10.3.1/tests/unit/semantic_release/commit_parser → python_semantic_release-10.4.0/tests/unit/semantic_release/changelog}/__init__.py +0 -0
  203. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
  204. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
  205. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  206. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  207. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  208. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  209. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  210. {python_semantic_release-10.3.1/tests/unit/semantic_release/hvcs → python_semantic_release-10.4.0/tests/unit/semantic_release/cli}/__init__.py +0 -0
  211. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
  212. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  213. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  214. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  215. {python_semantic_release-10.3.1/tests/unit/semantic_release/version → python_semantic_release-10.4.0/tests/unit/semantic_release/commit_parser}/__init__.py +0 -0
  216. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/commit_parser/test_conventional.py +0 -0
  217. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  218. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  219. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  220. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  221. {python_semantic_release-10.3.1/tests/unit/semantic_release/version/declarations → python_semantic_release-10.4.0/tests/unit/semantic_release/hvcs}/__init__.py +0 -0
  222. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  223. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  224. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  225. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  226. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  227. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  228. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  229. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/test_helpers.py +0 -0
  230. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +0 -0
  231. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/version/declarations/test_toml_declaration.py +0 -0
  232. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  233. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  234. {python_semantic_release-10.3.1 → python_semantic_release-10.4.0}/tests/unit/semantic_release/version/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-semantic-release
3
- Version: 10.3.1
3
+ Version: 10.4.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3.13
20
- Requires-Python: >=3.8
20
+ Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/x-rst
22
22
  License-File: LICENSE
23
23
  Requires-Dist: click~=8.1.0
@@ -49,6 +49,7 @@ Built-in Commit Parsers
49
49
  The following parsers are built in to Python Semantic Release:
50
50
 
51
51
  - :ref:`ConventionalCommitParser <commit_parser-builtin-conventional>`
52
+ - :ref:`ConventionalCommitMonorepoParser <commit_parser-builtin-conventional-monorepo>` *(available in ${NEW_RELEASE_TAG}+)*
52
53
  - :ref:`AngularCommitParser <commit_parser-builtin-angular>` *(deprecated in v9.19.0)*
53
54
  - :ref:`EmojiCommitParser <commit_parser-builtin-emoji>`
54
55
  - :ref:`ScipyCommitParser <commit_parser-builtin-scipy>`
@@ -65,7 +66,7 @@ Conventional Commits Parser
65
66
 
66
67
  A parser that is designed to parse commits formatted according to the
67
68
  `Conventional Commits Specification`_. The parser is implemented with the following
68
- logic in relation to how PSR's core features:
69
+ logic in relation to PSR's core features:
69
70
 
70
71
  - **Version Bump Determination**: This parser extracts the commit type from the subject
71
72
  line of the commit (the first line of a commit message). This type is matched against
@@ -127,13 +128,98 @@ logic in relation to how PSR's core features:
127
128
 
128
129
  If no commit parser options are provided via the configuration, the parser will use PSR's
129
130
  built-in
130
- :py:class:`defaults <semantic_release.commit_parser.conventional.ConventionalCommitParserOptions>`.
131
+ :py:class:`defaults <semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions>`.
131
132
 
132
133
  .. _#402: https://github.com/python-semantic-release/python-semantic-release/issues/402
133
134
  .. _Conventional Commits Specification: https://www.conventionalcommits.org/en/v1.0.0
134
135
 
135
136
  ----
136
137
 
138
+ .. _commit_parser-builtin-conventional-monorepo:
139
+
140
+ Conventional Commits Monorepo Parser
141
+ """"""""""""""""""""""""""""""""""""
142
+
143
+ *Introduced in ${NEW_RELEASE_TAG}*
144
+
145
+ .. important::
146
+ In order for this parser to be effective, please review the section titled
147
+ :ref:`monorepos` for details on file structure, configurations, and release actions.
148
+
149
+ This parser is an extension of the :ref:`commit_parser-builtin-conventional`, designed specifically
150
+ for monorepo environments. A monorepo environment is defined as a single source control repository
151
+ that contains multiple packages, each of which can be released independently and may have different
152
+ version numbers.
153
+
154
+ This parser introduces two new configuration options that determine which packages are affected
155
+ by a commit. These options control whether a commit is considered for version determination,
156
+ changelog generation, and other release actions for the relevant packages. The 2 new
157
+ configuration options are
158
+ :py:class:`path_filters <semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.path_filters>`
159
+ and
160
+ :py:class:`scope_prefix <semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.scope_prefix>`.
161
+
162
+ **Features**:
163
+
164
+ - **Package Specific Commit Filtering**: For monorepo support, this parser uses 2 filtering rules
165
+ to determine if a commit should be considered for a specific package. The first rule is based on
166
+ file paths that are changed in the commit and the second rule is based on the optional scope
167
+ prefix defined in the commit message. If either rule matches, then the commit is considered
168
+ relevant to that package and will be used in version determination, changelog generation, etc,
169
+ for that package. If neither rule matches, then the commit is ignored for that package. File
170
+ path filtering rules are applied first and are the primary way to determine package relevance. The
171
+ :py:class:`path_filters <semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.path_filters>`
172
+ option allows for specifying a list of file path patterns and will also support negated patterns
173
+ to ignore specific paths that otherwise would be selected from the file glob pattern. Negated
174
+ patterns are defined by prefixing the pattern with an exclamation point (``!``). File path
175
+ filtering is quite effective by itself but to handle the edge cases, the parser has the
176
+ :py:class:`scope_prefix <semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.scope_prefix>`
177
+ configuration option to allow the developer to specifically define when the commit is relevant
178
+ to the package. In monorepo setups, there are often shared files between packages (generally at
179
+ the root project level) that are modified occasionally but not always relevant to the package
180
+ being released. Since you do not want to define this path in the package configuration as it may
181
+ not be relevant to the release, then this parser will look for a match with the scope prefix.
182
+ The scope prefix is a regular expression that is used to match the text inside the scope field
183
+ of a Conventional Commit. The scope prefix is optional and is used only if file path filtering
184
+ does not match. Commits that have matching files in the commit will be considered relevant to
185
+ the package **regardless** if a scope prefix exists or if it matches.
186
+
187
+ - **Version Bump Determination**: Once package-specific commit filtering is applied, the relevant
188
+ commits are passed to the Conventional Commits Parser for evaluation and then used for version
189
+ bump determination. See :ref:`commit_parser-builtin-conventional` for details.
190
+
191
+ - **Changelog Generation**: Once package-specific commit filtering is applied, the relevant
192
+ commits are passed to the Conventional Commits Parser for evaluation and then used for
193
+ changelog generation. See :ref:`commit_parser-builtin-conventional` for details.
194
+
195
+ - **Pull/Merge Request Identifier Detection**: Once package-specific commit filtering is applied,
196
+ the relevant commits are passed to the Conventional Commits Parser for pull/merge request
197
+ identifier detection. See :ref:`commit_parser-builtin-linked_merge_request_detection` for details.
198
+
199
+ - **Linked Issue Identifier Detection**: Once package-specific commit filtering is applied, the
200
+ relevant commits are passed to the Conventional Commits Parser for linked issue identifier
201
+ detection. See :ref:`commit_parser-builtin-issue_number_detection` for details.
202
+
203
+ - **Squash Commit Evaluation**: Squashed commits are separated out into individual commits with
204
+ the same set of changed files **BEFORE** the package-specific commit filtering is applied.
205
+ Each pseudo-commit is then subjected to the same filtering rules as regular commits. See
206
+ :ref:`commit_parser-builtin-squash_commit_evaluation` for details.
207
+
208
+ - **Release Notice Footer Detection**: Once package-specific commit filtering is applied, the
209
+ relevant commits are passed to the Conventional Commits Parser for release notice footer
210
+ detection. See :ref:`commit_parser-builtin-release_notice_footer_detection` for details.
211
+
212
+ **Limitations**:
213
+
214
+ - ``revert`` commit type is NOT supported, see :ref:`commit_parser-builtin-conventional`'s
215
+ limitations for details.
216
+
217
+ If no commit parser options are provided via the configuration, the parser will use PSR's
218
+ built-in
219
+ :py:class:`defaults <semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions>`.
220
+
221
+ ----
222
+
137
223
  .. _commit_parser-builtin-angular:
138
224
 
139
225
  Angular Commit Parser
@@ -933,14 +933,14 @@ to the GitHub Release Assets as well.
933
933
  - name: Action | Semantic Version Release
934
934
  id: release
935
935
  # Adjust tag with desired version if applicable.
936
- uses: python-semantic-release/python-semantic-release@v10.3.1
936
+ uses: python-semantic-release/python-semantic-release@v10.4.0
937
937
  with:
938
938
  github_token: ${{ secrets.GITHUB_TOKEN }}
939
939
  git_committer_name: "github-actions"
940
940
  git_committer_email: "actions@users.noreply.github.com"
941
941
 
942
942
  - name: Publish | Upload to GitHub Release Assets
943
- uses: python-semantic-release/publish-action@v10.3.1
943
+ uses: python-semantic-release/publish-action@v10.4.0
944
944
  if: steps.release.outputs.released == 'true'
945
945
  with:
946
946
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1039,7 +1039,7 @@ The equivalent GitHub Action configuration would be:
1039
1039
 
1040
1040
  - name: Action | Semantic Version Release
1041
1041
  # Adjust tag with desired version if applicable.
1042
- uses: python-semantic-release/python-semantic-release@v10.3.1
1042
+ uses: python-semantic-release/python-semantic-release@v10.4.0
1043
1043
  with:
1044
1044
  github_token: ${{ secrets.GITHUB_TOKEN }}
1045
1045
  force: patch
@@ -1098,14 +1098,14 @@ Publish Action.
1098
1098
 
1099
1099
  - name: Release submodule 1
1100
1100
  id: release-submod-1
1101
- uses: python-semantic-release/python-semantic-release@v10.3.1
1101
+ uses: python-semantic-release/python-semantic-release@v10.4.0
1102
1102
  with:
1103
1103
  directory: ${{ env.SUBMODULE_1_DIR }}
1104
1104
  github_token: ${{ secrets.GITHUB_TOKEN }}
1105
1105
 
1106
1106
  - name: Release submodule 2
1107
1107
  id: release-submod-2
1108
- uses: python-semantic-release/python-semantic-release@v10.3.1
1108
+ uses: python-semantic-release/python-semantic-release@v10.4.0
1109
1109
  with:
1110
1110
  directory: ${{ env.SUBMODULE_2_DIR }}
1111
1111
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1117,7 +1117,7 @@ Publish Action.
1117
1117
  # ------------------------------------------------------------------- #
1118
1118
 
1119
1119
  - name: Publish | Upload package 1 to GitHub Release Assets
1120
- uses: python-semantic-release/publish-action@v10.3.1
1120
+ uses: python-semantic-release/publish-action@v10.4.0
1121
1121
  if: steps.release-submod-1.outputs.released == 'true'
1122
1122
  with:
1123
1123
  directory: ${{ env.SUBMODULE_1_DIR }}
@@ -1125,7 +1125,7 @@ Publish Action.
1125
1125
  tag: ${{ steps.release-submod-1.outputs.tag }}
1126
1126
 
1127
1127
  - name: Publish | Upload package 2 to GitHub Release Assets
1128
- uses: python-semantic-release/publish-action@v10.3.1
1128
+ uses: python-semantic-release/publish-action@v10.4.0
1129
1129
  if: steps.release-submod-2.outputs.released == 'true'
1130
1130
  with:
1131
1131
  directory: ${{ env.SUBMODULE_2_DIR }}
@@ -11,4 +11,5 @@ more specific configurations.
11
11
  .. toctree::
12
12
  :maxdepth: 1
13
13
 
14
+ Monorepos <monorepos>
14
15
  UV Project Setup <uv_integration>
@@ -0,0 +1,358 @@
1
+ .. _monorepos:
2
+
3
+ Releasing Packages from a Monorepo
4
+ ==================================
5
+
6
+
7
+ A monorepo (mono-repository) is a software development strategy where code for multiple projects is stored in a single source control system. This approach streamlines and consolidates configuration, but introduces complexities when using automated tools like Python Semantic Release (PSR).
8
+
9
+ Previously, PSR offered limited compatibility with monorepos. As of ${NEW_RELEASE_TAG}, PSR introduces the :ref:`commit_parser-builtin-conventional-monorepo`, designed specifically for monorepo environments. To fully leverage this new parser, you must configure your monorepo as described below.
10
+
11
+ .. _monorepos-config:
12
+
13
+ Configuring PSR
14
+ ---------------
15
+
16
+ .. _monorepos-config-example_simple:
17
+
18
+ Example: Simple
19
+ """""""""""""""
20
+
21
+
22
+ **Directory Structure**: PSR does not yet support a single, workspace-level configuration definition. This means each package in the monorepo requires its own PSR configuration file. A compatible and common monorepo file structure looks like:
23
+
24
+ .. code::
25
+
26
+ project/
27
+ ├── .git/
28
+ ├── .venv/
29
+ ├── packages/
30
+ │ ├── pkg1/
31
+ │ │ ├── docs/
32
+ │ │ │ └── source/
33
+ │ │ │ ├── conf.py
34
+ │ │ │ └── index.rst
35
+ │ │ │
36
+ │ │ ├── src/
37
+ │ │ │ └── pkg1/
38
+ │ │ │ ├── __init__.py
39
+ │ │ │ ├── __main__.py
40
+ │ │ │ └── py.typed
41
+ │ │ │
42
+ │ │ ├── CHANGELOG.md
43
+ │ │ ├── README.md
44
+ │ │ └── pyproject.toml <-- PSR Configuration for Package 1
45
+ │ │
46
+ │ └── pkg2/
47
+ │ ├── docs/
48
+ │ │ └── source/
49
+ │ │ ├── conf.py
50
+ │ │ └── index.rst
51
+ │ ├── src/
52
+ │ │ └── pkg2/
53
+ │ │ ├── __init__.py
54
+ │ │ ├── __main__.py
55
+ │ │ └── py.typed
56
+ │ │
57
+ │ ├── CHANGELOG.md
58
+ │ ├── README.md
59
+ │ └── pyproject.toml <-- PSR Configuration for Package 2
60
+
61
+ ├── .gitignore
62
+ └── README.md
63
+
64
+
65
+ This is the most basic monorepo structure, where each package is self-contained with its own configuration files, documentation, and CHANGELOG files. To release a package, change your current working directory to the package directory and execute PSR's :ref:`cmd-version`. PSR will automatically read the package's ``pyproject.toml``, looking for the ``[tool.semantic_release]`` section to determine the package's versioning and release configuration, then search up the file tree to find the Git repository.
66
+
67
+ Because there is no workspace-level configuration, you must duplicate any common PSR configuration in each package's configuration file. Customize each configuration for each package to specify how PSR should distinguish between commits.
68
+
69
+ With the example file structure above, here is an example configuration file for each package:
70
+
71
+ .. code-block:: toml
72
+
73
+ # FILE: pkg1/pyproject.toml
74
+ [project]
75
+ name = "pkg1"
76
+ version = "1.0.0"
77
+
78
+ [tool.semantic_release]
79
+ commit_parser = "conventional-monorepo"
80
+ commit_message = """\
81
+ chore(release): pkg1@{version}`
82
+
83
+ Automatically generated by python-semantic-release
84
+ """
85
+ tag_format = "pkg1-v{version}"
86
+ version_toml = ["pyproject.toml:project.version"]
87
+
88
+ [tool.semantic_release.commit_parser_options]
89
+ path_filters = ["."]
90
+ scope_prefix = "pkg1-"
91
+
92
+ .. code-block:: toml
93
+
94
+ # FILE: pkg2/pyproject.toml
95
+ [project]
96
+ name = "pkg2"
97
+ version = "1.0.0"
98
+
99
+ [tool.semantic_release]
100
+ commit_parser = "conventional-monorepo"
101
+ commit_message = """\
102
+ chore(release): pkg2@{version}`
103
+
104
+ Automatically generated by python-semantic-release
105
+ """
106
+ tag_format = "pkg2-v{version}"
107
+ version_toml = ["pyproject.toml:project.version"]
108
+
109
+ [tool.semantic_release.commit_parser_options]
110
+ path_filters = ["."]
111
+ scope_prefix = "pkg2-"
112
+
113
+
114
+ These are the minimum configuration options required for each package. Note the use of :ref:`config-tag_format` to distinguish tags between packages. The commit parser options are specific to the new :ref:`commit_parser-builtin-conventional-monorepo` and play a significant role in identifying which commits are relevant to each package. Since you are expected to change directories to each package before releasing, file paths in each configuration file should be relative to the package directory.
115
+
116
+ Each package also defines a slightly different :ref:`config-commit_message` to reflect the package name in each message. This helps clarify which release number is being updated in the commit history.
117
+
118
+
119
+ Release Steps
120
+ '''''''''''''
121
+
122
+ Given the following Git history of a monorepo using a GitHub Flow branching strategy (without CI/CD):
123
+
124
+ .. image:: ./monorepos-ex-easy-before-release.png
125
+
126
+ To manually release both packages, run:
127
+
128
+ .. code-block:: bash
129
+
130
+ cd packages/pkg1
131
+ semantic-release version
132
+ # 1.0.1 (tag: pkg1-v1.0.1)
133
+
134
+ cd ../pkg2
135
+ semantic-release version
136
+ # 1.1.0 (tag: pkg2-v1.1.0)
137
+
138
+ After releasing both packages, the resulting Git history will look like:
139
+
140
+ .. image:: ./monorepos-ex-easy-post-release.png
141
+
142
+ .. seealso::
143
+
144
+ - :ref:`GitHub Actions with Monorepos <gh_actions-monorepo>`
145
+
146
+
147
+ Considerations
148
+ ''''''''''''''
149
+
150
+ 1. **Custom Changelogs**: Managing changelogs can be tricky depending on where you want to write the changelog files. In this simple example, the changelog is located within each package directory, and the changelog template does not have any package-specific formatting or naming convention. You can use one shared template directory at the root of the project and configure each package to point to the shared template directory.
151
+
152
+ .. code-block:: toml
153
+
154
+ # FILE: pkg1/pyproject.toml
155
+ [tool.semantic_release]
156
+ template_dir = "../../config/release-templates"
157
+
158
+ .. code-block:: toml
159
+
160
+ # FILE: pkg2/pyproject.toml
161
+ [tool.semantic_release]
162
+ template_dir = "../../config/release-templates"
163
+
164
+ .. code::
165
+
166
+ project/
167
+ ├── .git/
168
+ ├── config/
169
+ │ └── release-templates/
170
+ │ ├── CHANGELOG.md.j2
171
+ │ └── .release_notes.md.j2
172
+ ├── packages/
173
+ │ ├── pkg1/
174
+ │ │ ├── CHANGELOG.md
175
+ │ │ └── pyproject.toml
176
+ │ │
177
+ │ └── pkg2/
178
+ │ ├── CHANGELOG.md
179
+ │ └── pyproject.toml
180
+
181
+ ├── .gitignore
182
+ └── README.md
183
+
184
+ .. seealso::
185
+
186
+ - For situations with more complex documentation needs, see our :ref:`Advanced Example <monorepos-config-example_advanced>`.
187
+
188
+
189
+ 2. **Package Prereleases**: Creating pre-releases is possible, but it is recommended to use package-prefixed branch names to avoid collisions between packages. For example, to enable alpha pre-releases for new features in both packages, use the following configuration:
190
+
191
+ .. code-block:: toml
192
+
193
+ # FILE: pkg1/pyproject.toml
194
+ [tool.semantic_release.branches.alpha-release]
195
+ match = "^pkg1/feat/.+" # <-- note pkg1 prefix
196
+ prerelease = true
197
+ prerelease_token = "alpha"
198
+
199
+ .. code-block:: toml
200
+
201
+ # FILE: pkg2/pyproject.toml
202
+ [tool.semantic_release.branches.alpha-release]
203
+ match = "^pkg2/feat/.+" # <-- note pkg2 prefix
204
+ prerelease = true
205
+ prerelease_token = "alpha"
206
+
207
+ ----
208
+
209
+ .. _monorepos-config-example_advanced:
210
+
211
+ Example: Advanced
212
+ """""""""""""""""
213
+
214
+
215
+ If you want to consolidate documentation into a single top-level directory, the setup becomes more complex. In this example, there is a common documentation folder at the top level, and each package has its own subfolder within the documentation folder.
216
+
217
+ Due to naming conventions, PSR cannot automatically accomplish this with its default changelog templates. For this scenario, you must copy the internal PSR templates into a custom directory (even if you do not modify them) and add custom scripting to prepare for each release.
218
+
219
+ The directory structure looks like:
220
+
221
+ .. code::
222
+
223
+ project/
224
+ ├── .git/
225
+ ├── docs/
226
+ │ ├── source/
227
+ │ │ ├── pkg1/
228
+ │ │ │ ├── changelog.md
229
+ │ │ │ └── README.md
230
+ │ │ ├── pkg2/
231
+ │ │ │ ├── changelog.md
232
+ │ │ │ └── README.md
233
+ │ │ └── index.rst
234
+ │ │
235
+ │ └── templates/
236
+ │ ├── .base_changelog_template/
237
+ │ │ ├── components/
238
+ │ │ │ ├── changelog_header.md.j2
239
+ │ │ │ ├── changelog_init.md.j2
240
+ │ │ │ ├── changelog_update.md.j2
241
+ │ │ │ ├── changes.md.j2
242
+ │ │ │ ├── first_release.md.j2
243
+ │ │ │ ├── macros.md.j2
244
+ │ │ │ ├── unreleased_changes.md.j2
245
+ │ │ │ └── versioned_changes.md.j2
246
+ │ │ └── changelog.md.j2
247
+ │ ├── .gitignore
248
+ │ └── .release_notes.md.j2
249
+
250
+ ├── packages/
251
+ │ ├── pkg1/
252
+ │ │ ├── src/
253
+ │ │ │ └── pkg1/
254
+ │ │ │ ├── __init__.py
255
+ │ │ │ └── __main__.py
256
+ │ │ └── pyproject.toml
257
+ │ │
258
+ │ └── pkg2/
259
+ │ ├── src/
260
+ │ │ └── pkg2/
261
+ │ │ ├── __init__.py
262
+ │ │ └── __main__.py
263
+ │ └── pyproject.toml
264
+
265
+ └── scripts/
266
+ ├── release-pkg1.sh
267
+ └── release-pkg2.sh
268
+
269
+
270
+ Each package should point to the ``docs/templates/`` directory to use a common release notes template. PSR ignores hidden files and directories when searching for template files to create, allowing you to hide shared templates in the directory for use in your release setup script.
271
+
272
+ Here is our configuration file for package 1 (package 2 is similarly defined):
273
+
274
+ .. code-block:: toml
275
+
276
+ # FILE: pkg1/pyproject.toml
277
+ [project]
278
+ name = "pkg1"
279
+ version = "1.0.0"
280
+
281
+ [tool.semantic_release]
282
+ commit_parser = "conventional-monorepo"
283
+ commit_message = """\
284
+ chore(release): Release `pkg1@{version}`
285
+
286
+ Automatically generated by python-semantic-release
287
+ """
288
+ tag_format = "pkg1-v{version}"
289
+ version_toml = ["pyproject.toml:project.version"]
290
+
291
+ [tool.semantic_release.commit_parser_options]
292
+ path_filters = [
293
+ ".",
294
+ "../../../docs/source/pkg1/**",
295
+ ]
296
+ scope_prefix = "pkg1-"
297
+
298
+ [tool.semantic_release.changelog]
299
+ template_dir = "../../../docs/templates"
300
+ mode = "update"
301
+ exclude_commit_patterns = [
302
+ '''^chore(?:\([^)]*?\))?: .+''',
303
+ '''^ci(?:\([^)]*?\))?: .+''',
304
+ '''^refactor(?:\([^)]*?\))?: .+''',
305
+ '''^style(?:\([^)]*?\))?: .+''',
306
+ '''^test(?:\([^)]*?\))?: .+''',
307
+ '''^Initial [Cc]ommit''',
308
+ ]
309
+
310
+ [tool.semantic_release.changelog.default_templates]
311
+ # To enable update mode: this value must set here because the default is not the
312
+ # same as the default in the other package & must be the final destination filename
313
+ # for the changelog relative to this file
314
+ changelog_file = "../../../docs/source/pkg1/changelog.md"
315
+
316
+
317
+ Note: In this configuration, we added path filters for additional documentation files related to the package so that the changelog will include documentation changes as well.
318
+
319
+
320
+ Next, define a release script to set up the common changelog templates in the correct directory format so PSR will create the desired files at the proper locations. Following the :ref:`changelog-templates-template-rendering` reference, you must define the folder structure from the root of the project within the templates directory so PSR will properly lay down the files across the repository. The script cleans up any previous templates, dynamically creates the necessary directories, and copies over the shared templates into a package-named directory. Now you are prepared to run PSR for a release of ``pkg1``.
321
+
322
+ .. code-block:: bash
323
+
324
+ #!/bin/bash
325
+ # FILE: scripts/release-pkg1.sh
326
+
327
+ set -euo pipefail
328
+
329
+ PROJECT_ROOT="$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
330
+ VIRTUAL_ENV="$PROJECT_ROOT/.venv"
331
+
332
+ PACKAGE_NAME="pkg1"
333
+
334
+ cd "$PROJECT_ROOT" || exit 1
335
+
336
+ # Setup documentation template
337
+ pushd "docs/templates" >/dev/null || exit 1
338
+
339
+ rm -rf docs/
340
+ mkdir -p "docs/source/"
341
+ cp -r .base_changelog_template/ "docs/source/$PACKAGE_NAME"
342
+
343
+ popd >/dev/null || exit 1
344
+
345
+ # Release the package
346
+ pushd "packages/$PACKAGE_NAME" >/dev/null || exit 1
347
+
348
+ printf '%s\n' "Releasing $PACKAGE_NAME..."
349
+ "$VIRTUAL_ENV/bin/semantic-release" -v version --no-push
350
+
351
+ popd >/dev/null || exit 1
352
+
353
+
354
+ That's it! This example demonstrates how to set up a monorepo with shared changelog templates and a consolidated documentation folder for multiple packages.
355
+
356
+ .. seealso::
357
+
358
+ - Advanced Example Monorepo: `codejedi365/psr-monorepo-poweralpha <https://github.com/codejedi365/psr-monorepo-poweralpha>`_
@@ -176,7 +176,7 @@ look like this:
176
176
  id: version
177
177
  env:
178
178
  GH_TOKEN: "none"
179
- run: uv run semantic-release -v version --no-commit --no-tag
179
+ run: uv run semantic-release -v version --no-changelog --no-commit --no-tag
180
180
 
181
181
  - name: Upload | Distribution Artifacts
182
182
  if: ${{ steps.version.outputs.released == 'true' }}
@@ -796,6 +796,7 @@ within the Git repository.
796
796
  Built-in parsers:
797
797
  * ``angular`` - :ref:`AngularCommitParser <commit_parser-builtin-angular>` *(deprecated in v9.19.0)*
798
798
  * ``conventional`` - :ref:`ConventionalCommitParser <commit_parser-builtin-conventional>` *(available in v9.19.0+)*
799
+ * ``conventional-monorepo`` - :ref:`ConventionalCommitMonorepoParser <commit_parser-builtin-conventional-monorepo>` *(available in ${NEW_RELEASE_TAG}+)*
799
800
  * ``emoji`` - :ref:`EmojiCommitParser <commit_parser-builtin-emoji>`
800
801
  * ``scipy`` - :ref:`ScipyCommitParser <commit_parser-builtin-scipy>`
801
802
  * ``tag`` - :ref:`TagCommitParser <commit_parser-builtin-tag>` *(deprecated in v9.12.0)*
@@ -6,9 +6,9 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "10.3.1"
9
+ version = "10.4.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
- requires-python = ">=3.8"
11
+ requires-python = "~= 3.8"
12
12
  license = { text = "MIT" }
13
13
  classifiers = [
14
14
  "Programming Language :: Python",
@@ -21,6 +21,9 @@ docs/configuration/automatic-releases/github-actions.rst
21
21
  docs/configuration/automatic-releases/index.rst
22
22
  docs/configuration/automatic-releases/travis.rst
23
23
  docs/configuration/configuration-guides/index.rst
24
+ docs/configuration/configuration-guides/monorepos-ex-easy-before-release.png
25
+ docs/configuration/configuration-guides/monorepos-ex-easy-post-release.png
26
+ docs/configuration/configuration-guides/monorepos.rst
24
27
  docs/configuration/configuration-guides/uv_integration.rst
25
28
  docs/contributing/contributing_guide.rst
26
29
  docs/contributing/index.rst
@@ -60,12 +63,16 @@ src/semantic_release/cli/commands/version.py
60
63
  src/semantic_release/commit_parser/__init__.py
61
64
  src/semantic_release/commit_parser/_base.py
62
65
  src/semantic_release/commit_parser/angular.py
63
- src/semantic_release/commit_parser/conventional.py
64
66
  src/semantic_release/commit_parser/emoji.py
65
67
  src/semantic_release/commit_parser/scipy.py
66
68
  src/semantic_release/commit_parser/tag.py
67
69
  src/semantic_release/commit_parser/token.py
68
70
  src/semantic_release/commit_parser/util.py
71
+ src/semantic_release/commit_parser/conventional/__init__.py
72
+ src/semantic_release/commit_parser/conventional/options.py
73
+ src/semantic_release/commit_parser/conventional/options_monorepo.py
74
+ src/semantic_release/commit_parser/conventional/parser.py
75
+ src/semantic_release/commit_parser/conventional/parser_monorepo.py
69
76
  src/semantic_release/data/templates/conventional/md/.release_notes.md.j2
70
77
  src/semantic_release/data/templates/conventional/md/CHANGELOG.md.j2
71
78
  src/semantic_release/data/templates/conventional/md/.components/changelog_header.md.j2
@@ -143,16 +150,29 @@ tests/e2e/cmd_version/bump_version/github_flow/__init__.py
143
150
  tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py
144
151
  tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel_branch_update_merge.py
145
152
  tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py
153
+ tests/e2e/cmd_version/bump_version/github_flow_monorepo/__init__.py
154
+ tests/e2e/cmd_version/bump_version/github_flow_monorepo/test_monorepo_1_channel.py
155
+ tests/e2e/cmd_version/bump_version/github_flow_monorepo/test_monorepo_2_channels.py
146
156
  tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py
147
157
  tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py
148
158
  tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py
149
159
  tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py
150
160
  tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py
161
+ tests/e2e/cmd_version/bump_version/trunk_based_dev_monorepo/__init__.py
162
+ tests/e2e/cmd_version/bump_version/trunk_based_dev_monorepo/test_monorepo_trunk.py
151
163
  tests/fixtures/__init__.py
152
164
  tests/fixtures/commit_parsers.py
153
165
  tests/fixtures/example_project.py
154
166
  tests/fixtures/git_repo.py
155
167
  tests/fixtures/scipy.py
168
+ tests/fixtures/monorepos/__init__.py
169
+ tests/fixtures/monorepos/example_monorepo.py
170
+ tests/fixtures/monorepos/git_monorepo.py
171
+ tests/fixtures/monorepos/github_flow/__init__.py
172
+ tests/fixtures/monorepos/github_flow/monorepo_w_default_release.py
173
+ tests/fixtures/monorepos/github_flow/monorepo_w_release_channels.py
174
+ tests/fixtures/monorepos/trunk_based_dev/__init__.py
175
+ tests/fixtures/monorepos/trunk_based_dev/monorepo_w_tags.py
156
176
  tests/fixtures/repos/__init__.py
157
177
  tests/fixtures/repos/repo_initial_commit.py
158
178
  tests/fixtures/repos/git_flow/__init__.py