From 06d2cde5260c46d865b3032e6be33a4340edf3d4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 24 Feb 2021 12:08:13 +0100 Subject: Documentation: update values --- Makefile.example | 75 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 35 deletions(-) (limited to 'Makefile.example') 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 -- cgit v1.2.3