Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions docs/project-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Run `poe setup` in new repository clones to enable git hooks:
```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
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions template/CONTRIBUTING.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"},
Expand All @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions tests/__snapshots__/test_contributing.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
64 changes: 40 additions & 24 deletions tests/__snapshots__/test_pyproject.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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'"},
Expand All @@ -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"
Expand Down Expand Up @@ -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"},
Expand All @@ -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"
Expand Down Expand Up @@ -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'"},
Expand All @@ -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"
Expand Down Expand Up @@ -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"},
Expand All @@ -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"
Expand Down Expand Up @@ -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'"},
Expand All @@ -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"
Expand Down Expand Up @@ -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"},
Expand All @@ -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"
Expand Down Expand Up @@ -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'"},
Expand All @@ -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"
Expand Down Expand Up @@ -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"},
Expand All @@ -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"
Expand Down
Loading