Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve/118358 itinerary performance #701

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
- name: Create Docker Top and Zaak Backend Bridge network
run: docker network create top_and_zaak_backend_bridge
- name: Build Docker image
run: docker-compose -f docker-compose.local.yml up -d
run: docker compose -f docker-compose.local.yml up -d
- name: Run Tests
run: docker-compose -f docker-compose.local.yml exec -T api python manage.py test
run: docker compose -f docker-compose.local.yml exec -T api python manage.py test
5 changes: 1 addition & 4 deletions app/apps/itinerary/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ def create(self, request):
case_id = case.get("id")
itinerary.add_case(case_id)

# Serialize the itinerary again
serializer = ItinerarySerializer(itinerary, context={"request": request})

return Response(serializer.data)
return Response("Itinerary created successfully")

def list(self, request):
date = self.__get_date_from_query_parameter__(request)
Expand Down
14 changes: 7 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Dankzij de TOP app hebben toezichthouders Wonen veel informatie over zaken, adre

## Build:
```bash
docker-compose -f docker-compose.local.yml build
docker compose -f docker-compose.local.yml build
```

## Creating networks
Expand All @@ -21,7 +21,7 @@ docker network create top_and_zaak_backend_bridge
## Starting the development server:
Start the dev server for local development:
```bash
docker-compose -f docker-compose.local.yml up
docker compose -f docker-compose.local.yml up
```

## Importing fixtures dump
Expand All @@ -30,13 +30,13 @@ The Django project needs some configuration in order to run locally. It's possib
Move the json into the `app` directory on the root of your project, and run the following command

```bash
docker-compose run --rm api python manage.py loaddata <name of fixture>
docker compose run --rm api python manage.py loaddata <name of fixture>
```
Remove the json fixture after installing it.

## Creating a superuser:
```bash
docker-compose run --rm api python manage.py createsuperuser
docker compose run --rm api python manage.py createsuperuser
```
A superuser can be used to access the Django backend

Expand Down Expand Up @@ -69,12 +69,12 @@ To fix this use threads instead by setting LOCAL_DEVELOPMENT_USE_MULTIPROCESSING
Run a command inside the docker container:

```bash
docker-compose run --rm api [command]
docker compose run --rm api [command]
```

Running migrations:
```bash
docker-compose run --rm api python manage.py migrate
docker compose run --rm api python manage.py migrate
```

## Adding pre-commit hooks
Expand All @@ -98,7 +98,7 @@ The project uses [Black](https://github.com/psf/black) for formatting and [Flake
## Running unit tests
Unit tests can be run using the following command:
```bash
docker-compose -f docker-compose.local.yml run --rm api python manage.py test
docker compose -f docker-compose.local.yml run --rm api python manage.py test

```

Expand Down