diff --git a/README.md b/README.md index b37a56b..5c30e70 100644 --- a/README.md +++ b/README.md @@ -347,6 +347,9 @@ See also git tags: https://github.com/jedie/manageprojects/tags [comment]: <> (✂✂✂ auto generated history start ✂✂✂) +* [**dev**](https://github.com/jedie/manageprojects/compare/v0.19.2...main) + * 2024-09-25 - Add: test_pre_commit_hooks() + * 2024-09-25 - Move git pre-commit hook from dev-cli.py to update command * [v0.19.2](https://github.com/jedie/manageprojects/compare/v0.19.1...v0.19.2) * 2024-09-24 - Add piwheels hashes, too. * 2024-09-24 - Apply update from cookiecutter templates @@ -356,6 +359,9 @@ See also git tags: https://github.com/jedie/manageprojects/tags * [v0.19.0](https://github.com/jedie/manageprojects/compare/v0.18.0...v0.19.0) * 2024-09-15 - NEW: setup_python.py * 2024-09-15 - Update requirements + +
Expand older history entries ... + * [v0.18.0](https://github.com/jedie/manageprojects/compare/v0.17.1...v0.18.0) * 2024-08-29 - Fix wrong "module" in publish call :( * 2024-08-29 - Fix wrong "distribution_name" in publish command @@ -373,9 +379,6 @@ See also git tags: https://github.com/jedie/manageprojects/tags * 2024-07-09 - Split CLI * 2024-02-22 - Update requirements * 2023-12-30 - Fix typos - -
Expand older history entries ... - * [v0.17.1](https://github.com/jedie/manageprojects/compare/v0.17.0...v0.17.1) * 2023-12-29 - Still support Python v3.9 * [v0.17.0](https://github.com/jedie/manageprojects/compare/v0.16.2...v0.17.0) diff --git a/dev-cli.py b/dev-cli.py index 8e0086c..8d5a6a2 100755 --- a/dev-cli.py +++ b/dev-cli.py @@ -107,7 +107,6 @@ def main(argv): # Activate git pre-commit hooks: verbose_check_call(PYTHON_PATH, '-m', 'pre_commit', 'install') - verbose_check_call(PYTHON_PATH, '-m', 'pre_commit', 'autoupdate') # Call our entry point CLI: try: diff --git a/manageprojects/cli_dev/packaging.py b/manageprojects/cli_dev/packaging.py index 9750f65..884444b 100644 --- a/manageprojects/cli_dev/packaging.py +++ b/manageprojects/cli_dev/packaging.py @@ -70,6 +70,9 @@ def update(): # Install new dependencies in current .venv: verbose_check_call(bin_path / 'pip-sync', 'requirements.dev.txt') + # Update git pre-commit hooks: + verbose_check_call(bin_path / 'pre_commit', 'autoupdate') + @cli.command() def publish(): diff --git a/manageprojects/tests/test_project_setup.py b/manageprojects/tests/test_project_setup.py index d5abf4c..492d303 100644 --- a/manageprojects/tests/test_project_setup.py +++ b/manageprojects/tests/test_project_setup.py @@ -3,6 +3,7 @@ from bx_py_utils.path import assert_is_file from cli_base.cli_tools.code_style import assert_code_style +from cli_base.cli_tools.subprocess_utils import ToolsExecutor from packaging.version import Version from manageprojects import __version__ @@ -38,3 +39,8 @@ def test_check_editor_config(self): max_line_length = get_py_max_line_length(package_root=PACKAGE_ROOT) self.assertEqual(max_line_length, 119) + + def test_pre_commit_hooks(self): + executor = ToolsExecutor(cwd=PACKAGE_ROOT) + for command in ('migrate-config', 'validate-config', 'validate-manifest'): + executor.verbose_check_call('pre-commit', command, exit_on_error=True)