11# https://taskfile.dev
2+ #
3+ # This is a generated file. We dot not suggest to edit it.
4+ # Instead, create a file `TaskfileCustom.yml` and add your additions there.
25---
36version : ' 3'
47
@@ -10,13 +13,16 @@ dotenv: ['.copier-answers.env', '.env']
1013 - check:prepare
1114
1215vars :
13- PACKAGE : cmem_plugin_$project_slug
16+ PACKAGE : $package_dir
1417 DIST_DIR : dist
1518
1619includes :
1720 custom :
1821 taskfile : ./TaskfileCustom.yaml
1922 optional : true
23+ plugin :
24+ taskfile : .tasks-plugin.yml
25+ optional : true
2026
2127tasks :
2228
@@ -43,6 +49,10 @@ tasks:
4349 Check poetry versioning plugin. Currently not under Windows
4450 run : once
4551 preconditions :
52+ - sh : ' [ -d .git ]'
53+ msg : >
54+ Your newly created project directory needs to be initialized
55+ as a git repository.
4656 - sh : ' [[ {{.PDV_VERSION}} > {{.PDV_VERSION_MIN}} ]]'
4757 msg : >
4858 This project needs the poetry-dynamic-versioning
@@ -113,23 +123,26 @@ tasks:
113123 poetry run pytest --junitxml={{.JUNIT_FILE}}
114124 --cov-report term --cov-report xml:{{.COVERAGE_FILE}}
115125 --cov-report html:{{.COVERAGE_DIR}} --cov={{.PACKAGE}}
126+ --html={{.HTML_FILE}} --self-contained-html
116127 - platforms : [darwin, linux]
117128 cmd : >
118129 poetry run pytest --memray --junitxml={{.JUNIT_FILE}}
119130 --cov-report term --cov-report xml:{{.COVERAGE_FILE}}
120131 --cov-report html:{{.COVERAGE_DIR}} --cov={{.PACKAGE}}
132+ --html={{.HTML_FILE}} --self-contained-html
121133 - cmd : >
122134 poetry run genbadge coverage -l
123135 -i {{.COVERAGE_FILE}} -o {{.BADGE_COVERAGE}}
124136 - cmd : >
125137 poetry run genbadge tests -l
126138 -i {{.JUNIT_FILE}} -o {{.BADGE_TESTS}}
127139 vars :
128- JUNIT_FILE : ./{{.DIST_DIR}}/junit-pytest.xml
129- COVERAGE_FILE : ./{{.DIST_DIR}}/coverage.xml
130- COVERAGE_DIR : ./{{.DIST_DIR}}/coverage
131140 BADGE_COVERAGE : ./{{.DIST_DIR}}/badge-coverage.svg
132141 BADGE_TESTS : ./{{.DIST_DIR}}/badge-tests.svg
142+ COVERAGE_DIR : ./{{.DIST_DIR}}/coverage
143+ COVERAGE_FILE : ./{{.DIST_DIR}}/coverage.xml
144+ HTML_FILE : ./{{.DIST_DIR}}/pytest.html
145+ JUNIT_FILE : ./{{.DIST_DIR}}/junit-pytest.xml
133146
134147 check:mypy :
135148 desc : Complain about typing errors
@@ -144,30 +157,22 @@ tasks:
144157 << : *preparation
145158 cmds :
146159 # ignore 51358 safety - dev dependency only
147- # ignore 61489 pillow - dev dependency only
148- - poetry run safety check -i 51358 -i 61489
160+ # ignore 67599 pip - dev dependency only
161+ # ignore 70612 jinja2 - dev dependency only
162+ - poetry run safety check -i 51358 -i 67599 -i 70612
149163
150164 check:ruff :
151165 desc : Complain about everything else
152166 << : *preparation
153167 cmds :
154- - poetry run ruff check --show-source tests {{.PACKAGE}}
155168 - poetry run ruff check --exit-zero tests {{.PACKAGE}} {{.XML_PARAMS}}
169+ - poetry run ruff check --output-format=concise tests {{.PACKAGE}}
156170 - poetry run ruff format --check tests {{.PACKAGE}}
157171 vars :
158172 JUNIT_FILE : ./{{.DIST_DIR}}/junit-ruff.xml
159173 XML_PARAMS : --output-format junit --output-file {{.JUNIT_FILE}}
160174
161175 # }}}
162- # {{{ build and deploy tasks
163-
164- deploy :
165- desc : Install plugin package in Corporate Memory
166- deps :
167- - build
168- cmds :
169- - cmemc admin workspace python install dist/*.tar.gz
170- - cmemc admin workspace python list-plugins
171176
172177 build :
173178 desc : Build a tarball and a wheel package
@@ -178,5 +183,3 @@ tasks:
178183 cmds :
179184 - poetry build
180185
181- # }}}
182-
0 commit comments