Skip to content

Commit

Permalink
Upgrade to Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
vuilleumierc committed Apr 10, 2024
1 parent 818bafa commit f95401d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7-2020-12-19
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11

COPY ./bridge-style /tmp/bridge-style
COPY requirements.txt /tmp/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ docker run --rm -d --name lyrx2sld -p 80:80 camptocamp/lyrx2sld:latest
### Usage
lyrx data should be sent as a file to http://localhost/v1/lyrx2sld/ through a POST request. The converted SLD styling is sent back in the response content (content type: application/x-zip-compressed). Example using `curl`:
```
curl --location -d @/path/to/input.lyrx http://localhost/v1/lyrx2sld/ -o /path/to/output.zip
curl --location -d @/path/to/input.lyrx -H 'Content-Type: application/json' -o /path/to/output.zip "http://localhost/v1/lyrx2sld/"
```

Optional request parameter: `replaceesri` to replace ESRI font markers with standard symbols, to be set to `true` or `false` (default):
```
curl --location -d @/path/to/input.lyrx "http://localhost/v1/lyrx2sld/?replaceesri=true" -o /path/to/output.zip
curl --location -d @/path/to/input.lyrx -H 'Content-Type: application/json' -o /path/to/output.zip "http://localhost/v1/lyrx2sld/?replaceesri=true"
```
Warnings and errors from bridge-style are written to the logs - to view them:
```
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SERVICE="http://localhost/v1/lyrx2sld/"
INPUT_FILE="tests/data/withicons.lyrx"
OUTPUT_FILE="/tmp/output.zip"

STATUS_CODE=$(curl --write-out %{http_code} -v -d @$INPUT_FILE -o $OUTPUT_FILE $SERVICE)
STATUS_CODE=$(curl --write-out %{http_code} -v -d @$INPUT_FILE -H 'Content-Type: application/json' -o $OUTPUT_FILE $SERVICE)

if [ -f "$OUTPUT_FILE" ] && [ $STATUS_CODE = 200 ]; then
echo "Output file has been created and request status code is 200"
Expand Down

0 comments on commit f95401d

Please sign in to comment.