-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
42 lines (30 loc) · 1.97 KB
/
Makefile
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
.PHONY: piptools upgrade fix_transifex_resource_names translations_scripts_requirements \
validate_translation_files test_requirements test fix_transifex_resource_names_dry_run \
retry_merge_transifex_bot_pull_requests
# Default project to work on. Override to release project e.g. `openedx-translations-redwood` when cutting a release.
export TRANSIFEX_PROJECT_SLUG := openedx-translations
piptools:
pip install -q -r requirements/pip_tools.txt
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --rebuild --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip_tools.txt
pip-compile --rebuild --upgrade -o requirements/translations.txt requirements/translations.in
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
translations_scripts_requirements: ## Installs the requirements file
pip install -q -r requirements/translations.txt
fix_transifex_resource_names: ## Runs the script on the TRANSIFEX_PROJECT_SLUG project
python scripts/fix_transifex_resource_names.py
fix_transifex_resource_names_dry_run: ## Runs the script in --dry-run mode on the TRANSIFEX_PROJECT_SLUG project
python scripts/fix_transifex_resource_names.py --dry-run
test_requirements: ## Installs test.txt requirements
pip install -q -r requirements/test.txt
test: ## Run scripts tests
pytest -v -s --cov=. --cov-report=term-missing --cov-report=html scripts/tests
validate_translation_files: ## Run basic validation to ensure files are compilable
python scripts/validate_translation_files.py
export MAX_PULL_REQUESTS_TO_RESTART := 1000
retry_merge_transifex_bot_pull_requests: ## Fix Transifex bot stuck and unmerged pull requests.
bash scripts/retry_merge_transifex_bot_pull_requests.sh