readme updated
This commit is contained in:
parent
0d06ad657e
commit
a6b9f64b51
35
README.md
35
README.md
@ -29,18 +29,31 @@ Shell 2
|
||||
python scripts/pyinfra_mock.py /path/to/a/pdf
|
||||
```
|
||||
|
||||
### Tests
|
||||
|
||||
Run for example this command to execute all tests and get a coverage report:
|
||||
|
||||
```bash
|
||||
coverage run -m pytest test --tb=native -q -s -vvv -x && coverage combine && coverage report -m
|
||||
```
|
||||
|
||||
After having built the service container as specified above, you can also run tests in a container as follows:
|
||||
|
||||
```bash
|
||||
./run_tests.sh
|
||||
```
|
||||
|
||||
### Message Body Formats
|
||||
|
||||
|
||||
#### Request Format
|
||||
|
||||
The request messages need to provide the fields `"dossierID"` and `"fileID"`. The file to be processed is assumed to be
|
||||
located in the MinIO store under `redaction/<dossierID>/<fileID>.ORIG.pdf.gz`. A request should look like this:
|
||||
The request messages need to provide the fields `"dossierId"` and `"fileId"`. A request should look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"dossierID": "<string identifier>",
|
||||
"fileID": "<string identifier>"
|
||||
"dossierId": "<string identifier>",
|
||||
"fileId": "<string identifier>"
|
||||
}
|
||||
```
|
||||
|
||||
@ -109,14 +122,14 @@ An image metadata record (entry in `"data"` field of a response body) looks like
|
||||
|
||||
## Configuration
|
||||
|
||||
A configuration file is located under `incl/image_service/config.yaml`. All relevant variables can be configured via
|
||||
A configuration file is located under `config.yaml`. All relevant variables can be configured via
|
||||
exporting environment variables.
|
||||
|
||||
| __Environment Variable__ | Default | Description |
|
||||
|------------------------------------|------------------------------------|----------------------------------------------------------------------------------------|
|
||||
| __LOGGING_LEVEL_ROOT__ | "INFO" | Logging level for log file messages |
|
||||
| __VERBOSE__ | *true* | Service prints document processing progress to stdout |
|
||||
| __BATCH_SIZE__ | 32 | Number of images in memory simultaneously per service instance |
|
||||
| __BATCH_SIZE__ | 16 | Number of images in memory simultaneously per service instance |
|
||||
| __RUN_ID__ | "fabfb1f192c745369b88cab34471aba7" | The ID of the mlflow run to load the image classifier from |
|
||||
| __MIN_REL_IMAGE_SIZE__ | 0.05 | Minimally permissible image size to page size ratio |
|
||||
| __MAX_REL_IMAGE_SIZE__ | 0.75 | Maximally permissible image size to page size ratio |
|
||||
@ -124,13 +137,3 @@ exporting environment variables.
|
||||
| __MAX_IMAGE_FORMAT__ | 10 | Maximally permissible image width to height ratio |
|
||||
|
||||
See also: https://git.iqser.com/projects/RED/repos/helm/browse/redaction/templates/image-service-v2
|
||||
|
||||
|
||||
## Liveness and Readiness
|
||||
|
||||
The service runs a webserver on `0.0.0.0/8080` which responds to GET requests on `0.0.0.0/8080/ready` and `0.0.0.0/8080/health`
|
||||
with the status of the service (status code 200 for nominal status). Each service instance is monitored independently.
|
||||
A request to `0.0.0.0/8080` is forwarded to subordinated webservers each coupled to exactly one service instance.
|
||||
The responses by the subordinated webservers are aggregated either under an all or an existential quantifier (see
|
||||
`CHECK_QUANTIFIER`). Note that checks are evaluated lazily, so missing check logs from subordinated webservers is not
|
||||
unexpected when using an existential quantifier.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user