Skip to content

Commit 9dba811

Browse files
committed
Add dependencies to uv in post_gen hook
1 parent 8b4e277 commit 9dba811

File tree

4 files changed

+39
-18
lines changed

4 files changed

+39
-18
lines changed

Diff for: hooks/post_gen_project.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Installing dependencies using uv..."
6+
7+
{% if cookiecutter.use_docker == "y" %}
8+
docker compose -f docker-compose.local.yml build django
9+
uv="docker compose -f docker-compose.local.yml run --rm django uv"
10+
{% else %}
11+
uv="uv"
12+
{% endif %}
13+
14+
$uv add -r requirements/production.txt
15+
$uv add --dev -r requirements/local.txt
16+
17+
rm -rf requirements
18+
19+
echo "Setup complete!"

Diff for: tests/test_cookiecutter_generation.py

+4
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ def check_paths(paths: Iterable[Path]):
157157
"""Method to check all paths have correct substitutions."""
158158
# Assert that no match is found in any of the files
159159
for path in paths:
160+
161+
if ".venv" in str(path):
162+
continue
163+
160164
if is_binary(str(path)):
161165
continue
162166

Diff for: uv.lock

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: {{cookiecutter.project_slug}}/requirements/local.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
-r production.txt
2-
31
Werkzeug[watchdog]==3.1.3 # https://github.com/pallets/werkzeug
42
ipdb==0.13.13 # https://github.com/gotcha/ipdb
53
{%- if cookiecutter.use_docker == 'y' %}

0 commit comments

Comments
 (0)