Skip to content

Commit

Permalink
Fixes formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fizk committed Jul 9, 2024
1 parent 1149ded commit fcc7f76
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Loggjafarthing
This is the single-source-of-truth system for `althingi.is` data. It is a PHP 8 API with a MySQL database.

## Run for development
```sh
docker compose -f docker-compose.yml -f docker-compose.local.yml up run
```

## Environment variables:

| name | default | Options | description |
Expand Down
23 changes: 23 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'

services:

run:
environment:
- LOG_LEVEL=WARNING
- BROKER=none
networks:
- x-althingi

test:
volumes:
- ./vendor/:/var/www/vendor

database:
networks:
- x-althingi

networks:
x-althingi:
driver: bridge

17 changes: 2 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,21 @@ services:
- ./phpunit.xml.dist/:/var/www/phpunit.xml
environment:
- LOG_PATH=php://stdout
# - LOG_LEVEL=DEBUG
- LOG_LEVEL=WARNING
# INFO NOTICE WARNING ERROR CRITICAL ALERT EMERGENCY
- LOG_LEVEL=DEBUG # INFO NOTICE WARNING ERROR CRITICAL ALERT EMERGENCY

- DB_HOST=database
- DB_PORT=3306
- DB_NAME=${ENV_DB_NAME:-althingi}
- DB_USER=${ENV_DB_USER:-root}
- DB_PASSWORD=${ENV_DB_PASSWORD:-example}

# - BROKER=${ENV_BROKER:-kafka}
- BROKER=none
- BROKER=${ENV_BROKER:-kafka}
- BROKER_HOST=host.docker.internal:9092
- BROKER_CONFIG=all
- DOCUMENT_SERVER=${ENV_DOCUMENT_SERVER:-localhost:7070}
- DOCUMENT_DEFINITION=${ENV_DOCUMENT_DEFINITION:-/openapi}
depends_on:
- database
# networks:
# - x-althingi
command: '/var/www/bin/wait-for-it.sh -h database -p 3306 -- /var/www/bin/start'

#
Expand All @@ -84,7 +79,6 @@ services:
- ./composer.lock/:/var/www/composer.lock
- ./coverage/:/var/www/coverage
- ./config/:/var/www/config
# - ./vendor/:/var/www/vendor
- ./src/:/var/www/src
- ./public/:/var/www/public
- ./tests/:/var/www/tests
Expand All @@ -105,7 +99,6 @@ services:

- DOCUMENT_SERVER=${ENV_DOCUMENT_SERVER:-localhost:8080}
- DOCUMENT_DEFINITION=${ENV_DOCUMENT_DEFINITION:-/openapi}

depends_on:
- database-test
command: '/var/www/bin/wait-for-it.sh -h database-test -p 3306 -- /var/www/bin/test'
Expand All @@ -126,8 +119,6 @@ services:
- MYSQL_DATABASE=${ENV_DB_NAME:-althingi}
volumes:
- local-source-db-volume:/var/lib/mysql
# networks:
# - x-althingi
command: --default-authentication-plugin=mysql_native_password

database-test:
Expand All @@ -141,10 +132,6 @@ services:
- local-source-db-test-volume:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password

# networks:
# x-althingi:
# driver: bridge

volumes:
local-source-db-volume:
local-source-db-test-volume:
1 change: 0 additions & 1 deletion tests/Form/SpeechTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ public function validForm()

$this->assertTrue($form->isValid());
}

}
5 changes: 3 additions & 2 deletions tests/Service/CommitteeDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function getIdentifierSuccessfully()

$expectedData = 100001;

$actualData = $committeeDocument->getIdentifier(1,1,1,Model\KindEnum::A,1,'part1');
$actualData = $committeeDocument->getIdentifier(1, 1, 1, Model\KindEnum::A, 1, 'part1');

$this->assertEquals($expectedData, $actualData);
}
Expand All @@ -36,7 +36,8 @@ public function getIdentifierIsNullFailure()
12,
12,
12,
Model\KindEnum::A,1,
Model\KindEnum::A,
1,
'part1'
);

Expand Down

0 comments on commit fcc7f76

Please sign in to comment.