python-semantic-release 9.11.1__tar.gz → 9.12.1__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.11.1/python_semantic_release.egg-info → python_semantic_release-9.12.1}/PKG-INFO +6 -5
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/automatic-releases/github-actions.rst +5 -5
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/changelog_templates.rst +26 -7
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/commit-parsing.rst +3 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/configuration.rst +1 -1
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/pyproject.toml +12 -5
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1/python_semantic_release.egg-info}/PKG-INFO +6 -5
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/SOURCES.txt +52 -42
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/requires.txt +5 -4
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/changelog/context.py +54 -1
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/changelog/release_history.py +45 -26
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/changelog_writer.py +14 -5
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/main.py +1 -1
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/version.py +0 -11
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/config.py +16 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/const.py +1 -1
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/angular.py +69 -42
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/emoji.py +11 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/scipy.py +12 -10
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/tag.py +9 -5
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.changelog_init.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +3 -3
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.changelog_update.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +3 -3
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.unreleased_changes.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +1 -1
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.versioned_changes.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +1 -1
- python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.release_notes.md.j2 +1 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +2 -2
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.changelog_init.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +3 -3
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.changelog_update.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +3 -3
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +1 -1
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.unreleased_changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +1 -1
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +2 -2
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +2 -2
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/conftest.py +83 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/const.py +39 -82
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_changelog}/test_changelog.py +103 -113
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version.py +275 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_build.py +395 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_bump.py +3571 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_changelog.py +519 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_github_actions.py +45 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_print.py +531 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_release_notes.py +78 -0
- {python_semantic_release-9.11.1/tests/scenario → python_semantic_release-9.12.1/tests/e2e/cmd_version}/test_version_stamp.py +137 -46
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_strict.py +117 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/conftest.py +9 -0
- python_semantic_release-9.12.1/tests/fixtures/commit_parsers.py +85 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/example_project.py +32 -15
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/git_repo.py +25 -3
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/__init__.py +1 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +256 -99
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +368 -124
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +6 -49
- python_semantic_release-9.12.1/tests/fixtures/repos/repo_initial_commit.py +181 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +1 -45
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +1 -46
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +1 -34
- python_semantic_release-9.12.1/tests/unit/conftest.py +14 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_changelog_context.py +139 -8
- {python_semantic_release-9.11.1/tests/scenario → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/test_release_history.py +87 -66
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_release_notes.py +1 -2
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_angular.py +1 -1
- python_semantic_release-9.12.1/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- python_semantic_release-9.12.1/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- python_semantic_release-9.12.1/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/util.py +8 -0
- python_semantic_release-9.11.1/semantic_release/data/templates/angular/release_notes.md.j2 +0 -1
- python_semantic_release-9.11.1/tests/command_line/test_version.py +0 -1799
- python_semantic_release-9.11.1/tests/fixtures/commit_parsers.py +0 -46
- python_semantic_release-9.11.1/tests/scenario/test_next_version.py +0 -2613
- python_semantic_release-9.11.1/tests/unit/semantic_release/commit_parser/test_tag.py +0 -79
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/AUTHORS.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/LICENSE +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/MANIFEST.in +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/README.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/Makefile +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/commands.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/conf.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/contributing.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/contributors.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/index.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/make.bat +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/migrating_from_v7.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/const.py +0 -0
- /python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.changelog_header.md.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
- /python_semantic_release-9.11.1/semantic_release/data/templates/angular/md/.changes.md.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changes.md.j2 +0 -0
- /python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.changelog_header.rst.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
- /python_semantic_release-9.11.1/semantic_release/data/templates/angular/rst/.macros.rst.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/gitproject.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/setup.cfg +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/scenario → python_semantic_release-9.12.1/tests/e2e/cmd_changelog}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/unit → python_semantic_release-9.12.1/tests/e2e/cmd_config}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_config}/test_generate_config.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release → python_semantic_release-9.12.1/tests/e2e/cmd_publish}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_publish}/test_publish.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release/changelog → python_semantic_release-9.12.1/tests/e2e/cmd_version}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/test_help.py +0 -0
- {python_semantic_release-9.11.1/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/test_main.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release/cli → python_semantic_release-9.12.1/tests/unit}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release/commit_parser → python_semantic_release-9.12.1/tests/unit/semantic_release}/__init__.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release/hvcs → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.11.1/tests/scenario → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/test_template_render.py +0 -0
- {python_semantic_release-9.11.1/tests/unit/semantic_release/version → python_semantic_release-9.12.1/tests/unit/semantic_release/cli}/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_version.py +0 -0
- /python_semantic_release-9.11.1/tests/unit/semantic_release/hvcs/test_util.py → /python_semantic_release-9.12.1/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_declaration.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.12.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -43,13 +43,14 @@ Provides-Extra: test
|
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
44
|
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
45
|
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
46
48
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
-
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
-
Requires-Dist: pytest-
|
|
50
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-order~=1.3; extra == "test"
|
|
51
52
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
-
Requires-Dist: pytest-
|
|
53
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
53
54
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
55
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
56
|
Provides-Extra: dev
|
|
@@ -337,7 +337,7 @@ before the :ref:`version <cmd-version>` subcommand.
|
|
|
337
337
|
|
|
338
338
|
.. code:: yaml
|
|
339
339
|
|
|
340
|
-
- uses: python-semantic-release/python-semantic-release@v9.
|
|
340
|
+
- uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
341
341
|
with:
|
|
342
342
|
root_options: "-vv --noop"
|
|
343
343
|
|
|
@@ -684,7 +684,7 @@ to the GitHub Release Assets as well.
|
|
|
684
684
|
- name: Action | Semantic Version Release
|
|
685
685
|
id: release
|
|
686
686
|
# Adjust tag with desired version if applicable.
|
|
687
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
687
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
688
688
|
with:
|
|
689
689
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
690
690
|
git_committer_name: "github-actions"
|
|
@@ -744,7 +744,7 @@ The equivalent GitHub Action configuration would be:
|
|
|
744
744
|
|
|
745
745
|
- name: Action | Semantic Version Release
|
|
746
746
|
# Adjust tag with desired version if applicable.
|
|
747
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
747
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
748
748
|
with:
|
|
749
749
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
750
750
|
force: patch
|
|
@@ -772,13 +772,13 @@ Publish Action.
|
|
|
772
772
|
.. code:: yaml
|
|
773
773
|
|
|
774
774
|
- name: Release Project 1
|
|
775
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
775
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
776
776
|
with:
|
|
777
777
|
directory: ./project1
|
|
778
778
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
779
779
|
|
|
780
780
|
- name: Release Project 2
|
|
781
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
781
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
782
782
|
with:
|
|
783
783
|
directory: ./project2
|
|
784
784
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
{python_semantic_release-9.11.1 → python_semantic_release-9.12.1}/docs/changelog_templates.rst
RENAMED
|
@@ -587,6 +587,24 @@ arguments are passed in parentheses like normal function calls.
|
|
|
587
587
|
|
|
588
588
|
The filters provided vary based on the VCS configured and available features:
|
|
589
589
|
|
|
590
|
+
* ``autofit_text_width (Callable[[textStr, maxWidthInt, indent_sizeInt], textStr])``: given a
|
|
591
|
+
text string, fit the text to the maximum width provided. This filter is useful when you want
|
|
592
|
+
to wrap text to a specific width. The filter will attempt to break the text at word boundaries
|
|
593
|
+
and will indent the text by the amount specified in the ``indent_size`` parameter.
|
|
594
|
+
|
|
595
|
+
*Introduced in v9.12.0.*
|
|
596
|
+
|
|
597
|
+
**Example Usage:**
|
|
598
|
+
|
|
599
|
+
.. code:: jinja
|
|
600
|
+
|
|
601
|
+
{{ "This is a long string that needs to be wrapped to a specific width" | autofit_text_width(40, 4) }}
|
|
602
|
+
|
|
603
|
+
.. code:: markdown
|
|
604
|
+
|
|
605
|
+
This is a long string that needs to be
|
|
606
|
+
wrapped to a specific width
|
|
607
|
+
|
|
590
608
|
* ``convert_md_to_rst (Callable[[MdStr], RstStr])``: given a markdown string, convert it to
|
|
591
609
|
reStructuredText format. This filter is useful when building a reStructuredText changelog
|
|
592
610
|
but your commit messages are in markdown format. It is utilized by the default RST changelog
|
|
@@ -744,6 +762,7 @@ Availability of the documented filters can be found in the table below:
|
|
|
744
762
|
====================== ========= ===== ====== ======
|
|
745
763
|
**filter - hvcs_type** bitbucket gitea github gitlab
|
|
746
764
|
====================== ========= ===== ====== ======
|
|
765
|
+
autofit_text_width ✅ ✅ ✅ ✅
|
|
747
766
|
convert_md_to_rst ✅ ✅ ✅ ✅
|
|
748
767
|
create_server_url ✅ ✅ ✅ ✅
|
|
749
768
|
create_repo_url ✅ ✅ ✅ ✅
|
|
@@ -844,7 +863,7 @@ the template directory structure and modularity is maintained.
|
|
|
844
863
|
.. tip::
|
|
845
864
|
When initially starting out at customizing your own release notes template, you
|
|
846
865
|
should reference the default template embedded within PSR. The release notes template
|
|
847
|
-
can be found in the directory ``data/templates/<parser
|
|
866
|
+
can be found in the directory ``data/templates/<parser>/md`` within the PSR package.
|
|
848
867
|
|
|
849
868
|
|
|
850
869
|
.. _changelog-templates-custom_release_notes-context:
|
|
@@ -999,29 +1018,29 @@ __ https://github.com/python-semantic-release/python-semantic-release/tree/maste
|
|
|
999
1018
|
2. **Use the new read_file filter** to read in the existing changelog file
|
|
1000
1019
|
``ctx.prev_changelog_file``. This will allow you to include the existing
|
|
1001
1020
|
changelog content in your new changelog file. See
|
|
1002
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1021
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1003
1022
|
|
|
1004
1023
|
3. **Split the changelog content based on the insertion flag.** This will
|
|
1005
1024
|
allow you to insert the new release information after the insertion flag
|
|
1006
1025
|
(``ctx.changelog_insertion_flag``). See
|
|
1007
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1026
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1008
1027
|
|
|
1009
1028
|
4. **Print the leading content before the insertion flag.** This ensures you
|
|
1010
1029
|
maintain any content that should be included before the new release information.
|
|
1011
|
-
See ``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1030
|
+
See ``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1012
1031
|
|
|
1013
1032
|
5. **Print your insertion flag.** This is impartive to ensure that the resulting
|
|
1014
1033
|
changelog can be updated in the future. See
|
|
1015
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1034
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1016
1035
|
|
|
1017
1036
|
6. **Print the new release information.** Be sure to consider both unreleased
|
|
1018
1037
|
and released commits during this step because of the :ref:`cmd-changelog`
|
|
1019
1038
|
command that can be run at any time. See
|
|
1020
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1039
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1021
1040
|
|
|
1022
1041
|
7. **Print the trailing content after the insertion flag.** This ensures you
|
|
1023
1042
|
maintain any content that should be included after the new release information.
|
|
1024
|
-
See ``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1043
|
+
See ``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1025
1044
|
|
|
1026
1045
|
|
|
1027
1046
|
.. tip::
|
|
@@ -160,6 +160,9 @@ The default configuration options for
|
|
|
160
160
|
``semantic_release.history.TagCommitParser``
|
|
161
161
|
""""""""""""""""""""""""""""""""""""""""""""
|
|
162
162
|
|
|
163
|
+
.. warning::
|
|
164
|
+
This parser was deprecated in ``v9.12.0``. It will be removed in a future release.
|
|
165
|
+
|
|
163
166
|
The original parser from v1.0.0 of Python Semantic Release. Similar to the
|
|
164
167
|
emoji parser above, but with less features.
|
|
165
168
|
|
|
@@ -763,7 +763,7 @@ Built-in parsers:
|
|
|
763
763
|
* ``angular`` - :ref:`AngularCommitParser <commit-parser-angular>`
|
|
764
764
|
* ``emoji`` - :ref:`EmojiCommitParser <commit-parser-emoji>`
|
|
765
765
|
* ``scipy`` - :ref:`ScipyCommitParser <commit-parser-scipy>`
|
|
766
|
-
* ``tag`` - :ref:`TagCommitParser <commit-parser-tag>`
|
|
766
|
+
* ``tag`` - :ref:`TagCommitParser <commit-parser-tag>` *(deprecated in v9.12.0)*
|
|
767
767
|
|
|
768
768
|
You can set any of the built-in parsers by their keyword but you can also specify
|
|
769
769
|
your own commit parser in ``module:attr`` form.
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-semantic-release"
|
|
9
|
-
version = "9.
|
|
9
|
+
version = "9.12.1"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -61,13 +61,14 @@ test = [
|
|
|
61
61
|
"coverage[toml] ~= 7.0",
|
|
62
62
|
"pyyaml ~= 6.0",
|
|
63
63
|
"pytest ~= 8.3",
|
|
64
|
+
"pytest-clarity ~= 1.0",
|
|
65
|
+
"pytest-cov ~= 5.0",
|
|
64
66
|
"pytest-env ~= 1.0",
|
|
65
|
-
"pytest-xdist ~= 3.0",
|
|
66
|
-
"pytest-mock ~= 3.0",
|
|
67
67
|
"pytest-lazy-fixtures ~= 1.1.1",
|
|
68
|
-
"pytest-
|
|
68
|
+
"pytest-mock ~= 3.0",
|
|
69
|
+
"pytest-order ~= 1.3",
|
|
69
70
|
"pytest-pretty ~= 1.2",
|
|
70
|
-
"pytest-
|
|
71
|
+
"pytest-xdist ~= 3.0",
|
|
71
72
|
"responses ~= 0.25.0",
|
|
72
73
|
"requests-mock ~= 1.10",
|
|
73
74
|
]
|
|
@@ -97,6 +98,7 @@ addopts = [
|
|
|
97
98
|
"-ra",
|
|
98
99
|
"--diff-symbols",
|
|
99
100
|
"--cache-clear",
|
|
101
|
+
"--durations=20",
|
|
100
102
|
# No default coverage - causes problems with debuggers
|
|
101
103
|
# "--cov=semantic_release",
|
|
102
104
|
# "--cov-context=test",
|
|
@@ -106,6 +108,11 @@ addopts = [
|
|
|
106
108
|
testpaths = [
|
|
107
109
|
"tests"
|
|
108
110
|
]
|
|
111
|
+
markers = [
|
|
112
|
+
"unit: mark a test as a unit test",
|
|
113
|
+
"e2e: mark a test as a end-to-end test",
|
|
114
|
+
"comprehensive: mark a test as a comprehensive (multiple variations) test",
|
|
115
|
+
]
|
|
109
116
|
|
|
110
117
|
[tool.coverage.html]
|
|
111
118
|
show_contexts = true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.12.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -43,13 +43,14 @@ Provides-Extra: test
|
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
44
|
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
45
|
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
46
48
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
-
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
-
Requires-Dist: pytest-
|
|
50
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-order~=1.3; extra == "test"
|
|
51
52
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
-
Requires-Dist: pytest-
|
|
53
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
53
54
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
55
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
56
|
Provides-Extra: dev
|
|
@@ -3,22 +3,22 @@ LICENSE
|
|
|
3
3
|
MANIFEST.in
|
|
4
4
|
README.rst
|
|
5
5
|
pyproject.toml
|
|
6
|
-
./semantic_release/data/templates/angular/release_notes.md.j2
|
|
7
|
-
./semantic_release/data/templates/angular/md/.changelog_header.md.j2
|
|
8
|
-
./semantic_release/data/templates/angular/md/.changelog_init.md.j2
|
|
9
|
-
./semantic_release/data/templates/angular/md/.changelog_update.md.j2
|
|
10
|
-
./semantic_release/data/templates/angular/md/.changes.md.j2
|
|
11
|
-
./semantic_release/data/templates/angular/md/.unreleased_changes.md.j2
|
|
12
|
-
./semantic_release/data/templates/angular/md/.versioned_changes.md.j2
|
|
6
|
+
./semantic_release/data/templates/angular/md/.release_notes.md.j2
|
|
13
7
|
./semantic_release/data/templates/angular/md/CHANGELOG.md.j2
|
|
14
|
-
./semantic_release/data/templates/angular/
|
|
15
|
-
./semantic_release/data/templates/angular/
|
|
16
|
-
./semantic_release/data/templates/angular/
|
|
17
|
-
./semantic_release/data/templates/angular/
|
|
18
|
-
./semantic_release/data/templates/angular/
|
|
19
|
-
./semantic_release/data/templates/angular/
|
|
20
|
-
./semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2
|
|
8
|
+
./semantic_release/data/templates/angular/md/.components/changelog_header.md.j2
|
|
9
|
+
./semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
|
|
10
|
+
./semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
|
|
11
|
+
./semantic_release/data/templates/angular/md/.components/changes.md.j2
|
|
12
|
+
./semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
|
|
13
|
+
./semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
|
|
21
14
|
./semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2
|
|
15
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2
|
|
16
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
|
|
17
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
|
|
18
|
+
./semantic_release/data/templates/angular/rst/.components/changes.rst.j2
|
|
19
|
+
./semantic_release/data/templates/angular/rst/.components/macros.rst.j2
|
|
20
|
+
./semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
|
|
21
|
+
./semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
|
|
22
22
|
docs/Makefile
|
|
23
23
|
docs/algorithm.rst
|
|
24
24
|
docs/changelog_templates.rst
|
|
@@ -77,22 +77,22 @@ semantic_release/commit_parser/scipy.py
|
|
|
77
77
|
semantic_release/commit_parser/tag.py
|
|
78
78
|
semantic_release/commit_parser/token.py
|
|
79
79
|
semantic_release/commit_parser/util.py
|
|
80
|
-
semantic_release/data/templates/angular/release_notes.md.j2
|
|
81
|
-
semantic_release/data/templates/angular/md/.changelog_header.md.j2
|
|
82
|
-
semantic_release/data/templates/angular/md/.changelog_init.md.j2
|
|
83
|
-
semantic_release/data/templates/angular/md/.changelog_update.md.j2
|
|
84
|
-
semantic_release/data/templates/angular/md/.changes.md.j2
|
|
85
|
-
semantic_release/data/templates/angular/md/.unreleased_changes.md.j2
|
|
86
|
-
semantic_release/data/templates/angular/md/.versioned_changes.md.j2
|
|
80
|
+
semantic_release/data/templates/angular/md/.release_notes.md.j2
|
|
87
81
|
semantic_release/data/templates/angular/md/CHANGELOG.md.j2
|
|
88
|
-
semantic_release/data/templates/angular/
|
|
89
|
-
semantic_release/data/templates/angular/
|
|
90
|
-
semantic_release/data/templates/angular/
|
|
91
|
-
semantic_release/data/templates/angular/
|
|
92
|
-
semantic_release/data/templates/angular/
|
|
93
|
-
semantic_release/data/templates/angular/
|
|
94
|
-
semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2
|
|
82
|
+
semantic_release/data/templates/angular/md/.components/changelog_header.md.j2
|
|
83
|
+
semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
|
|
84
|
+
semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
|
|
85
|
+
semantic_release/data/templates/angular/md/.components/changes.md.j2
|
|
86
|
+
semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
|
|
87
|
+
semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
|
|
95
88
|
semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2
|
|
89
|
+
semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2
|
|
90
|
+
semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
|
|
91
|
+
semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
|
|
92
|
+
semantic_release/data/templates/angular/rst/.components/changes.rst.j2
|
|
93
|
+
semantic_release/data/templates/angular/rst/.components/macros.rst.j2
|
|
94
|
+
semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
|
|
95
|
+
semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
|
|
96
96
|
semantic_release/hvcs/__init__.py
|
|
97
97
|
semantic_release/hvcs/_base.py
|
|
98
98
|
semantic_release/hvcs/bitbucket.py
|
|
@@ -111,20 +111,33 @@ tests/__init__.py
|
|
|
111
111
|
tests/conftest.py
|
|
112
112
|
tests/const.py
|
|
113
113
|
tests/util.py
|
|
114
|
-
tests/
|
|
115
|
-
tests/
|
|
116
|
-
tests/
|
|
117
|
-
tests/
|
|
118
|
-
tests/
|
|
119
|
-
tests/
|
|
120
|
-
tests/
|
|
121
|
-
tests/
|
|
114
|
+
tests/e2e/__init__.py
|
|
115
|
+
tests/e2e/conftest.py
|
|
116
|
+
tests/e2e/test_help.py
|
|
117
|
+
tests/e2e/test_main.py
|
|
118
|
+
tests/e2e/cmd_changelog/__init__.py
|
|
119
|
+
tests/e2e/cmd_changelog/test_changelog.py
|
|
120
|
+
tests/e2e/cmd_config/__init__.py
|
|
121
|
+
tests/e2e/cmd_config/test_generate_config.py
|
|
122
|
+
tests/e2e/cmd_publish/__init__.py
|
|
123
|
+
tests/e2e/cmd_publish/test_publish.py
|
|
124
|
+
tests/e2e/cmd_version/__init__.py
|
|
125
|
+
tests/e2e/cmd_version/test_version.py
|
|
126
|
+
tests/e2e/cmd_version/test_version_build.py
|
|
127
|
+
tests/e2e/cmd_version/test_version_bump.py
|
|
128
|
+
tests/e2e/cmd_version/test_version_changelog.py
|
|
129
|
+
tests/e2e/cmd_version/test_version_github_actions.py
|
|
130
|
+
tests/e2e/cmd_version/test_version_print.py
|
|
131
|
+
tests/e2e/cmd_version/test_version_release_notes.py
|
|
132
|
+
tests/e2e/cmd_version/test_version_stamp.py
|
|
133
|
+
tests/e2e/cmd_version/test_version_strict.py
|
|
122
134
|
tests/fixtures/__init__.py
|
|
123
135
|
tests/fixtures/commit_parsers.py
|
|
124
136
|
tests/fixtures/example_project.py
|
|
125
137
|
tests/fixtures/git_repo.py
|
|
126
138
|
tests/fixtures/scipy.py
|
|
127
139
|
tests/fixtures/repos/__init__.py
|
|
140
|
+
tests/fixtures/repos/repo_initial_commit.py
|
|
128
141
|
tests/fixtures/repos/git_flow/__init__.py
|
|
129
142
|
tests/fixtures/repos/git_flow/repo_w_2_release_channels.py
|
|
130
143
|
tests/fixtures/repos/git_flow/repo_w_3_release_channels.py
|
|
@@ -134,19 +147,17 @@ tests/fixtures/repos/trunk_based_dev/__init__.py
|
|
|
134
147
|
tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py
|
|
135
148
|
tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py
|
|
136
149
|
tests/fixtures/repos/trunk_based_dev/repo_w_tags.py
|
|
137
|
-
tests/scenario/__init__.py
|
|
138
|
-
tests/scenario/test_next_version.py
|
|
139
|
-
tests/scenario/test_release_history.py
|
|
140
|
-
tests/scenario/test_template_render.py
|
|
141
|
-
tests/scenario/test_version_stamp.py
|
|
142
150
|
tests/unit/__init__.py
|
|
151
|
+
tests/unit/conftest.py
|
|
143
152
|
tests/unit/semantic_release/__init__.py
|
|
144
153
|
tests/unit/semantic_release/test_helpers.py
|
|
145
154
|
tests/unit/semantic_release/changelog/__init__.py
|
|
146
155
|
tests/unit/semantic_release/changelog/test_changelog_context.py
|
|
147
156
|
tests/unit/semantic_release/changelog/test_default_changelog.py
|
|
157
|
+
tests/unit/semantic_release/changelog/test_release_history.py
|
|
148
158
|
tests/unit/semantic_release/changelog/test_release_notes.py
|
|
149
159
|
tests/unit/semantic_release/changelog/test_template.py
|
|
160
|
+
tests/unit/semantic_release/changelog/test_template_render.py
|
|
150
161
|
tests/unit/semantic_release/cli/__init__.py
|
|
151
162
|
tests/unit/semantic_release/cli/test_config.py
|
|
152
163
|
tests/unit/semantic_release/cli/test_github_actions_output.py
|
|
@@ -158,7 +169,6 @@ tests/unit/semantic_release/commit_parser/test_angular.py
|
|
|
158
169
|
tests/unit/semantic_release/commit_parser/test_emoji.py
|
|
159
170
|
tests/unit/semantic_release/commit_parser/test_parsed_commit.py
|
|
160
171
|
tests/unit/semantic_release/commit_parser/test_scipy.py
|
|
161
|
-
tests/unit/semantic_release/commit_parser/test_tag.py
|
|
162
172
|
tests/unit/semantic_release/commit_parser/test_util.py
|
|
163
173
|
tests/unit/semantic_release/hvcs/__init__.py
|
|
164
174
|
tests/unit/semantic_release/hvcs/test__base.py
|
|
@@ -33,12 +33,13 @@ types-requests~=2.32.0
|
|
|
33
33
|
coverage[toml]~=7.0
|
|
34
34
|
pyyaml~=6.0
|
|
35
35
|
pytest~=8.3
|
|
36
|
+
pytest-clarity~=1.0
|
|
37
|
+
pytest-cov~=5.0
|
|
36
38
|
pytest-env~=1.0
|
|
37
|
-
pytest-xdist~=3.0
|
|
38
|
-
pytest-mock~=3.0
|
|
39
39
|
pytest-lazy-fixtures~=1.1.1
|
|
40
|
-
pytest-
|
|
40
|
+
pytest-mock~=3.0
|
|
41
|
+
pytest-order~=1.3
|
|
41
42
|
pytest-pretty~=1.2
|
|
42
|
-
pytest-
|
|
43
|
+
pytest-xdist~=3.0
|
|
43
44
|
responses~=0.25.0
|
|
44
45
|
requests-mock~=1.10
|
|
@@ -82,14 +82,19 @@ def make_changelog_context(
|
|
|
82
82
|
*hvcs_client.get_changelog_context_filters(),
|
|
83
83
|
read_file,
|
|
84
84
|
convert_md_to_rst,
|
|
85
|
+
autofit_text_width,
|
|
85
86
|
),
|
|
86
87
|
)
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
def read_file(filepath: str) -> str:
|
|
90
91
|
try:
|
|
92
|
+
if not filepath:
|
|
93
|
+
raise FileNotFoundError("No file path provided") # noqa: TRY301
|
|
94
|
+
|
|
91
95
|
with Path(filepath).open(newline=os.linesep) as rfd:
|
|
92
96
|
return rfd.read()
|
|
97
|
+
|
|
93
98
|
except FileNotFoundError as err:
|
|
94
99
|
logging.warning(err)
|
|
95
100
|
return ""
|
|
@@ -105,10 +110,58 @@ def convert_md_to_rst(md_content: str) -> str:
|
|
|
105
110
|
# Replace markdown bullets with rst bullets
|
|
106
111
|
"bullets": (regexp(r"^(\s*)-(\s)"), r"\1*\2"),
|
|
107
112
|
# Replace markdown inline raw content with rst inline raw content
|
|
108
|
-
"raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])
|
|
113
|
+
"raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])"), r"`\1`"),
|
|
109
114
|
}
|
|
110
115
|
|
|
111
116
|
for pattern, replacement in replacements.values():
|
|
112
117
|
rst_content = pattern.sub(replacement, rst_content)
|
|
113
118
|
|
|
114
119
|
return rst_content
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def autofit_text_width(text: str, maxwidth: int = 100, indent_size: int = 0) -> str:
|
|
123
|
+
"""Format the description text to fit within a specified width"""
|
|
124
|
+
input_text = text.strip()
|
|
125
|
+
|
|
126
|
+
if len(input_text) <= maxwidth:
|
|
127
|
+
# If the text is already within the maxwidth, return immediately
|
|
128
|
+
return input_text
|
|
129
|
+
|
|
130
|
+
indent = " " * indent_size
|
|
131
|
+
formatted_description = []
|
|
132
|
+
|
|
133
|
+
# Re-format text to fit within the maxwidth
|
|
134
|
+
for paragraph in input_text.split("\n\n"):
|
|
135
|
+
formatted_paragraph = []
|
|
136
|
+
|
|
137
|
+
# Split the paragraph into words with no empty strings
|
|
138
|
+
words = list(
|
|
139
|
+
filter(
|
|
140
|
+
None, paragraph.replace("\r", "").replace("\n", " ").strip().split(" ")
|
|
141
|
+
)
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
# Initialize the line for each paragraph
|
|
145
|
+
line = words[0]
|
|
146
|
+
next_line = ""
|
|
147
|
+
|
|
148
|
+
for word in words[1:]:
|
|
149
|
+
# Check if the current line + the next word (and a space) will fit within the maxwidth
|
|
150
|
+
# If it does, then update the current line
|
|
151
|
+
next_line = f"{line} {word}"
|
|
152
|
+
if len(next_line) <= maxwidth:
|
|
153
|
+
line = next_line
|
|
154
|
+
continue
|
|
155
|
+
|
|
156
|
+
# Add the current line to the paragraph and start a new line
|
|
157
|
+
formatted_paragraph.append(line)
|
|
158
|
+
line = f"{indent}{word}"
|
|
159
|
+
|
|
160
|
+
# Store the last line in the paragraph since it hasn't reached the maxwidth yet
|
|
161
|
+
formatted_paragraph.append(line)
|
|
162
|
+
|
|
163
|
+
#
|
|
164
|
+
formatted_description.append(str.join("\n", formatted_paragraph))
|
|
165
|
+
|
|
166
|
+
# Print the formatted description
|
|
167
|
+
return str.join("\n\n", formatted_description).strip()
|
|
@@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, TypedDict
|
|
|
8
8
|
from git.objects.tag import TagObject
|
|
9
9
|
|
|
10
10
|
from semantic_release.commit_parser import ParseError
|
|
11
|
+
from semantic_release.enums import LevelBump
|
|
11
12
|
from semantic_release.version.algorithm import tags_and_versions
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
@@ -58,20 +59,11 @@ class ReleaseHistory:
|
|
|
58
59
|
# we place the key-value mapping type_ to ParseResult as before.
|
|
59
60
|
# We do this until we encounter a commit which another tag matches.
|
|
60
61
|
|
|
61
|
-
is_commit_released = False
|
|
62
62
|
the_version: Version | None = None
|
|
63
63
|
|
|
64
64
|
for commit in repo.iter_commits("HEAD", topo_order=True):
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
parse_result = commit_parser.parse(commit)
|
|
69
|
-
commit_type = (
|
|
70
|
-
"unknown" if isinstance(parse_result, ParseError) else parse_result.type
|
|
71
|
-
)
|
|
72
|
-
log.debug("commit has type %s", commit_type)
|
|
73
|
-
|
|
74
|
-
log.debug("checking if commit %s matches any tags", commit.hexsha)
|
|
65
|
+
# Determine if we have found another release
|
|
66
|
+
log.debug("checking if commit %s matches any tags", commit.hexsha[:7])
|
|
75
67
|
t_v = tag_sha_2_version_lookup.get(commit.hexsha, None)
|
|
76
68
|
|
|
77
69
|
if t_v is None:
|
|
@@ -82,7 +74,6 @@ class ReleaseHistory:
|
|
|
82
74
|
# we have found the latest commit introduced by this tag
|
|
83
75
|
# so we create a new Release entry
|
|
84
76
|
log.debug("found commit %s for tag %s", commit.hexsha, tag.name)
|
|
85
|
-
is_commit_released = True
|
|
86
77
|
|
|
87
78
|
# tag.object is a Commit if the tag is lightweight, otherwise
|
|
88
79
|
# it is a TagObject with additional metadata about the tag
|
|
@@ -110,27 +101,55 @@ class ReleaseHistory:
|
|
|
110
101
|
|
|
111
102
|
released.setdefault(the_version, release)
|
|
112
103
|
|
|
113
|
-
if
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
# mypy will be happy if we make this an explicit string
|
|
105
|
+
commit_message = str(commit.message)
|
|
106
|
+
|
|
107
|
+
log.info(
|
|
108
|
+
"parsing commit [%s] %s",
|
|
109
|
+
commit.hexsha[:8],
|
|
110
|
+
commit_message.replace("\n", " ")[:54],
|
|
111
|
+
)
|
|
112
|
+
parse_result = commit_parser.parse(commit)
|
|
113
|
+
commit_type = (
|
|
114
|
+
"unknown" if isinstance(parse_result, ParseError) else parse_result.type
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
has_exclusion_match = any(
|
|
118
|
+
pattern.match(commit_message) for pattern in exclude_commit_patterns
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
commit_level_bump = (
|
|
122
|
+
LevelBump.NO_RELEASE
|
|
123
|
+
if isinstance(parse_result, ParseError)
|
|
124
|
+
else parse_result.bump
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# Skip excluded commits except for any commit causing a version bump
|
|
128
|
+
# Reasoning: if a commit causes a version bump, and no other commits
|
|
129
|
+
# are included, then the changelog will be empty. Even if ther was other
|
|
130
|
+
# commits included, the true reason for a version bump would be missing.
|
|
131
|
+
if has_exclusion_match and commit_level_bump == LevelBump.NO_RELEASE:
|
|
132
|
+
log.info(
|
|
133
|
+
"Excluding commit [%s] %s",
|
|
134
|
+
commit.hexsha[:8],
|
|
135
|
+
commit_message.replace("\n", " ")[:50],
|
|
118
136
|
)
|
|
119
137
|
continue
|
|
120
138
|
|
|
121
|
-
if
|
|
122
|
-
log.
|
|
139
|
+
if the_version is None:
|
|
140
|
+
log.info(
|
|
141
|
+
"[Unreleased] adding '%s' commit(%s) to list",
|
|
142
|
+
commit.hexsha[:8],
|
|
143
|
+
commit_type,
|
|
144
|
+
)
|
|
123
145
|
unreleased[commit_type].append(parse_result)
|
|
124
146
|
continue
|
|
125
147
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
log.debug(
|
|
130
|
-
"adding commit %s with type %s to release section for %s",
|
|
131
|
-
commit.hexsha,
|
|
132
|
-
commit_type,
|
|
148
|
+
log.info(
|
|
149
|
+
"[%s] adding '%s' commit(%s) to release",
|
|
133
150
|
the_version,
|
|
151
|
+
commit_type,
|
|
152
|
+
commit.hexsha[:8],
|
|
134
153
|
)
|
|
135
154
|
|
|
136
155
|
released[the_version]["elements"][commit_type].append(parse_result)
|