Skip to content

Commit

Permalink
Fix formattings
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuovinen committed Feb 7, 2024
1 parent bb4a7ba commit c9b4ad5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[![Test & Build](https://github.com/NatLibFi/ekirjasto-circulation/actions/workflows/test-build.yml/badge.svg)](https://github.com/NatLibFi/ekirjasto-circulation/actions/workflows/test-build.yml)

<!-- [![codecov](https://codecov.io/github/thepalaceproject/circulation/branch/main/graph/badge.svg?token=T09QW6DLH6)](https://codecov.io/github/thepalaceproject/circulation) -->

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
Expand Down Expand Up @@ -177,20 +175,20 @@ a storage service, you can set the following environment variables:
public access to the files.
- `PALACE_STORAGE_ANALYTICS_BUCKET`: Required if you want to use the storage service to store analytics data.
- `PALACE_STORAGE_ACCESS_KEY`: The access key (optional).
- If this key is set it will be passed to boto3 when connecting to the storage service.
- If it is not set boto3 will attempt to find credentials as outlined in their
- If this key is set it will be passed to boto3 when connecting to the storage service.
- If it is not set boto3 will attempt to find credentials as outlined in their
[documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials).
- `PALACE_STORAGE_SECRET_KEY`: The secret key (optional).
- `PALACE_STORAGE_REGION`: The AWS region of the storage service (optional).
- `PALACE_STORAGE_ENDPOINT_URL`: The endpoint of the storage service (optional). This is used if you are using a
s3 compatible storage service like [minio](https://min.io/).
- `PALACE_STORAGE_URL_TEMPLATE`: The url template to use when generating urls for files stored in the storage service
(optional).
- The default value is `https://{bucket}.s3.{region}.amazonaws.com/{key}`.
- The following variables can be used in the template:
- `{bucket}`: The name of the bucket.
- `{key}`: The key of the file.
- `{region}`: The region of the storage service.
- The default value is `https://{bucket}.s3.{region}.amazonaws.com/{key}`.
- The following variables can be used in the template:
- `{bucket}`: The name of the bucket.
- `{key}`: The key of the file.
- `{region}`: The region of the storage service.

#### Reporting

Expand All @@ -215,8 +213,8 @@ the logging:
- `PALACE_LOG_CLOUDWATCH_INTERVAL`: The interval in seconds to send logs to CloudWatch. Default is `60`.
- `PALACE_LOG_CLOUDWATCH_CREATE_GROUP`: Whether to create the log group if it does not exist. Default is `true`.
- `PALACE_LOG_CLOUDWATCH_ACCESS_KEY`: The access key to use when sending logs to CloudWatch. This is optional.
- If this key is set it will be passed to boto3 when connecting to CloudWatch.
- If it is not set boto3 will attempt to find credentials as outlined in their
- If this key is set it will be passed to boto3 when connecting to CloudWatch.
- If it is not set boto3 will attempt to find credentials as outlined in their
[documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials).
- `PALACE_LOG_CLOUDWATCH_SECRET_KEY`: The secret key to use when sending logs to CloudWatch. This is optional.

Expand Down Expand Up @@ -717,7 +715,7 @@ enabled by setting environment variables while starting the application.
- `PALACE_XRAY_NAME`: The name of the service shown in x-ray for these traces.
- `PALACE_XRAY_ANNOTATE_`: Any environment variable starting with this prefix will be added to to the trace as an
annotation.
- For example setting `PALACE_XRAY_ANNOTATE_KEY=value` will set the annotation `key=value` on all xray traces sent
- For example setting `PALACE_XRAY_ANNOTATE_KEY=value` will set the annotation `key=value` on all xray traces sent
from the application.
- `PALACE_XRAY_INCLUDE_BARCODE`: If this environment variable is set to `true` then the tracing code will try to include
the patrons barcode in the user parameter of the trace, if a barcode is available.
Expand Down Expand Up @@ -780,10 +778,10 @@ pyinstrument -m pytest --no-cov tests/api/
- `PALACE_PYINSTRUMENT`: Profiling will the enabled if this variable is set. The saved profile data will be available at
path specified in the environment variable.

- The profile data will have the extension `.pyisession`.
- The data can be accessed with the
[`pyinstrument.session.Session` class](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.session.Session).
- Example code to print details of the gathered statistics:
- The profile data will have the extension `.pyisession`.
- The data can be accessed with the
[`pyinstrument.session.Session` class](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.session.Session).
- Example code to print details of the gathered statistics:

```python
import os
Expand Down
2 changes: 1 addition & 1 deletion tests/api/finland/test_ekirjasto.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import datetime
import uuid
from base64 import b64encode
from collections.abc import Callable
from functools import partial
from typing import Callable

import jwt
import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/api/finland/test_opensearch_analytics_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# The test set is based on core/test_analytics.py

MOCK_PROTOCOL = "..mock_analytics_provider"
MOCK_PROTOCOL = "../../core/mock_analytics_provider"


class TestOpenSearchAnalytics:
Expand Down

0 comments on commit c9b4ad5

Please sign in to comment.