diff --git a/Makefile b/Makefile index c656b21c4b61db118cc5a92b25c2dccd8ea845fd..63dd67bead6947b1df68d7c214d6de4967842145 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ APP_LIST ?= core grady util +DB_NAME = postgres - -.PHONY: collectstatic run install migrations-check isort isort-check build-webpack +.PHONY: collectstatic run install migrations-check isort isort-check collectstatic: # used only in production ./manage.py collectstatic --ignore node_modules @@ -29,3 +29,19 @@ loadexamples: install: pip install -r requirements.txt yarn install --modules-folder core/static/node_modules + +test: + python manage.py run test + +coverage: + coverage run manage.py test + coverage report + +docker-db-create: + docker create --name $(DB_NAME) -p 5432:5432 postgres:9.5 + +docker-db-start: + docker start $(DB_NAME) + +docker-db-stop: + docker start $(DB_NAME) diff --git a/README.md b/README.md index 801bc772974e619ebdc683fcdb82d545616678e0..c1528aa1c1972f1f56509804a186287c658335f7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,18 @@ University of Goettingen. It is deployed as a Django web application. [](https://gitlab.gwdg.de/j.michal/grady/commits/master) [](https://gitlab.gwdg.de/j.michal/grady/commits/master) +Contributing +------------ + +Feature proposals are welcome! If you experienced any bugs or otherwise +unexpected behavior please submit an issue using the issue templates. + +It is on course possible to contribute but currently there is no standardized +way since the project is in a very early stage and fairly small. If you feel the +need to help us out anyway, please contact us via our university email +addresses. + + Dependencies ------------ @@ -55,7 +67,10 @@ To set up a new instance perform the following steps: 4. Set up a Postgres 9.5 database. If you have docker installed the easiest way is to just run it in a docker container, like this: - docker run --rm --name postgres -p 5432:5432 postgres:9.5 + docker run -d --rm --name postgres -p 5432:5432 postgres:9.5 + + Alternatively, take a look at the Makefile targets that should make your + life easier. And apply database migrations: @@ -69,7 +84,12 @@ To set up a new instance perform the following steps: More users can be added in the admin interface. You should be able to reach it via <http://localhost:8000/admin>. -6. Everything is set. You can start the development server with: +6. To import some test data in order to see how the application might look like + run: + + make loadexamples + +7. Everything is set. You can start the development server with: python manage.py runserver @@ -77,11 +97,6 @@ To set up a new instance perform the following steps: make run -7. To import some test data in order to see how the application might look like - run: - - make loadexamples - Testing ------- @@ -97,8 +112,7 @@ file of each app (currently only `core`). You can run those tests with or if you want a coverage report as well you can run: - coverage --source='.' manage.py test core - coverage report + make coverage Overview --------