forked from OctoPrint/OctoPrint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
141 lines (113 loc) · 3.25 KB
/
Taskfile.yml
File metadata and controls
141 lines (113 loc) · 3.25 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
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
# https://taskfile.dev
version: "3"
env:
LOCALES:
- de
tasks:
install:
desc: Installs OctoPrint into the current Python environment
cmds:
- python -m pip install -e .
install-dev:
desc: Installs OctoPrint incl. develop, plugins & docs dependencies into the current Python environment
cmds:
- python -m pip install -e ".[develop,plugins,docs]"
init-dev:
desc: Prepares a developmenet environment by installing necessary dependencies and activating pre-commit and blame ignore file
cmds:
- task: install-dev
- pre-commit install
- git config blame.ignoreRevsFile .git-blame-ignore-revs
check-deps:
desc: Lists outdated packages in the current venv
cmds:
- pip-check -H
pre-commit:
desc: Run pre-commit on all files
cmds:
- pre-commit run --all-files
test:
desc: Run test suites
cmds:
- task: test-unit
- task: test-e2e
test-unit:
desc: Run unit tests
cmds:
- pytest
test-e2e:
desc: Run e2e tests
cmds:
- |
cd tests/playwright
npx playwright test --grep-invert "@isolated|@csrf"
test-e2e-ui:
desc: Run e2e tests interactively
cmds:
- |
cd tests/playwright
npx playwright test --ui
### Build related
build:
desc: Builds sdist & wheel
cmds:
- python -m build --sdist --wheel
build-sdist:
desc: Builds sdist
cmds:
- python -m build --sdist
build-wheel:
desc: Builds wheel
cmds:
- python -m build --wheel
update-assets:
desc: Updates all assets
cmds:
- octoprint dev css:build --all
### Translation related
babel-new:
desc: Create a new translation for a locale, e.g. task babel-new -- de
cmds:
- task: babel-extract
- |
pybabel init --input-file=translations/messages.pot --output-dir=translations --locale="{{ .CLI_ARGS }}"
babel-extract:
desc: Update pot file from source
cmds:
- pybabel extract --mapping-file=babel.cfg --output-file=translations/messages.pot --msgid-bugs-address=i18n@octoprint.org --copyright-holder="The OctoPrint Project" .
babel-update:
desc: Update translation files from pot file
cmds:
- for:
var: LOCALES
cmd: pybabel update --input-file=translations/messages.pot --output-dir=translations --locale={{ .ITEM }}
babel-refresh:
desc: Update translation files from source
cmds:
- task: babel-extract
- task: babel-update
babel-compile:
desc: Compile translation files
cmds:
- pybabel compile --directory=translations
babel-bundle:
desc: Bundle translations
cmds:
- for:
var: LOCALES
cmd: |
locale="{{ .ITEM }}"
source="translations/${locale}"
target="src/octoprint/translations/${locale}"
[ ! -d "${target}" ] || rm -r "${target}"
echo "Copying translations for locale ${locale} from ${source} to ${target}..."
cp -r "${source}" "${target}"
### Docs related
docs-serve:
desc: Build & serve the docs with automatic updates
cmds:
- sphinx-autobuild docs docs/_build/html
docs-build:
desc: Build the docs
cmds:
- python -m sphinx.cmd.build -b html -v ./docs ./docs/_build