summaryrefslogtreecommitdiff
path: root/Makefile.example
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-08-29 16:12:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:18 +0100
commit3d48c54fef303bd869b51dc967c4463a5449cd67 (patch)
tree419d70328d660e596066bc0425609cf93cf61729 /Makefile.example
parent7a787f0ef5f0cbe381e87267278ea7fd577596d3 (diff)
downloadIshtar-3d48c54fef303bd869b51dc967c4463a5449cd67.tar.bz2
Ishtar-3d48c54fef303bd869b51dc967c4463a5449cd67.zip
New geo fixtures
Diffstat (limited to 'Makefile.example')
-rw-r--r--Makefile.example31
1 files changed, 21 insertions, 10 deletions
diff --git a/Makefile.example b/Makefile.example
index 57642a48f..9fd739e9a 100644
--- a/Makefile.example
+++ b/Makefile.example
@@ -87,15 +87,15 @@ test: clean ## launch tests
cd $(project); $(PYTHON) manage.py test $(apps)
soft_test: clean ## launch tests without database regeneration
- cd $(project); $(PYTHON) manage.py test -k --tag gis --exclude-tag ui $(apps)
+ cd $(project); $(PYTHON) manage.py test -k --tag gis --exclude-tag ui --exclude-tag libreoffice $(apps)
cd $(project); $(PYTHON) manage.py test -k --exclude-tag gis --exclude-tag ui $(apps)
soft_test_verbose: clean ## launch tests without database regeneration - verbose
cd $(project); $(PYTHON) manage.py test -k --verbosity 2 $(apps)
soft_test_multi: clean ## launch multi-process tests without database regeneration
- cd $(project); $(PYTHON) manage.py test -k --parallel $(NB_PROCESS) --exclude-tag ui --tag gis $(apps)
- cd $(project); $(PYTHON) manage.py test -k --parallel $(NB_PROCESS) --exclude-tag ui --exclude-tag gis $(apps)
+ cd $(project); $(PYTHON) manage.py test -k --parallel $(NB_PROCESS) --exclude-tag libreoffice --exclude-tag ui --tag gis $(apps)
+ cd $(project); $(PYTHON) manage.py test -k --parallel $(NB_PROCESS) --exclude-tag libreoffice --exclude-tag ui --exclude-tag gis $(apps)
test_ui: clean ## launch tests for UI
cd $(project); $(PYTHON) manage.py test --tag ui $(apps)
@@ -107,12 +107,15 @@ build_gitlab: clean collectstatic ## specific build for gitlab
cd $(project); $(PYTHON) ./manage.py migrate
test_gitlab: build_gitlab ##
- cd $(project); $(PYTHON) manage.py test --tag gis --exclude-tag ui $(apps)
- cd $(project); $(PYTHON) manage.py test --exclude-tag gis --exclude-tag ui $(apps)
+ cd $(project); $(PYTHON) manage.py test --tag gis --exclude-tag ui --exclude-tag libreoffice $(apps)
+ cd $(project); $(PYTHON) manage.py test --exclude-tag gis --exclude-tag ui --exclude-tag libreoffice $(apps)
soft_test_gitlab: build_gitlab
cd $(project); $(PYTHON) manage.py -k test $(apps)
+run_libreoffice:
+ /usr/bin/libreoffice --headless --accept="socket,host=127.0.0.1,port=8101;urp;" --nodefault --nofirststartwizard --nolockcheck --nologo --norestore --invisible --pidfile=/var/run/libreoffice.pid
+
##@ Development: checks
coverage: clean ## launch test coverage
@@ -137,7 +140,11 @@ run: ## run test server
cd $(project); $(PYTHON) manage.py runserver 0.0.0.0:8000
runcelery: ## run a celery worker
- celery -A example_project worker -l info
+ celery -A example_project worker -l INFO
+
+blackd: ## blackd service
+ $(VENV)bin/blackd
+
##@ Manage fixtures
@@ -148,7 +155,7 @@ fixtures_auth:
auth.permission auth.group \
> '../fixtures/initial_data-auth-'$(default_data)'.json'
-fixtures_common: fixtures_common_importers fixtures_spatialrefsystem
+fixtures_common: fixtures_common_importers fixtures_geo
cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \
ishtar_common.authortype \
ishtar_common.profiletype \
@@ -190,10 +197,14 @@ fixtures_common_towns:
sed -e 's/"children": *\[\r *\[\r *"[0-9-]*", *\r *[0-9]*\ *\r *\]\r *\]/"children": []/g' | \
tr '\r' '\n' > 'ishtar_common/fixtures/towns_norel-'$(default_data)'.json'
-fixtures_spatialrefsystem:
+fixtures_geo:
cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \
- ishtar_common.SpatialReferenceSystem \
- > '../ishtar_common/fixtures/initial_spatialrefsystem-'$(default_data)'.json'
+ ishtar_common.spatialreferencesystem \
+ ishtar_common.geobuffertype \
+ ishtar_common.geoorigintype \
+ ishtar_common.geodatatype \
+ ishtar_common.geoprovidertype \
+ > '../ishtar_common/fixtures/initial_geo-'$(default_data)'.json'
fixtures_operations:
cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \