Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
57 lines (43 loc) · 1.5 KB
/
Copy pathjustfile
File metadata and controls
57 lines (43 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Run the help command.
default: help
# List all available commands.
help:
just -l
# Git pull current and Django repository.
pull:
git pull
cd ../django && git pull
# Create `venv` if one doesn't exist.
venv-create:
test -d venv || python3 -m venv venv
# Activate `venv` and upgrade pip.
venv-upgrade-pip: venv-create
. venv/bin/activate && pip install --no-cache-dir --upgrade pip
# Activate `venv` and install requirements.
venv-install: venv-upgrade-pip
. venv/bin/activate && pip install -r requirements.txt
alias install := venv-install
# Run Django management command.
manage *posargs='':
. venv/bin/activate && python src/manage.py {{ posargs }}
# Activate the development server (`runserver`).
run:
just manage runserver
# Pull code, requirements, translations, and run the server.
refresh: pull venv-install compilemessages run
# Run `show_urls` management command.
show_urls:
just manage show_urls
# Run `makemessages` management command.
makemessages *posargs='--all':
just manage makemessages --no-wrap --no-obsolete --ignore venv {{ posargs }}
# Run `compilemessages` management command.
compilemessages *posargs='':
just manage compilemessages --ignore venv {{ posargs }}
# Run unit tests
test +modules='mysite':
just manage test mysite {{ modules }}
# Run unit tests with coverage
coverage +modules='mysite':
. venv/bin/activate && coverage run --source='./src' src/manage.py test {{ modules }}
. venv/bin/activate && coverage report --show-missing --skip-covered