diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4601be9..dd27284 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,8 +12,7 @@ ```sh git clone https://github.com/smkent/copier-python cd copier-python -uv sync -uv run poe setup # Enables pre-commit hooks +uv run poe setup # Enables git hooks ``` ## Common tasks diff --git a/docs/project-development.md b/docs/project-development.md index da6855c..3a6cd6f 100644 --- a/docs/project-development.md +++ b/docs/project-development.md @@ -11,8 +11,7 @@ Run `poe setup` in new repository clones to enable git hooks: ```sh git clone https://github.com// cd project_name -uv sync -uv run poe setup # Enables pre-commit hooks +uv run poe setup # Enables git hooks ``` ## Common tasks diff --git a/pyproject.toml b/pyproject.toml index a1a77f8..a7d29a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,6 @@ default = "8000" sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git remote add origin https://github.com/smkent/copier-python"}, {cmd = "git config --local remote.origin.pushurl git@github.com:smkent/copier-python.git"}, @@ -113,8 +112,11 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] -cmd = "prek install" -help = "Install git hooks" +sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, +] +help = "Install project dependencies and git hooks" [tool.poe.tasks.snapup] cmd = "pytest --snapshot-update" diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index c9d3a94..be5f106 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -12,8 +12,7 @@ ```sh git clone https://github.com/{{ github_user }}/{{ project_name }} cd {{ project_name }} -uv sync -uv run poe setup # Enables pre-commit hooks +uv run poe setup # Enables git hooks ``` ## Common tasks diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index e1857f2..688141a 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -108,7 +108,6 @@ default = "8000" sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {%- if project_visibility == 'public' %} {cmd = "git remote add origin https://github.com/{{ github_user }}/{{ project_name }}"}, @@ -128,8 +127,11 @@ sequence = [{ref = "lint"}, {ref = "test"}] help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] -cmd = "prek install" -help = "Install git hooks" +sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, +] +help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" diff --git a/tests/__snapshots__/test_contributing.ambr b/tests/__snapshots__/test_contributing.ambr index 79a79a6..e8535e8 100644 --- a/tests/__snapshots__/test_contributing.ambr +++ b/tests/__snapshots__/test_contributing.ambr @@ -15,8 +15,7 @@ ```sh git clone https://github.com/ness/PKFire cd PKFire - uv sync - uv run poe setup # Enables pre-commit hooks + uv run poe setup # Enables git hooks ``` ## Common tasks @@ -49,8 +48,7 @@ ```sh git clone https://github.com/ness/PKFire cd PKFire - uv sync - uv run poe setup # Enables pre-commit hooks + uv run poe setup # Enables git hooks ``` ## Common tasks diff --git a/tests/__snapshots__/test_pyproject.ambr b/tests/__snapshots__/test_pyproject.ambr index 4934c05..e3bb9e7 100644 --- a/tests/__snapshots__/test_pyproject.ambr +++ b/tests/__snapshots__/test_pyproject.ambr @@ -88,7 +88,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git add ."}, {cmd = "git commit -m 'Create project from template'"}, @@ -104,8 +103,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -305,7 +307,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git remote add origin https://github.com/ness/PKFire"}, {cmd = "git config --local remote.origin.pushurl git@github.com:ness/PKFire.git"}, @@ -323,8 +324,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -510,7 +514,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git add ."}, {cmd = "git commit -m 'Create project from template'"}, @@ -526,8 +529,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -703,7 +709,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git remote add origin https://github.com/ness/PKFire"}, {cmd = "git config --local remote.origin.pushurl git@github.com:ness/PKFire.git"}, @@ -721,8 +726,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -867,7 +875,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git add ."}, {cmd = "git commit -m 'Create project from template'"}, @@ -883,8 +890,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -1059,7 +1069,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git remote add origin https://github.com/ness/PKFire"}, {cmd = "git config --local remote.origin.pushurl git@github.com:ness/PKFire.git"}, @@ -1077,8 +1086,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -1239,7 +1251,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git add ."}, {cmd = "git commit -m 'Create project from template'"}, @@ -1255,8 +1266,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest" @@ -1407,7 +1421,6 @@ sequence = [ {shell = "[ ! -d .git ] || { echo \"git repository already exists\"; exit 1; }"}, {cmd = "git init"}, - {cmd = "uv sync"}, {ref = "setup"}, {cmd = "git remote add origin https://github.com/ness/PKFire"}, {cmd = "git config --local remote.origin.pushurl git@github.com:ness/PKFire.git"}, @@ -1425,8 +1438,11 @@ help = "Run all formatters, static checks and tests" [tool.poe.tasks.setup] - cmd = "prek install" - help = "Install git hooks" + sequence = [ + {cmd = "uv sync"}, + {cmd = "prek install"}, + ] + help = "Install project dependencies and git hooks" [tool.poe.tasks.test] cmd = "pytest"