garden: rename "format" to "fmt"
[git-cola.git] / garden.yaml
blob31389edafa8875eb734790af1b2fa8894258028c
1 # Use "cargo install garden-tools" to install garden (https://gitlab.com/garden-rs/garden).
3 # Usage:
5 #   # Development Workflows
6 #   garden develop              # Run from a virtualenv to "pip install --editable ."
7 #   garden requirements         # Install runtime requirements
8 #   garden requirements/opt     # Install optional runtime requirements
9 #   garden requirements/dev     # Install developer requirements
10 #   garden test                 # Run the test suite
11 #   garden fmt                  # Format code using "black"
12 #   garden doc                  # Generate documentation: html + manual pages
13 #   garden html                 # Generate documentation: html only
14 #   garden man                  # Generate documentation: manual pages only
15 #   garden pot                  # Regenerate git-cola.pot with new translations
16 #   garden po                   # Update .po files with new translations from git-cola.pot
18 #   # Installation
19 #   garden install              # Install git-cola to the installation ${prefix}
20 #   garden install-doc          # Install documentation
22 #   # Variables can be overridden using "-D name=value", eg:
23 #   garden -D prefix=$PWD/dist install
24 #   garden -D prefix=$PWD/dist install-doc
26 #   # Related Projects
27 #   garden grow pages           # Clone the Git Cola homepage
28 #   garden grow fedora          # Clone the Fedora packaging
29 #   garden grow deb             # Clone the Debian packaging
30 ---
31 garden:
32   root: "${GARDEN_CONFIG_DIR}"
34 trees:
35   git-cola:
36     path: "${GARDEN_CONFIG_DIR}"
37     url: "git@gitlab.com:git-cola/git-cola.git"
38     commands:
39       develop: ${PIP} install --editable .
40       doc: ${MAKE} -C docs all
41       check: |
42         garden -vv test
43         garden -vv doc
44         garden -vv pylint
45       fmt: |
46         ${GIT} ls-files -- '*.py' |
47         ${GREP} -v ^qtpy |
48         ${XARGS} ${BLACK} --skip-string-normalization
49       html: ${MAKE} -C docs html
50       install: |
51         if test -n "${DESTDIR}"
52         then
53             pip_root="--root=${DESTDIR}"
54             export DESTDIR="${DESTDIR}"
55         fi
56         ${PIP} install --disable-pip-version-check $pip_root "--prefix=${prefix}" "$@" .
57       install-doc: ${MAKE} -C docs install DESTDIR=${DESTDIR} prefix=${prefix}
58       po: |
59         for po in cola/i18n/*.po
60         do
61             ${MSGMERGE} \
62                 --no-wrap \
63                 --no-fuzzy-matching \
64                 --sort-output \
65                 --output-file $$po.new \
66                 $$po \
67                 cola/i18n/git-cola.pot
68             mv $$po.new $$po
69         done
70       pot: |
71         ${XGETTEXT} \
72             --language=Python \
73             --keyword=N_ \
74             --no-wrap \
75             --omit-header \
76             --sort-output \
77             --output-dir cola/i18n \
78             --output git-cola.pot \
79             cola/*.py \
80             cola/*/*.py
81       man: ${MAKE} -C docs man
82       pylint: |
83         ${PYLINT} --version
84         ${PYLINT} --rcfile=.pylintrc ${PYLINT_FLAGS} "$@" cola test
85       requirements: ${PIP} install --requirement requirements/requirements.txt
86       requirements/opt: ${PIP} install --requirement requirements/requirements-optional.txt
87       requirements/dev: ${PIP} install --requirement requirements/requirements-dev.txt
88       test: ${PYTEST} ${PYTEST_FLAGS} "$@" cola test
89     remotes:
90       DasaniT: "https://github.com/DasaniT/git-cola.git"
91       Mailaender: "https://github.com/Mailaender/git-cola.git"
92       Mithil467: "https://github.com/Mithil467/git-cola.git"
93       NielBuys: "https://github.com/NielBuys/git-cola.git"
94       WNguyen14: "https://github.com/WNguyen14/git-cola.git"
95       abid1998: "https://github.com/abid1998/git-cola.git"
96       achernet: "https://github.com/achernet/git-cola.git"
97       axel-h: "https://github.com/axel-h/git-cola.git"
98       bearsh: "https://github.com/bearsh/git-cola.git"
99       bensmrs: "https://github.com/bensmrs/git-cola.git"
100       bobvanderlinden: "https://github.com/bobvanderlinden/git-cola.git"
101       brccabral: "https://github.com/brccabral/git-cola.git"
102       davvid: "git@github.com:davvid/git-cola.git"
103       dschwoerer: "https://github.com/dschwoerer/git-cola.git"
104       florisla: "https://github.com/florisla/git-cola.git"
105       fu7mu4: "https://github.com/fu7mu4/git-cola.git"
106       gdebure: "https://github.com/gdebure/git-cola.git"
107       github: "git@github.com:git-cola/git-cola.git"
108       guoyunhe: "https://github.com/guoyunhe/git-cola.git"
109       gyuris: "https://github.com/gyuris/git-cola.git"
110       haffmans: "https://github.com/haffmans/git-cola.git"
111       harmathy: "https://github.com/harmathy/git-cola.git"
112       hsoft: "https://github.com/hsoft/git-cola.git"
113       jamie-pate: "https://github.com/jamie-pate/git-cola.git"
114       kenyuy: "https://github.com/kenyuy/git-cola.git"
115       kisaragi-hiu: "https://github.com/kisaragi-hiu/git-cola.git"
116       kneirinck: "https://github.com/kneirinck/git-cola.git"
117       kurtmckee: "https://github.com/kurtmckee/git-cola.git"
118       laerreal: "https://github.com/laerreal/git-cola.git"
119       lah7: "https://github.com/lah7/git-cola.git"
120       living180: "https://github.com/living180/git-cola.git"
121       ljhcage: "https://github.com/ljhcage/git-cola.git"
122       malpas: "https://github.com/malpas/git-cola.git"
123       melkecelioglu: "https://github.com/melkecelioglu/git-cola.git"
124       milestone12: "https://github.com/milestone12/git-cola.git"
125       mmargoliono: "https://github.com/mmargoliono/git-cola"
126       mp-chet: "https://github.com/mp-chet/git-cola.git"
127       nakanoi: "https://github.com/nakanoi/git-cola.git"
128       nandalopes: "https://github.com/nandalopes/git-cola.git"
129       pilarmolinalopez: "https://github.com/pilarmolinalopez/git-cola.git"
130       quintusfelix: "https://github.com/quintusfelix/git-cola.git"
131       rafaelreuber: "https://github.com/rafaelreuber/git-cola.git"
132       scop: "https://github.com/scop/git-cola.git"
133       sergei-dyshel: "https://github.com/sergei-dyshel/git-cola.git"
134       skunkwerks: "https://github.com/skunkwerks/git-cola.git"
135       takluyver: "https://github.com/takluyver/git-cola.git"
136       thk123: "https://github.com/thk123/git-cola.git"
137       timgates42: "https://github.com/timgates42/git-cola.git"
138       vdragon: "https://github.com/Vdragon/git-cola.git"
139       victorhck: "https://github.com/victorhck/git-cola.git"
140       virtualstaticvoid: "https://github.com/virtualstaticvoid/git-cola.git"
141       wm4: "https://github.com/wm4/git-cola.git"
142       wojnilowicz: "https://github.com/wojnilowicz/git-cola.git"
143   deb:
144     description: Debian packaging for Git Cola
145     url: "git@gitlab.com:git-cola/git-cola-debian.git"
146     remotes:
147       davvid: "git@github.com:davvid/git-cola-debian.git"
148   fedora:
149     description: Fedora packaging for Git Cola
150     url: "git@gitlab.com:git-cola/git-cola-fedora.git"
151     remotes:
152       fedora: "https://src.fedoraproject.org/rpms/git-cola.git"
153       github: "git@github.com:davvid/git-cola-fedora.git"
154   pages:
155     description: "Git Cola's homepage"
156     url: "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
157     remotes:
158       github: "git@github.com:git-cola/git-cola.github.io.git"
159       ls-jad-elkik: "git://github.com/ls-jad-elkik/git-cola.github.io.git"
160       lz-coder: "https://github.com/lz-coder/git-cola.github.io.git"
161     links:
162       - "https://git-cola.gitlab.io"
163       - "https://git-cola.github.io"
165 # Variables can be overridden externally using "garden -D name=value ...".
166 variables:
167   # Traditional DESTDIR + prefix variables
168   DESTDIR: ""
169   prefix: ${GARDEN_CONFIG_DIR}/dist
170   # External commands and options
171   BLACK: black
172   GIT: git
173   GREP: grep
174   MAKE: make
175   MSGMERGE: msgmerge
176   PIP: pip
177   PYLINT: ${PYTHON3} -B -m pylint
178   PYLINT_FLAGS: |
179     $ if ${PYLINT} --score=no --help >/dev/null 2>&1
180     then
181         printf '%s' "--score=no"
182     fi
183   PYTEST: ${PYTHON3} -B -m pytest
184   PYTEST_FLAGS: |
185     $ if test "$(uname -s)" != "Linux"
186     then
187         printf '%s' --ignore=cola/inotify.py
188     fi
189   PYTHON3: python3
190   XARGS: xargs
191   XGETTEXT: xgettext