Refactoring things and doing stuff in a MVP way. #15

Merged
valberg merged 23 commits from vidir_refactor into master 2021-03-12 16:20:53 +00:00
2 changed files with 29 additions and 12 deletions
Showing only changes of commit 0bad2a599c - Show all commits

View file

@ -1,4 +1,4 @@
DOCKER_RUN = docker-compose run DOCKER_RUN = docker-compose run -e UID=`id -u` -e GID=`id -g`
DOCKER_BUILD = DOCKER_BUILDKIT=1 docker build DOCKER_BUILD = DOCKER_BUILDKIT=1 docker build
MANAGE = ${DOCKER_RUN} backend python /app/src/manage.py MANAGE = ${DOCKER_RUN} backend python /app/src/manage.py
@ -31,3 +31,9 @@ manage_command:
test: test:
${DOCKER_RUN} backend pytest src/ ${DOCKER_RUN} backend pytest src/
add_dependency:
${DOCKER_RUN} backend poetry add --lock ${DEPENDENCY}
add_dev_dependency:
${DOCKER_RUN} backend poetry add -D --lock ${DEPENDENCY}

View file

@ -1,24 +1,35 @@
# member.data.coop # member.data.coop
To start developing: ## Development requirements
Get poetry - Docker
- Docker compose
- pre-commit (preferred for contributions)
$ python3 -m pip install --user pipx ## Start local server
$ pipx install poetry
Run poetry to setup environment Given that the requirements above are installed, it should be as easy as:
$ poetry install $ make migrate
Run this make target, which installs all the requirements and sets up a development database. This will setup the database. Next run:
$ make dev-setup $ make run
To run the Django development server: This will build the docker image and start the member system on http://localhost:8000.
$ poetry run python manage.py runserver You can create a superuser by running:
Before you push your stuff, run tests: $ make createsuperuser
Make migrations:
$ make makemigrations
Make messages:
$ make makemessages
Running tests:
$ make test $ make test