File tree Expand file tree Collapse file tree 10 files changed +91
-11
lines changed
Expand file tree Collapse file tree 10 files changed +91
-11
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,30 @@ Changelog
33=========
44
55
6+ 2.6.1 (2025-05-16)
7+ ==================
8+
9+ Changes
10+ ^^^^^^^
11+
12+ fix
13+ """
14+ - --version CLI flag
15+
16+ test
17+ """"
18+ - fix integration tests
19+
20+ documentation
21+ """""""""""""
22+ - update 'Topic to Integration' Dev Process Guide
23+
24+ chore
25+ """""
26+ - sem ver bump to 2.6.1
27+ - update terminal based release script
28+
29+
6302.6.0 (2025-05-15)
731==================
832
Original file line number Diff line number Diff line change 33[ ![ Build Status] ( https://img.shields.io/github/actions/workflow/status/boromir674/cookiecutter-python-package/test.yaml?link=https%3A%2F%2Fgithub.com%2Fboromir674%2Fcookiecutter-python-package%2Factions%2Fworkflows%2Ftest.yaml%3Fquery%3Dbranch%253Amaster )] ( https://github.com/boromir674/cookiecutter-python-package/actions/workflows/test.yaml?query=branch%3Amaster ) [ ![ Coverage] ( https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov )] ( https://app.codecov.io/gh/boromir674/cookiecutter-python-package ) [ ![ Docs] ( https://img.shields.io/readthedocs/python-package-generator/master?logo=readthedocs&logoColor=lightblue )] ( https://python-package-generator.readthedocs.io/en/master/ ) [ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/1d347d7dfaa134fd944e/maintainability )] ( https://codeclimate.com/github/boromir674/cookiecutter-python-package/maintainability )
44[ ![ Release Version] ( https://img.shields.io/pypi/v/cookiecutter_python )] ( https://pypi.org/project/cookiecutter-python/ ) [ ![ Wheel] ( https://img.shields.io/pypi/wheel/cookiecutter-python?color=green&label=wheel )] ( https://pypi.org/project/cookiecutter-python ) [ ![ Tech Debt] ( https://img.shields.io/codeclimate/tech-debt/boromir674/cookiecutter-python-package )] ( https://codeclimate.com/github/boromir674/cookiecutter-python-package/ ) [ ![ Codacy] ( https://app.codacy.com/project/badge/Grade/5be4a55ff1d34b98b491dc05e030f2d7 )] ( https://app.codacy.com/gh/boromir674/cookiecutter-python-package/dashboard?utm_source=github.com&utm_medium=referral&utm_content=boromir674/cookiecutter-python-package&utm_campaign=Badge_Grade )
55[ ![ Supported Versions] ( https://img.shields.io/pypi/pyversions/cookiecutter-python?color=blue&label=python&logo=python&logoColor=%23ccccff )] ( https://pypi.org/project/cookiecutter-python )
6- [ ![ PyPI Stats] ( https://img.shields.io/pypi/dm/cookiecutter-python?logo=pypi&logoColor=%23849ED9&color=%23849ED9 )] ( https://pypistats.org/packages/cookiecutter-python ) [ ![ Commits Since Tag] ( https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.6.0 /master?color=blue&logo=github )] ( https://github.com/boromir674/cookiecutter-python-package/compare/v2.6.0 ..master ) [ ![ Commits Since Release] ( https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver )] ( https://github.com/boromir674/cookiecutter-python-package/releases )
6+ [ ![ PyPI Stats] ( https://img.shields.io/pypi/dm/cookiecutter-python?logo=pypi&logoColor=%23849ED9&color=%23849ED9 )] ( https://pypistats.org/packages/cookiecutter-python ) [ ![ Commits Since Tag] ( https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.6.1 /master?color=blue&logo=github )] ( https://github.com/boromir674/cookiecutter-python-package/compare/v2.6.1 ..master ) [ ![ Commits Since Release] ( https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver )] ( https://github.com/boromir674/cookiecutter-python-package/releases )
77[ ![ License] ( https://img.shields.io/github/license/boromir674/cookiecutter-python-package )] ( https://github.com/boromir674/cookiecutter-python-package/blob/master/LICENSE ) [ ![ OpenSSF] ( https://bestpractices.coreinfrastructure.org/projects/5988/badge )] ( https://bestpractices.coreinfrastructure.org/en/projects/5988 ) [ ![ Ruff] ( https://img.shields.io/badge/code%20style-ruff-000000.svg )] ( https://docs.astral.sh/ruff/ ) [ ![ Black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
88
99
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ Prerequisites:
4343 <li><b>Open PR</b> to Integration Branch
4444
4545 ```sh
46- git checkout ${DEV_BR} && git pull && git checkout -
47- git rebase ${DEV_BR} && git push -f && gh pr create --base ${DEV_BR}
46+ git checkout ${DEV_BR} && git pull && git rebase ${MAIN_BR} && git push -f
47+ git checkout - && git rebase ${DEV_BR}
48+ git push -f && gh pr create --base ${DEV_BR}
4849 ```
4950
5051 </li>
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ build-backend = "poetry.core.masonry.api"
1414name = " cookiecutter_python"
1515# ## ... ###
1616
17- version = " 2.6.0 "
17+ version = " 2.6.1 "
1818description = " 1-click Generator of Python Project, from Template with streamlined \" DevOps\" using a powerful CI/CD Pipeline."
1919readme = " README.md"
2020license = " AGPL-3.0-only"
@@ -74,7 +74,7 @@ maintainers = [
7474license = {text = " AGPL-3.0-only" }
7575
7676name = " cookiecutter_python"
77- version = " 2.6.0 "
77+ version = " 2.6.1 "
7878description = " 1-click Generator of Python Project, from Template with streamlined \" DevOps\" using a powerful CI/CD Pipeline."
7979readme = " README.md"
8080# keywords = []
Original file line number Diff line number Diff line change @@ -168,10 +168,13 @@ git push origin -f "$RC_TAG"
168168echo
169169echo " Release Candidate Pipeline Triggered !"
170170
171+
171172# press any key to continue
172- read -ep " Please watch the CI/CD Pipeline to succeed (press any key to continue to 'live watch') ! " -n1 -s
173+ read -ep " Please run 'gh run watch' to watch the CI/CD Pipeline (press any key to continue) " -n1 -s
173174
174- gh run watch
175+ # TODO: try to implement the below; currently after gh run watch finishes it stops execution of the sshell script!
176+ # read -ep "Please watch the CI/CD Pipeline to succeed (press any key to continue to 'live watch') !" -n1 -s
177+ # gh run watch
175178
176179echo " ========================="
177180echo " Assuming CI/CD Pipeline Succeeded !"
Original file line number Diff line number Diff line change 1- __version__ = '2.6.0 '
1+ __version__ = '2.6.1 '
22
33from . import _logging # noqa
Original file line number Diff line number Diff line change 22
33import os
44import sys
5+ import typing as t
56
67import click
78
1718
1819def version_msg ():
1920 """Message about Python Generator version, location and Python version."""
20- python_version = sys .version [:3 ]
21+ python_version : t . Tuple [ int , int , int ] = sys .version_info [:3 ]
2122 message = u'Python Generator %(version)s from {} (Python {})'
2223 location = os .path .dirname (this_file_location )
23- return message .format (location , python_version )
24+ return message .format (location , "." . join ( map ( str , python_version )) )
2425
2526
2627@click .command (context_settings = dict (help_option_names = [u'-h' , u'--help' ]))
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ def sdist_expected_correct_file_structure():
146146 # 'src/stubs/requests_futures/sessions.pyi',
147147 )
148148 TESTS = (
149+ 'tests/test_version_string.py' ,
149150 'tests/test_git_sdk.py' ,
150151 'tests/test_git_porcelain.py' ,
151152 'tests/test_is_repo_clean_function.py' ,
Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+
3+ import pytest
4+
5+
6+ def test_version_msg_function_returns_expected_string (distro_loc : Path ):
7+ # GIVEN the version_msg function
8+ from cookiecutter_python .cli import version_msg
9+
10+ # WHEN the version_msg function is called
11+ result : str = version_msg ()
12+
13+ # THEN it should return the expected string
14+ import sys
15+
16+ EXPECTED_PYTHON_VERSION : str = "." .join (map (str , sys .version_info [:3 ]))
17+
18+ EXPECTED_PARENT_DIR_OF_COOKIECUTTER_PYTHON : Path = distro_loc .parent
19+
20+ assert result == (
21+ f'Python Generator %(version)s from { EXPECTED_PARENT_DIR_OF_COOKIECUTTER_PYTHON } (Python { EXPECTED_PYTHON_VERSION } )'
22+ )
23+
24+
25+ @pytest .mark .runner_setup (mix_stderr = False )
26+ def test_cli_version_flag_returns_expected_string (
27+ distro_loc : Path ,
28+ isolated_cli_runner ,
29+ ):
30+ from cookiecutter_python import __version__
31+ from cookiecutter_python .cli import main
32+
33+ result = isolated_cli_runner .invoke (
34+ main ,
35+ args = ['--version' ],
36+ input = None ,
37+ env = None ,
38+ catch_exceptions = False ,
39+ )
40+ assert result .exit_code == 0
41+
42+ import sys
43+
44+ EXPECTED_PYTHON_VERSION : str = "." .join (map (str , sys .version_info [:3 ]))
45+
46+ EXPECTED_PARENT_DIR_OF_COOKIECUTTER_PYTHON : Path = distro_loc .parent
47+
48+ assert result .stdout == (
49+ f'Python Generator { __version__ } from { EXPECTED_PARENT_DIR_OF_COOKIECUTTER_PYTHON } (Python { EXPECTED_PYTHON_VERSION } )\n '
50+ )
You can’t perform that action at this time.
0 commit comments