-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: install_db.sh => update TAXREF version + add makefile + fix b…
…abel config
- Loading branch information
Showing
3 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
-include Makefile.perso.mk | ||
|
||
########################### | ||
# colors # | ||
########################### | ||
PRINT_COLOR = printf | ||
COLOR_SUCCESS = \033[1;32m | ||
COLOR_DEBUG = \033[36m | ||
COLOR_RESET = \033[0m | ||
|
||
########################### | ||
# Virtual env # | ||
########################### | ||
|
||
ACTIVATE_VENV:=. venv/bin/activate | ||
|
||
########################### | ||
# Run project # | ||
########################### | ||
|
||
.PHONY: serve | ||
serve: | ||
$(call display_cmd, "Start serve") | ||
$(ACTIVATE_VENV) && flask --app ./atlas/app run --debug -h 0.0.0.0 | ||
|
||
########################### | ||
# Check code # | ||
########################### | ||
|
||
.PHONY: flake8 | ||
flake8: | ||
$(call display_cmd, "Check with flake8") | ||
$(ACTIVATE_VENV) && pip install flake8 && flake8 atlas | ||
|
||
########################### | ||
# Manage translations # | ||
########################### | ||
|
||
.PHONY: messages | ||
messages: | ||
$(call display_cmd, "Extract translations") | ||
$(ACTIVATE_VENV) && pybabel extract -F atlas/babel.cfg -o messages.pot atlas | ||
$(ACTIVATE_VENV) && pybabel update -i messages.pot -d atlas/translations | ||
|
||
.PHONY: compile_messages | ||
compile_messages: | ||
$(call display_cmd, "Apply translations") | ||
$(ACTIVATE_VENV) && pybabel compile -d atlas/translations | ||
|
||
define display_cmd | ||
@$(PRINT_COLOR) "\n$(COLOR_SUCCESS) ################# $(COLOR_RESET)\n" | ||
@$(PRINT_COLOR) "$(COLOR_SUCCESS) ### Test $(1) $(COLOR_RESET)\n" | ||
@$(PRINT_COLOR) "\n$(COLOR_SUCCESS) ################# $(COLOR_RESET)\n\n" | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[python: **.py] | ||
[jinja2: **/templates/**/**.html] | ||
[jinja2: **/static/custom/templates/**.sample] | ||
extensions=jinja2.ext.autoescape,jinja2.ext.with_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters