python-semantic-release 9.21.0__tar.gz → 10.0.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.
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/MANIFEST.in +7 -1
- {python_semantic_release-9.21.0/src/python_semantic_release.egg-info → python_semantic_release-10.0.0}/PKG-INFO +7 -7
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/api}/commands.rst +6 -5
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/concepts}/changelog_templates.rst +2 -2
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/concepts}/commit_parsing.rst +7 -2
- python_semantic_release-10.0.0/docs/concepts/getting_started.rst +391 -0
- python_semantic_release-10.0.0/docs/concepts/index.rst +17 -0
- python_semantic_release-10.0.0/docs/concepts/installation.rst +14 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/docs/conf.py +4 -2
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/configuration}/automatic-releases/cronjobs.rst +2 -2
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/configuration}/automatic-releases/github-actions.rst +280 -21
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/configuration}/automatic-releases/index.rst +2 -2
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/configuration}/automatic-releases/travis.rst +4 -2
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/configuration}/configuration.rst +15 -7
- python_semantic_release-10.0.0/docs/configuration/index.rst +18 -0
- python_semantic_release-10.0.0/docs/contributing/contributing_guide.rst +1 -0
- python_semantic_release-10.0.0/docs/contributing/index.rst +35 -0
- python_semantic_release-10.0.0/docs/index.rst +76 -0
- python_semantic_release-10.0.0/docs/misc/psr_changelog.rst +1 -0
- python_semantic_release-9.21.0/docs/migrating_from_v7.rst → python_semantic_release-10.0.0/docs/upgrading/08-upgrade.rst +37 -37
- python_semantic_release-10.0.0/docs/upgrading/09-upgrade.rst +11 -0
- python_semantic_release-10.0.0/docs/upgrading/10-upgrade.rst +189 -0
- python_semantic_release-10.0.0/docs/upgrading/index.rst +27 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/pyproject.toml +10 -8
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/python_semantic_release.egg-info/SOURCES.txt +41 -42
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/__init__.py +3 -1
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/changelog/release_history.py +11 -13
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/changelog/template.py +6 -7
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/changelog_writer.py +4 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/changelog.py +3 -6
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/main.py +21 -24
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/publish.py +2 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/version.py +20 -20
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/config.py +16 -18
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/github_actions_output.py +2 -4
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/masking_filter.py +11 -7
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/util.py +6 -8
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/angular.py +1 -4
- python_semantic_release-10.0.0/src/semantic_release/commit_parser/conventional.py +496 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/emoji.py +18 -23
- python_semantic_release-10.0.0/src/semantic_release/commit_parser/scipy.py +541 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/tag.py +1 -3
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/changes.md.j2 +1 -9
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/changes.rst.j2 +1 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/gitproject.py +2 -2
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/globals.py +10 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/helpers.py +9 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/_base.py +0 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/bitbucket.py +2 -6
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/gitea.py +20 -24
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/github.py +22 -26
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/gitlab.py +13 -20
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/remote_hvcs_base.py +14 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/util.py +2 -3
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/algorithm.py +3 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declaration.py +5 -6
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declarations/pattern.py +6 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declarations/toml.py +4 -7
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/translator.py +2 -4
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/version.py +6 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/conftest.py +46 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/const.py +1 -1
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_changelog/test_changelog.py +46 -82
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +3 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_changelog/test_changelog_parsing.py +3 -5
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_changelog/test_changelog_release_notes.py +8 -10
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_config/test_generate_config.py +10 -12
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_publish/test_publish.py +7 -9
- python_semantic_release-10.0.0/tests/e2e/cmd_version/bump_version/conftest.py +133 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +10 -24
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +10 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +10 -21
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +10 -41
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +10 -43
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version.py +14 -14
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_build.py +18 -72
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_bump.py +33 -32
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_changelog.py +161 -16
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +5 -8
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_github_actions.py +14 -13
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_print.py +147 -34
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_release_notes.py +18 -11
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_stamp.py +24 -26
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/test_version_strict.py +6 -6
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/conftest.py +6 -8
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/test_help.py +10 -11
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/test_main.py +21 -24
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/example_project.py +2 -2
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/git_repo.py +46 -54
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +20 -19
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +23 -22
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +26 -25
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +23 -22
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +11 -10
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +14 -13
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/repo_initial_commit.py +4 -3
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +13 -12
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +15 -14
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +91 -6
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +13 -12
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +10 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/scipy.py +3 -3
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +9 -9
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_release_history.py +9 -7
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_release_notes.py +15 -15
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/test_conventional.py +9 -23
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +12 -38
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +397 -173
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +23 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_gitea.py +23 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_github.py +23 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +23 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +9 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/util.py +2 -3
- python_semantic_release-9.21.0/AUTHORS.rst +0 -7
- python_semantic_release-9.21.0/PKG-INFO +0 -92
- python_semantic_release-9.21.0/docs/algorithm.rst +0 -205
- python_semantic_release-9.21.0/docs/contributing.rst +0 -1
- python_semantic_release-9.21.0/docs/contributors.rst +0 -1
- python_semantic_release-9.21.0/docs/index.rst +0 -251
- python_semantic_release-9.21.0/docs/psr_changelog.rst +0 -1
- python_semantic_release-9.21.0/src/python_semantic_release.egg-info/dependency_links.txt +0 -1
- python_semantic_release-9.21.0/src/python_semantic_release.egg-info/entry_points.txt +0 -4
- python_semantic_release-9.21.0/src/python_semantic_release.egg-info/requires.txt +0 -51
- python_semantic_release-9.21.0/src/python_semantic_release.egg-info/top_level.txt +0 -1
- python_semantic_release-9.21.0/src/semantic_release/commit_parser/conventional.py +0 -31
- python_semantic_release-9.21.0/src/semantic_release/commit_parser/scipy.py +0 -166
- python_semantic_release-9.21.0/tests/e2e/cmd_version/bump_version/conftest.py +0 -60
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/LICENSE +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/README.rst +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/docs/Makefile +0 -0
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/concepts}/multibranch_releases.rst +0 -0
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/concepts}/strict_mode.rst +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/docs/make.bat +0 -0
- {python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/misc}/troubleshooting.rst +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/setup.cfg +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/cli/const.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/const.py +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/changelog_header.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/changelog_init.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/changelog_update.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/first_release.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/macros.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/unreleased_changes.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.components/versioned_changes.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/.release_notes.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/md/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/changelog_header.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/changelog_init.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/changelog_update.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/first_release.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/macros.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/unreleased_changes.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/.components/versioned_changes.rst.j2 +0 -0
- {python_semantic_release-9.21.0/src/semantic_release/data/templates/angular → python_semantic_release-10.0.0/src/semantic_release/data/templates/conventional}/rst/CHANGELOG.rst.j2 +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/enums.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/errors.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/py.typed +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declarations/enum.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/src/semantic_release/version/declarations/i_version_replacer.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_config/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_publish/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/conftest.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/declarations/test_toml_declaration.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.21.0 → python_semantic_release-10.0.0}/tests/unit/semantic_release/version/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version:
|
|
3
|
+
Version: 10.0.0
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -20,18 +20,17 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
20
20
|
Requires-Python: >=3.8
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
|
|
24
|
-
Requires-Dist: click~=8.0
|
|
23
|
+
Requires-Dist: click~=8.1.0
|
|
25
24
|
Requires-Dist: click-option-group~=0.5
|
|
26
25
|
Requires-Dist: gitpython~=3.0
|
|
27
26
|
Requires-Dist: requests~=2.25
|
|
28
27
|
Requires-Dist: jinja2~=3.1
|
|
29
|
-
Requires-Dist: python-gitlab
|
|
28
|
+
Requires-Dist: python-gitlab<6.0.0,>=4.0.0
|
|
30
29
|
Requires-Dist: tomlkit~=0.11
|
|
31
30
|
Requires-Dist: dotty-dict~=1.3
|
|
32
31
|
Requires-Dist: importlib-resources~=6.0
|
|
33
32
|
Requires-Dist: pydantic~=2.0
|
|
34
|
-
Requires-Dist: rich~=
|
|
33
|
+
Requires-Dist: rich~=14.0
|
|
35
34
|
Requires-Dist: shellingham~=1.5
|
|
36
35
|
Requires-Dist: Deprecated~=1.2
|
|
37
36
|
Provides-Extra: build
|
|
@@ -49,7 +48,7 @@ Requires-Dist: freezegun~=1.5; extra == "test"
|
|
|
49
48
|
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
50
49
|
Requires-Dist: pytest~=8.3; extra == "test"
|
|
51
50
|
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
52
|
-
Requires-Dist: pytest-cov
|
|
51
|
+
Requires-Dist: pytest-cov<7.0.0,>=5.0.0; extra == "test"
|
|
53
52
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
54
53
|
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
55
54
|
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
@@ -67,6 +66,7 @@ Requires-Dist: mypy==1.15.0; extra == "mypy"
|
|
|
67
66
|
Requires-Dist: types-Deprecated~=1.2; extra == "mypy"
|
|
68
67
|
Requires-Dist: types-requests~=2.32.0; extra == "mypy"
|
|
69
68
|
Requires-Dist: types-pyyaml~=6.0; extra == "mypy"
|
|
69
|
+
Dynamic: license-file
|
|
70
70
|
|
|
71
71
|
Python Semantic Release
|
|
72
72
|
***********************
|
{python_semantic_release-9.21.0/docs → python_semantic_release-10.0.0/docs/api}/commands.rst
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.. _commands:
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Command Line Interface (CLI)
|
|
4
|
+
============================
|
|
5
5
|
|
|
6
6
|
All commands accept a ``-h/--help`` option, which displays the help text for the
|
|
7
7
|
command and exits immediately.
|
|
@@ -23,10 +23,11 @@ Correct::
|
|
|
23
23
|
semantic-release -vv --noop version --print
|
|
24
24
|
|
|
25
25
|
With the exception of :ref:`cmd-main` and :ref:`cmd-generate-config`, all
|
|
26
|
-
commands require that you have set up your project's configuration.
|
|
27
|
-
this step, :ref:`cmd-generate-config` can create the default configuration for you,
|
|
28
|
-
which will allow you to tweak it to your needs rather than write it from scratch.
|
|
26
|
+
commands require that you have set up your project's configuration.
|
|
29
27
|
|
|
28
|
+
To help with setting up your project configuration, :ref:`cmd-generate-config`
|
|
29
|
+
will print out the default configuration to the console, which
|
|
30
|
+
you can then modify it to match your project & environment.
|
|
30
31
|
|
|
31
32
|
.. _cmd-main:
|
|
32
33
|
|
|
@@ -248,7 +248,7 @@ Configuration Examples
|
|
|
248
248
|
|
|
249
249
|
If identified or supported by the parser, the default changelog templates will include
|
|
250
250
|
a separate section of breaking changes and additional release information. Refer to the
|
|
251
|
-
:ref:`commit parsing <
|
|
251
|
+
:ref:`commit parsing <commit_parsing>` section to see how to write commit messages that
|
|
252
252
|
will be properly parsed and displayed in these sections.
|
|
253
253
|
|
|
254
254
|
|
|
@@ -331,7 +331,7 @@ be copied to its target location without being rendered by the template engine.
|
|
|
331
331
|
When initially starting out at customizing your own changelog templates, you
|
|
332
332
|
should reference the default template embedded within PSR. The template directory
|
|
333
333
|
is located at ``data/templates/`` within the PSR package. Within our templates
|
|
334
|
-
directory we separate out each type of commit parser (e.g.
|
|
334
|
+
directory we separate out each type of commit parser (e.g. conventional) and the
|
|
335
335
|
content format type (e.g. markdown). You can copy this directory to your
|
|
336
336
|
repository's templates directory and then customize the templates to your liking.
|
|
337
337
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
..
|
|
1
|
+
.. _commit_parsing:
|
|
2
2
|
|
|
3
3
|
Commit Parsing
|
|
4
4
|
==============
|
|
@@ -294,6 +294,11 @@ Guidelines`_ with all different commit types. Because of this small variance, th
|
|
|
294
294
|
only extends our :ref:`commit_parser-builtin-angular` parser with pre-defined scipy commit types
|
|
295
295
|
in the default Scipy Parser Options and all other features are inherited.
|
|
296
296
|
|
|
297
|
+
**Limitations**:
|
|
298
|
+
|
|
299
|
+
- Commits with the ``REV`` type are not currently supported. Track the implementation
|
|
300
|
+
of this feature in the issue `#402`_.
|
|
301
|
+
|
|
297
302
|
If no commit parser options are provided via the configuration, the parser will use PSR's
|
|
298
303
|
built-in :py:class:`defaults <semantic_release.commit_parser.scipy.ScipyParserOptions>`.
|
|
299
304
|
|
|
@@ -636,7 +641,7 @@ should inherit from the
|
|
|
636
641
|
The "options" class is used to validate the options which are configured in the repository,
|
|
637
642
|
and to provide default values for these options where appropriate.
|
|
638
643
|
|
|
639
|
-
..
|
|
644
|
+
.. _commit_parsing-commit-parsers:
|
|
640
645
|
|
|
641
646
|
Commit Parsers
|
|
642
647
|
""""""""""""""
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
.. _getting-started-guide:
|
|
2
|
+
|
|
3
|
+
Getting Started
|
|
4
|
+
===============
|
|
5
|
+
|
|
6
|
+
If you haven't done so already, install Python Semantic Release locally following the
|
|
7
|
+
:ref:`installation instructions <installation>`.
|
|
8
|
+
|
|
9
|
+
If you are using a CI/CD service, you may not have to add Python Semantic Release to your
|
|
10
|
+
project's dependencies permanently, but for the duration of this guide for the initial
|
|
11
|
+
setup, you will need to have it installed locally.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Configuring PSR
|
|
15
|
+
---------------
|
|
16
|
+
|
|
17
|
+
Python Semantic Release ships with a reasonable default configuration but some aspects **MUST** be
|
|
18
|
+
customized to your project. To view the default configuration, run the following command:
|
|
19
|
+
|
|
20
|
+
.. code-block:: bash
|
|
21
|
+
|
|
22
|
+
semantic-release generate-config
|
|
23
|
+
|
|
24
|
+
The output of the above command is the default configuration in TOML format without any modifications.
|
|
25
|
+
If this is fine for your project, then you do not need to configure anything else.
|
|
26
|
+
|
|
27
|
+
PSR accepts overrides to the default configuration keys individually. If you don't define the
|
|
28
|
+
key-value pair in your configuration file, the default value will be used.
|
|
29
|
+
|
|
30
|
+
By default, Python Semantic Release will look for configuration overrides in ``pyproject.toml`` under
|
|
31
|
+
the TOML table ``[tool.semantic_release]``. You may specify a different file using the
|
|
32
|
+
``-c/--config`` option, for example:
|
|
33
|
+
|
|
34
|
+
.. code-block:: bash
|
|
35
|
+
|
|
36
|
+
# In TOML format with top level table [semantic_release]
|
|
37
|
+
semantic-release -c releaserc.toml
|
|
38
|
+
|
|
39
|
+
# In JSON format with top level object key {"semantic_release": {}}
|
|
40
|
+
semantic-release -c releaserc.json
|
|
41
|
+
|
|
42
|
+
The easiest way to get started is to output the default configuration to a file,
|
|
43
|
+
delete keys you do not need to override, and then edit the remaining keys to suit your project.
|
|
44
|
+
|
|
45
|
+
To set up in ``pyproject.toml``, run the following command:
|
|
46
|
+
|
|
47
|
+
.. code-block:: bash
|
|
48
|
+
|
|
49
|
+
# In file redirect in bash
|
|
50
|
+
semantic-release generate-config --pyproject >> pyproject.toml
|
|
51
|
+
|
|
52
|
+
# Open your editor to edit the configuration
|
|
53
|
+
vim pyproject.toml
|
|
54
|
+
|
|
55
|
+
.. seealso::
|
|
56
|
+
- :ref:`cmd-generate-config`
|
|
57
|
+
- :ref:`configuration`
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Configuring the Version Stamp Feature
|
|
61
|
+
'''''''''''''''''''''''''''''''''''''
|
|
62
|
+
|
|
63
|
+
One of the best features of Python Semantic Release is the ability to automatically stamp the
|
|
64
|
+
new version number into your project files, so you don't have to manually update the version upon
|
|
65
|
+
each release. The version that is stamped is automatically determined by Python Semantic Release
|
|
66
|
+
from your commit messages which compliments automated versioning seamlessly.
|
|
67
|
+
|
|
68
|
+
The most crucial version stamp is the one in your project metadata, which is used by
|
|
69
|
+
the Python Package Index (PyPI) and other package managers to identify the version of your package.
|
|
70
|
+
|
|
71
|
+
For Python projects, this is typically the ``version`` field in your ``pyproject.toml`` file. First,
|
|
72
|
+
set up your project metadata with the base ``version`` value. If you are starting with a brand new project,
|
|
73
|
+
set ``project.version = "0.0.0"``. If you are working on an existing project, set it to the last
|
|
74
|
+
version number you released. Do not include any ``v`` prefix.
|
|
75
|
+
|
|
76
|
+
.. important::
|
|
77
|
+
The version number must be a valid SemVer version, which means it should follow the format
|
|
78
|
+
``MAJOR.MINOR.PATCH`` (e.g., ``1.0.0``). Python Semantic Release does NOT support Canonical
|
|
79
|
+
version values defined in the `PEP 440`_ specification at this time. See
|
|
80
|
+
`Issue #455 <https://github.com/python-semantic-release/python-semantic-release/issues/455>`_
|
|
81
|
+
for more details. Note that you can still define a SemVer version in the ``project.version``
|
|
82
|
+
field, and when your build is generated, the build tool will automatically generate a PEP 440
|
|
83
|
+
compliant version as long as you do **NOT** use a non-pep440 compliant pre-release token.
|
|
84
|
+
|
|
85
|
+
.. _PEP 440: https://peps.python.org/pep-0440/
|
|
86
|
+
|
|
87
|
+
Your project metadata might look like this in ``pyproject.toml``::
|
|
88
|
+
|
|
89
|
+
[project]
|
|
90
|
+
name = "my-package"
|
|
91
|
+
version = "0.0.0" # Set this to the last released version or "0.0.0" for new projects
|
|
92
|
+
description = "A sample Python package"
|
|
93
|
+
|
|
94
|
+
To configure PSR to automatically update this version number, you need to specify the file and value
|
|
95
|
+
to update in your configuration. Since ``pyproject.toml`` uses TOML format, you will add the
|
|
96
|
+
replacement specification to the ``tool.semantic_release.version_toml`` list. Update the following
|
|
97
|
+
configuration in your ``pyproject.toml`` file to include the version variable location:
|
|
98
|
+
|
|
99
|
+
.. code-block:: toml
|
|
100
|
+
|
|
101
|
+
[tool.semantic_release]
|
|
102
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
103
|
+
|
|
104
|
+
# Alternatively, if you are using poetry's 'version' key, then you would use:
|
|
105
|
+
version_toml = ["pyproject.toml:tool.poetry.version"]
|
|
106
|
+
|
|
107
|
+
If you have other TOML files where you want to stamp the version, you can add them to the
|
|
108
|
+
``version_toml`` list as well. In the above example, there is an implicit assumption that
|
|
109
|
+
you only want the version as the raw number format. If you want to specify the full tag
|
|
110
|
+
value (e.g. v-prefixed version), then include ``:tf`` for "tag format" at the end of the
|
|
111
|
+
version variable specification.
|
|
112
|
+
|
|
113
|
+
For non-TOML formatted files (such as JSON or YAML files), you can use the
|
|
114
|
+
:ref:`config-version_variables` configuration key instead. This feature uses an advanced
|
|
115
|
+
Regular Expression to find and replace the version variable in the specified files.
|
|
116
|
+
|
|
117
|
+
For Python files, its much more effective to use ``importlib`` instead which will allow you to
|
|
118
|
+
dynamically import the version from your package metadata and not require your project to commit
|
|
119
|
+
the version number bump to the repository. For example, in your package's base ``__init__.py``
|
|
120
|
+
|
|
121
|
+
.. code-block:: python
|
|
122
|
+
|
|
123
|
+
# my_package/__init__.py
|
|
124
|
+
from importlib.metadata import version as get_version
|
|
125
|
+
|
|
126
|
+
__version__ = get_version(__package__)
|
|
127
|
+
# Note: __package__ must match your 'project.name' as defined in pyproject.toml
|
|
128
|
+
|
|
129
|
+
.. seealso::
|
|
130
|
+
- Configuration specification of :ref:`config-version_toml`
|
|
131
|
+
- Configuration specification of :ref:`config-version_variables`
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
Using PSR to Build your Project
|
|
135
|
+
'''''''''''''''''''''''''''''''
|
|
136
|
+
|
|
137
|
+
PSR provides a convenient way to build your project artifacts as part of the versioning process
|
|
138
|
+
now that you have stamped the version into your project files. To enable this, you will need
|
|
139
|
+
to specify the build command in your configuration. This command will be executed after
|
|
140
|
+
the next version has been determined, and stamped into your files but before a release tag has
|
|
141
|
+
been created.
|
|
142
|
+
|
|
143
|
+
To set up the build command, add the following to your ``pyproject.toml`` file:
|
|
144
|
+
|
|
145
|
+
.. code-block:: toml
|
|
146
|
+
|
|
147
|
+
[tool.semantic_release]
|
|
148
|
+
build_command = "python -m build --sdist --wheel ."
|
|
149
|
+
|
|
150
|
+
.. seealso::
|
|
151
|
+
- :ref:`config-build_command` - Configuration specification for the build command.
|
|
152
|
+
- :ref:`config-build_command_env` - Configuration specification for the build command environment variables.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
Choosing a Commit Message Parser
|
|
156
|
+
''''''''''''''''''''''''''''''''
|
|
157
|
+
|
|
158
|
+
PSR uses commit messages to determine the type of version bump that should be applied
|
|
159
|
+
to your project. PSR supports multiple commit message parsing styles, allowing you to choose
|
|
160
|
+
the one that best fits your project's needs. Choose **one** of the supported commit parsers
|
|
161
|
+
defined in :ref:`commit_parsing`, or provide your own and configure it in your
|
|
162
|
+
``pyproject.toml`` file.
|
|
163
|
+
|
|
164
|
+
Each commit parser has its own default configuration options so if you want to customize the parser
|
|
165
|
+
behavior, you will need to specify the parser options you want to override.
|
|
166
|
+
|
|
167
|
+
.. code-block:: toml
|
|
168
|
+
|
|
169
|
+
[tool.semantic_release]
|
|
170
|
+
commit_parser = "conventional"
|
|
171
|
+
|
|
172
|
+
[tool.semantic_release.commit_parser_options]
|
|
173
|
+
minor_tags = ["feat"]
|
|
174
|
+
patch_tags = ["fix", "perf"]
|
|
175
|
+
parse_squash_commits = true
|
|
176
|
+
ignore_merge_commits = true
|
|
177
|
+
|
|
178
|
+
.. important::
|
|
179
|
+
Python Semantic Release does not currently support Monorepo projects. You will need to provide
|
|
180
|
+
a custom commit parser that is built for Monorepos. Follow the Monorepo-support progress in
|
|
181
|
+
`Issue #168 <https://github.com/python-semantic-release/python-semantic-release/issues/168>`_,
|
|
182
|
+
`Issue #614 <https://github.com/python-semantic-release/python-semantic-release/issues/614>`_,
|
|
183
|
+
and `PR #1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>`_.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
Choosing your Changelog
|
|
187
|
+
'''''''''''''''''''''''
|
|
188
|
+
|
|
189
|
+
Prior to creating a release, PSR will generate a changelog from the commit messages of your
|
|
190
|
+
project. The changelog is extremely customizable from the format to the content of each section.
|
|
191
|
+
PSR ships with a default changelog template that will be used if you do not provide custom
|
|
192
|
+
templates. The default should be sufficient for most projects and has its own set of configuration
|
|
193
|
+
options.
|
|
194
|
+
|
|
195
|
+
For basic customization, you can choose either an traditional Markdown formatted changelog (default)
|
|
196
|
+
or if you want to integrate with a Sphinx Documentation project, you can use the
|
|
197
|
+
reStructuredText (RST) format. You can also choose the file name and location of where to write the
|
|
198
|
+
default changelog.
|
|
199
|
+
|
|
200
|
+
To set your changelog location and changelog format, add the following to your ``pyproject.toml`` file:
|
|
201
|
+
|
|
202
|
+
.. code-block:: toml
|
|
203
|
+
|
|
204
|
+
[tool.semantic_release.changelog.default_templates]
|
|
205
|
+
changelog_file = "docs/source/CHANGELOG.rst"
|
|
206
|
+
output_format = "rst" # or "md" for Markdown format
|
|
207
|
+
|
|
208
|
+
Secondly, the more important aspect of configuring your changelog is to define Commit Exclusion
|
|
209
|
+
Patterns or patterns that will be used to filter out commits from the changelog. PSR does **NOT** (yet)
|
|
210
|
+
come with a built-in set of exclusion patterns, so you will need to define them yourself. These commit
|
|
211
|
+
patterns should be in line with your project's commit parser configuration.
|
|
212
|
+
|
|
213
|
+
To set commit exclusion patterns for a conventional commits parsers, add the following to your
|
|
214
|
+
``pyproject.toml`` file:
|
|
215
|
+
|
|
216
|
+
.. code-block:: toml
|
|
217
|
+
|
|
218
|
+
[tool.semantic_release.changelog.exclude_commit_patterns]
|
|
219
|
+
# Recommended patterns for conventional commits parser that is scope aware
|
|
220
|
+
exclude_commit_patterns = [
|
|
221
|
+
'''chore(?:\([^)]*?\))?: .+''',
|
|
222
|
+
'''ci(?:\([^)]*?\))?: .+''',
|
|
223
|
+
'''refactor(?:\([^)]*?\))?: .+''',
|
|
224
|
+
'''style(?:\([^)]*?\))?: .+''',
|
|
225
|
+
'''test(?:\([^)]*?\))?: .+''',
|
|
226
|
+
'''build\((?!deps\): .+)''',
|
|
227
|
+
'''Initial [Cc]ommit.*''',
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
.. seealso::
|
|
231
|
+
- :ref:`Changelog <config-changelog>` - Customize your changelog
|
|
232
|
+
- :ref:`changelog.mode <config-changelog-mode>` - Choose the changelog mode ('update' or 'init')
|
|
233
|
+
- :ref:`changelog-templates-migrating-existing-changelog`
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
Defining your Release Branches
|
|
237
|
+
''''''''''''''''''''''''''''''
|
|
238
|
+
|
|
239
|
+
PSR provides a powerful feature to manage release types across multiple branches which can
|
|
240
|
+
allow you to configure your project to have different release branches for different purposes,
|
|
241
|
+
such as pre-release branches, beta branches, and your stable releases.
|
|
242
|
+
|
|
243
|
+
.. note::
|
|
244
|
+
Most projects that do **NOT** publish pre-releases will be fine with PSR's built-in default.
|
|
245
|
+
|
|
246
|
+
To define an alpha pre-release branch when you are working on a fix or new feature, you can
|
|
247
|
+
add the following to your ``pyproject.toml`` file:
|
|
248
|
+
|
|
249
|
+
.. code-block:: toml
|
|
250
|
+
|
|
251
|
+
[tool.semantic_release.branches.alpha]
|
|
252
|
+
# Matches branches with the prefixes 'feat/', 'fix/', or 'perf/'.
|
|
253
|
+
match = "^(feat|fix|perf)/.+"
|
|
254
|
+
prerelease = true
|
|
255
|
+
prerelease_token = "alpha"
|
|
256
|
+
|
|
257
|
+
Any time you execute ``semantic-release version`` on a branch with the prefix
|
|
258
|
+
``feat/``, ``fix/``, or ``perf/``, PSR will determine if a version bump is needed and if so,
|
|
259
|
+
the resulting version will be a pre-release version with the ``alpha`` token. For example,
|
|
260
|
+
|
|
261
|
+
+-----------+--------------+-----------------+-------------------+
|
|
262
|
+
| Branch | Version Bump | Current Version | Next Version |
|
|
263
|
+
+===========+==============+=================+===================+
|
|
264
|
+
| main | Patch | ``1.0.0`` | ``1.0.1`` |
|
|
265
|
+
+-----------+--------------+-----------------+-------------------+
|
|
266
|
+
| fix/bug-1 | Patch | ``1.0.0`` | ``1.0.1-alpha.1`` |
|
|
267
|
+
+-----------+--------------+-----------------+-------------------+
|
|
268
|
+
|
|
269
|
+
.. seealso::
|
|
270
|
+
- :ref:`multibranch-releases` - Learn about multi-branch releases and how to configure them.
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
Configuring VCS Releases
|
|
274
|
+
''''''''''''''''''''''''
|
|
275
|
+
|
|
276
|
+
You can set up Python Semantic Release to create Releases in your remote version
|
|
277
|
+
control system, so you can publish assets and release notes for your project.
|
|
278
|
+
|
|
279
|
+
In order to do so, you will need to place an authentication token in the
|
|
280
|
+
appropriate environment variable so that Python Semantic Release can authenticate
|
|
281
|
+
with the remote VCS to push tags, create releases, or upload files.
|
|
282
|
+
|
|
283
|
+
GitHub (``GH_TOKEN``)
|
|
284
|
+
"""""""""""""""""""""
|
|
285
|
+
|
|
286
|
+
For local publishing to GitHub, you should use a personal access token and
|
|
287
|
+
store it in your environment variables. Specify the name of the environment
|
|
288
|
+
variable in your configuration setting :ref:`remote.token <config-remote-token>`.
|
|
289
|
+
The default is ``GH_TOKEN``.
|
|
290
|
+
|
|
291
|
+
To generate a token go to https://github.com/settings/tokens and click on
|
|
292
|
+
"Generate new token".
|
|
293
|
+
|
|
294
|
+
For Personal Access Token (classic), you will need the ``repo`` scope to write
|
|
295
|
+
(ie. push) to the repository.
|
|
296
|
+
|
|
297
|
+
For fine-grained Personal Access Tokens, you will need the `contents`__
|
|
298
|
+
permission.
|
|
299
|
+
|
|
300
|
+
__ https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens#repository-permissions-for-contents
|
|
301
|
+
|
|
302
|
+
GitLab (``GITLAB_TOKEN``)
|
|
303
|
+
"""""""""""""""""""""""""
|
|
304
|
+
|
|
305
|
+
A personal access token from GitLab. This is used for authenticating when pushing
|
|
306
|
+
tags, publishing releases etc. This token should be stored in the ``GITLAB_TOKEN``
|
|
307
|
+
environment variable.
|
|
308
|
+
|
|
309
|
+
Gitea (``GITEA_TOKEN``)
|
|
310
|
+
"""""""""""""""""""""""
|
|
311
|
+
|
|
312
|
+
A personal access token from Gitea. This token should be stored in the ``GITEA_TOKEN``
|
|
313
|
+
environment variable.
|
|
314
|
+
|
|
315
|
+
Bitbucket (``BITBUCKET_TOKEN``)
|
|
316
|
+
"""""""""""""""""""""""""""""""
|
|
317
|
+
|
|
318
|
+
Bitbucket does not support uploading releases but can still benefit from automated tags
|
|
319
|
+
and changelogs. The user has three options to push changes to the repository:
|
|
320
|
+
|
|
321
|
+
#. Use SSH keys.
|
|
322
|
+
|
|
323
|
+
#. Use an `App Secret`_, store the secret in the ``BITBUCKET_TOKEN`` environment variable
|
|
324
|
+
and the username in ``BITBUCKET_USER``.
|
|
325
|
+
|
|
326
|
+
#. Use an `Access Token`_ for the repository and store it in the ``BITBUCKET_TOKEN``
|
|
327
|
+
environment variable.
|
|
328
|
+
|
|
329
|
+
.. _App Secret: https://support.atlassian.com/bitbucket-cloud/docs/push-back-to-your-repository/#App-secret
|
|
330
|
+
.. _Access Token: https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens
|
|
331
|
+
|
|
332
|
+
.. seealso::
|
|
333
|
+
- :ref:`Changelog <config-changelog>` - customize your project's changelog.
|
|
334
|
+
|
|
335
|
+
- :ref:`changelog-templates-custom_release_notes` - customize the published release notes
|
|
336
|
+
|
|
337
|
+
- :ref:`version --vcs-release/--no-vcs-release <cmd-version-option-vcs-release>` - enable/disable VCS release
|
|
338
|
+
creation.
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
Testing your Configuration
|
|
342
|
+
--------------------------
|
|
343
|
+
|
|
344
|
+
It's time to test your configuration!
|
|
345
|
+
|
|
346
|
+
.. code-block:: bash
|
|
347
|
+
|
|
348
|
+
# 1. Run the command in no-operation mode to see what would happen
|
|
349
|
+
semantic-release -v --noop version
|
|
350
|
+
|
|
351
|
+
# 2. If the output looks reasonable, try to run the command without any history changes
|
|
352
|
+
# '-vv' will give you verbose debug output, which is useful for troubleshooting
|
|
353
|
+
# commit parsing issues.
|
|
354
|
+
semantic-release -vv version --no-commit --no-tag
|
|
355
|
+
|
|
356
|
+
# 3. Evaluate your repository to see the changes that were made but not committed
|
|
357
|
+
# - Check the version number in your pyproject.toml
|
|
358
|
+
# - Check the distribution files from the build command
|
|
359
|
+
# - Check the changelog file for the new release notes
|
|
360
|
+
|
|
361
|
+
# 4. If everything looks good, make sure to commit/save your configuration changes
|
|
362
|
+
git add pyproject.toml
|
|
363
|
+
git commit -m "chore(config): configure Python Semantic Release"
|
|
364
|
+
|
|
365
|
+
# 5. Now, try to run the release command with your history changes but without pushing
|
|
366
|
+
semantic-release -v version --no-push --no-vcs-release
|
|
367
|
+
|
|
368
|
+
# 6. Check the result on your local repository
|
|
369
|
+
git status
|
|
370
|
+
git log --graph --decorate --all
|
|
371
|
+
|
|
372
|
+
# 7a. If you are happy with the release history and resulting commit & tag,
|
|
373
|
+
# reverse your changes before trying the full release command.
|
|
374
|
+
git tag -d v0.0.1 # replace with the actual version you released
|
|
375
|
+
git reset --hard HEAD~1
|
|
376
|
+
|
|
377
|
+
# 7b. [Optional] Once you have configured a remote VCS token, try
|
|
378
|
+
# running the full release command to update the remote repository.
|
|
379
|
+
semantic-release version --push --vcs-release
|
|
380
|
+
# This is optional as you may not want a personal access token set up or make
|
|
381
|
+
# make the release permanent yet.
|
|
382
|
+
|
|
383
|
+
.. seealso::
|
|
384
|
+
- :ref:`cmd-version`
|
|
385
|
+
- :ref:`troubleshooting-verbosity`
|
|
386
|
+
|
|
387
|
+
Configuring CI/CD
|
|
388
|
+
-----------------
|
|
389
|
+
|
|
390
|
+
PSR is meant to help you release at speed! See our CI/CD Configuration guides under the
|
|
391
|
+
:ref:`automatic` section.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.. _concepts:
|
|
2
|
+
|
|
3
|
+
Concepts
|
|
4
|
+
========
|
|
5
|
+
|
|
6
|
+
This section covers the core concepts of Python Semantic Release and how it
|
|
7
|
+
works. Understanding these concepts will help you effectively use Python
|
|
8
|
+
Semantic Release in your projects.
|
|
9
|
+
|
|
10
|
+
.. toctree::
|
|
11
|
+
:maxdepth: 1
|
|
12
|
+
|
|
13
|
+
getting_started
|
|
14
|
+
commit_parsing
|
|
15
|
+
changelog_templates
|
|
16
|
+
multibranch_releases
|
|
17
|
+
strict_mode
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.. _installation:
|
|
2
|
+
|
|
3
|
+
Installation
|
|
4
|
+
============
|
|
5
|
+
|
|
6
|
+
.. code-block:: bash
|
|
7
|
+
|
|
8
|
+
python3 -m pip install python-semantic-release
|
|
9
|
+
semantic-release --help
|
|
10
|
+
|
|
11
|
+
Python Semantic Release is also available from `conda-forge`_ or as a
|
|
12
|
+
:ref:`GitHub Action <gh_actions>`.
|
|
13
|
+
|
|
14
|
+
.. _conda-forge: https://anaconda.org/conda-forge/python-semantic-release
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
|
+
from datetime import datetime, timezone
|
|
3
4
|
|
|
4
5
|
sys.path.insert(0, os.path.abspath("."))
|
|
5
6
|
sys.path.insert(0, os.path.abspath(".."))
|
|
@@ -24,7 +25,8 @@ templates_path = ["_templates"]
|
|
|
24
25
|
source_suffix = ".rst"
|
|
25
26
|
master_doc = "index"
|
|
26
27
|
project = "python-semantic-release"
|
|
27
|
-
|
|
28
|
+
current_year = datetime.now(timezone.utc).astimezone().year
|
|
29
|
+
copyright = f"{current_year}, {author_name}" # noqa: A001
|
|
28
30
|
|
|
29
31
|
version = semantic_release.__version__
|
|
30
32
|
release = semantic_release.__version__
|
|
@@ -39,7 +41,7 @@ htmlhelp_basename = "python-semantic-releasedoc"
|
|
|
39
41
|
# -- Automatically run sphinx-apidoc --------------------------------------
|
|
40
42
|
|
|
41
43
|
docs_path = os.path.dirname(__file__)
|
|
42
|
-
apidoc_output_dir = os.path.join(docs_path, "api")
|
|
44
|
+
apidoc_output_dir = os.path.join(docs_path, "api", "modules")
|
|
43
45
|
apidoc_module_dir = os.path.join(docs_path, "..", "src")
|
|
44
46
|
apidoc_separate_modules = True
|
|
45
47
|
apidoc_module_first = True
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.. _cronjobs:
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Cron Job Publishing
|
|
4
|
+
===================
|
|
5
5
|
|
|
6
6
|
This is for you if for some reason you cannot publish from your CI or you would like releases to
|
|
7
7
|
drop at a certain interval. Before you start, answer this: Are you sure you do not want a CI to
|