Skip to content

Commit

Permalink
Merge pull request #140 from jedie/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jedie authored Sep 25, 2024
2 parents 366ed69 + 8767d6a commit c1e51f8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

<details><summary>Expand older history entries ...</summary>

* [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
Expand All @@ -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

<details><summary>Expand older history entries ...</summary>

* [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)
Expand Down
1 change: 0 additions & 1 deletion dev-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions manageprojects/cli_dev/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 6 additions & 0 deletions manageprojects/tests/test_project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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)

0 comments on commit c1e51f8

Please sign in to comment.