-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.cfg
154 lines (141 loc) · 4.36 KB
/
base.cfg
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[buildout]
index = https://pypi.org/simple/
extensions = mr.developer
parts =
instance
test
test-coverage
code-analysis
dependencychecker
dependencies
update-translations
find-untranslated
omelette
develop = .
sources-dir = extras
auto-checkout =
# plone.rest
allow-hosts =
*.python.org
*.plone.org
*.zope.org
pypi.org
files.pythonhosted.org
launchpad.net
code.google.com
robotframework.googlecode.com
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
deprecation-warnings = on
debug-exceptions = on
eggs =
Plone
Pillow
plone.app.debugtoolbar
plone.formwidget.hcaptcha [test]
environment-vars =
zope_i18n_compile_mo_files true
zcml-additional =
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:plone="http://namespaces.plone.org/plone">
<plone:CORSPolicy
allow_origin="http://localhost:4300,http://127.0.0.1:4300,http://localhost:3000,http://127.0.0.1:3000"
allow_methods="DELETE,GET,OPTIONS,PATCH,POST,PUT"
allow_credentials="true"
expose_headers="Content-Length,X-My-Header"
allow_headers="Accept,Authorization,Content-Type,X-Custom-Header"
max_age="3600"
/>
</configure>
[test]
recipe = zc.recipe.testrunner
eggs = ${instance:eggs}
initialization =
os.environ['TZ'] = 'UTC'
os.environ['ZSERVER_PORT'] = '55001'
defaults = ['-s', 'plone.formwidget.hcaptcha', '--auto-color', '--auto-progress']
[test-coverage]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
export TZ=UTC
${buildout:directory}/bin/coverage run bin/test $*
${buildout:directory}/bin/coverage html
${buildout:directory}/bin/coverage report -m --fail-under=90
# Fail (exit status 1) if coverage returns exit status 2 (this happens
# when test coverage is below 100%.
output = ${buildout:directory}/bin/test-coverage
mode = 755
[code-analysis]
recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/src
flake8-exclude=bootstrap.py,bootstrap-buildout.py,docs,bin,*.egg,setup.py,overrides,omelette
flake8-max-complexity = 25
flake8-ignore = E203, E266, E501, W503, E231
flake8-max-line-length = 200
# flake8-select = B,C,E,F,W,T4,B9
flake8-extensions =
flake8-coding
flake8-debugger
flake8-print
# flake8-isort
# additional pep8/flake8 rules, see docs for details
# https://pep8.readthedocs.io/en/1.4.6/intro.html#error-codes
# - E123: closing bracket does not match indentation of opening bracket’s line
# flake8-select = E123
[dependencychecker]
recipe = zc.recipe.egg
eggs =
z3c.dependencychecker
plone.formwidget.hcaptcha
scripts = dependencychecker
[dependencies]
recipe = zc.recipe.egg
eggs =
zest.releaser[recommended]
zest.pocompile
zestreleaser.towncrier
towncrier
readme
docutils
zpretty
i18ndude
coverage
[update-translations]
recipe = collective.recipe.template
input = inline:
domain=plone.formwidget.hcaptcha
maindir=src/plone/formwidget/hcaptcha
locales=$maindir/locales
echo "Update translations for $domain"
if [ ! -f $locales/$domain.pot ]; then
# Create .pot file if it does not exist yet
touch $locales/$domain.pot
fi
if [ ! -f $locales/de/LC_MESSAGES ]; then
# Create de/LC_MESSAGES directory if it does not exist yet
mkdir -p $locales/de/LC_MESSAGES
fi
if [ ! -f $locales/de/LC_MESSAGES/$domain.po ]; then
# Create .po file if it does not exist yet
touch $locales/de/LC_MESSAGES/$domain.po
fi
${buildout:directory}/bin/i18ndude rebuild-pot --pot $locales/$domain.pot --create $domain $maindir
${buildout:directory}/bin/i18ndude sync --pot $locales/$domain.pot $locales/*/LC_MESSAGES/$domain.po
output = ${buildout:directory}/bin/update-translations
mode = 755
[find-untranslated]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
bin/i18ndude find-untranslated `find -L src/plone/formwidget/hcaptcha -regex ".*\.[cz]?pt"`
output = ${buildout:directory}/bin/find-untranslated
mode = 755
[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}
[sources]
plone.rest = git git://github.com/plone/plone.rest.git pushurl=git@github.com:plone/plone.rest.git branch=master
plone.schema = git git://github.com/plone/plone.schema.git pushurl=git@github.com:plone/plone.schema.git branch=newjsonschemafield