Add schema generation to Makefile
update README, add "make test"
This commit is contained in:
parent
4b855c6f77
commit
ea1e68c4ea
3 changed files with 18 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,12 +7,12 @@
|
||||||
/virtualenv/
|
/virtualenv/
|
||||||
/pip-selfcheck.json
|
/pip-selfcheck.json
|
||||||
|
|
||||||
|
|
||||||
# transient files
|
# transient files
|
||||||
/db-local.sqlite3*
|
/db-local.sqlite3*
|
||||||
/static
|
/static
|
||||||
/media
|
/media
|
||||||
/mamweb/static
|
/mamweb/static
|
||||||
|
/schema_*.pdf
|
||||||
|
|
||||||
# aux files
|
# aux files
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: clean_env init_env clean_virtualenv install_packages clean install run all
|
.PHONY: clean_env init_env clean_virtualenv install_packages clean install run all schema_seminar.pdf schema_all.pdf
|
||||||
PYTHON=python2.7
|
PYTHON=python2.7
|
||||||
VE_VER=12.0.7
|
VE_VER=12.0.7
|
||||||
LOCAL_PYTHON=bin/python
|
LOCAL_PYTHON=bin/python
|
||||||
|
@ -23,6 +23,7 @@ install_packages: make_env
|
||||||
clean_env:
|
clean_env:
|
||||||
rm -rf bin/ include/ lib/ local/ share/
|
rm -rf bin/ include/ lib/ local/ share/
|
||||||
rm -f pip-selfcheck.json
|
rm -f pip-selfcheck.json
|
||||||
|
rm -f schema_seminar.pdf schema_all.pdf
|
||||||
|
|
||||||
# binary name representing set-up env
|
# binary name representing set-up env
|
||||||
${LOCAL_PYTHON}: virtualenv
|
${LOCAL_PYTHON}: virtualenv
|
||||||
|
@ -44,6 +45,19 @@ clean_virtualenv:
|
||||||
run:
|
run:
|
||||||
./manage.py runserver_plus
|
./manage.py runserver_plus
|
||||||
|
|
||||||
|
test:
|
||||||
|
./manage.py test
|
||||||
|
|
||||||
|
# DB schemata
|
||||||
|
|
||||||
|
schema: schema_seminar.pdf schema_all.pdf
|
||||||
|
|
||||||
|
schema_seminar.pdf:
|
||||||
|
./manage.py graph_models seminar | dot -Tpdf > schema_seminar.pdf
|
||||||
|
|
||||||
|
schema_all.pdf:
|
||||||
|
./manage.py graph_models -a -g | dot -Tpdf > schema_all.pdf
|
||||||
|
|
||||||
|
|
||||||
TEST_USER=${USER}
|
TEST_USER=${USER}
|
||||||
TEST_SERVER=atrey.karlin.mff.cuni.cz
|
TEST_SERVER=atrey.karlin.mff.cuni.cz
|
||||||
|
|
|
@ -37,6 +37,8 @@ Make commands
|
||||||
At test server, the media data and database are kept the same.
|
At test server, the media data and database are kept the same.
|
||||||
Everything else not in .gitignore is deleted/overwritten on the test server.
|
Everything else not in .gitignore is deleted/overwritten on the test server.
|
||||||
|
|
||||||
|
* `make schema` - generates graph of seminar and all schemas as PDF. Supercool!
|
||||||
|
|
||||||
./manage.py commands
|
./manage.py commands
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue