diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-24 12:08:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:25 +0100 |
commit | ab86d31c813a2c7307cfcf111faace1d6ac53d90 (patch) | |
tree | 166a9fb5fa9201419f2acb44438dca6a49a29b39 /Makefile.example | |
parent | 91ec123729a6947bd0bb7230eaa5f6b90265840e (diff) | |
download | Ishtar-ab86d31c813a2c7307cfcf111faace1d6ac53d90.tar.bz2 Ishtar-ab86d31c813a2c7307cfcf111faace1d6ac53d90.zip |
Documentation: update values
Diffstat (limited to 'Makefile.example')
-rw-r--r-- | Makefile.example | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/Makefile.example b/Makefile.example index 98ac959e0..3330f3dc7 100644 --- a/Makefile.example +++ b/Makefile.example @@ -30,17 +30,49 @@ clean: ## remove temporary files update: clean syncdb compilemessages collectstatic ## update the instance +migrations: ## generate database migrations + cd $(project);\ + for APP in "overload_translation" $(apps); do \ + echo "* makemigrations for "$$APP; \ + $(PYTHON) ./manage.py makemigrations $$APP; \ + done + migrate: ## migrate database cd $(project); $(PYTHON) manage.py migrate +collectstatic: ## collect all static files + cd $(project);$(PYTHON) manage.py collectstatic --noinput + +makemessages: ## generate translation messages + cd $(CURDIR); \ + $(PYTHON) $(project)/manage.py makemessages --all; \ + #msgfilter -i locale/fr/LC_MESSAGES/django.po sed -e d | sed -e "s/fuzzy//g" > locale/django.pot ;\ + compilemessages: ## compile translations cd $(CURDIR); \ $(PYTHON) $(project)/manage.py compilemessages; \ -collectstatic: ## collect all static files - cd $(project);$(PYTHON) manage.py collectstatic --noinput +build_doc_values: + cd $(project);\ + echo 'exec(open("../docs/generate_values_doc.py").read())' | $(PYTHON) ./manage.py shell -##@ Development: build/tests +build_doc_model_graph: + cd $(project);\ + echo 'exec(open("../docs/generate_values_doc.py").read())' | $(PYTHON) ./manage.py shell + cd $(project);\ + $(PYTHON) manage.py graph_models --pydot -g -I "ImporterModel,ImporterType,ImporterDefault,ImporterDefaultValues,ImporterColumn,Regexp,ImportTarget,FormaterType,Import" ishtar_common > /tmp/ishtar-imports.dot ;\ + dot -Tsvg /tmp/ishtar-imports.dot -o ../docs/source/_static/db-imports.svg + rm /tmp/ishtar-imports.dot + cd $(project);\ + for APP in $(apps); do \ + $(PYTHON) manage.py graph_models -g --pydot $$APP > /tmp/ishtar-$$APP.dot; \ + dot -Tsvg /tmp/ishtar-$$APP.dot -o ../docs/source/_static/db-$$APP.svg; \ + rm /tmp/ishtar-$$APP.dot ; \ + done + +build_doc: build_doc_values build_doc_model_graph ## generate documentation + +##@ Development: tests test: clean ## launch tests cd $(project); $(PYTHON) manage.py test $(apps) @@ -48,6 +80,9 @@ test: clean ## launch tests soft_test: clean ## launch tests without database regeneration cd $(project); $(PYTHON) manage.py test -k $(apps) +soft_test_verbose: clean ## launch tests without database regeneration - verbose + cd $(project); $(PYTHON) manage.py test -k --verbosity 2 $(apps) + build_gitlab: clean collectstatic ## specific build for gitlab cd $(project); $(PYTHON) ./manage.py migrate @@ -74,45 +109,15 @@ pylint: ##@ Development: run -shell: +shell: ## launch shell cd $(project);$(PYTHON) manage.py shell run: ## run test server cd $(project); $(PYTHON) manage.py runserver 0.0.0.0:8000 -runcelery: +runcelery: ## run a celery worker celery -A example_project worker -l info -##@ Development: translations - -makemessages: - cd $(CURDIR); \ - $(PYTHON) $(project)/manage.py makemessages --all; \ - #msgfilter -i locale/fr/LC_MESSAGES/django.po sed -e d | sed -e "s/fuzzy//g" > locale/django.pot ;\ - -##@ Development: database - -migrations: - cd $(project);\ - for APP in "overload_translation" $(apps); do \ - echo "* makemigrations for "$$APP; \ - $(PYTHON) ./manage.py makemigrations $$APP; \ - done - -generate_doc: - cd $(project);\ - echo 'exec(open("../docs/generate_values_doc.py").read())' | $(PYTHON) ./manage.py shell - cd $(project);\ - $(PYTHON) manage.py graph_models --pydot -g -I "ImporterModel,ImporterType,ImporterDefault,ImporterDefaultValues,ImporterColumn,Regexp,ImportTarget,FormaterType,Import" ishtar_common > /tmp/ishtar-imports.dot ;\ - dot -Tsvg /tmp/ishtar-imports.dot -o ../docs/source/_static/db-imports.svg - rm /tmp/ishtar-imports.dot - cd $(project);\ - for APP in $(apps); do \ - $(PYTHON) manage.py graph_models -g --pydot $$APP > /tmp/ishtar-$$APP.dot; \ - dot -Tsvg /tmp/ishtar-$$APP.dot -o ../docs/source/_static/db-$$APP.svg; \ - rm /tmp/ishtar-$$APP.dot ; \ - done - ##@ Manage fixtures fixtures: fixtures_auth fixtures_common fixtures_operations fixtures_context_records fixtures_finds fixtures_warehouse fixtures_files |