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

test: re-record cassettes and update docu #115

Merged
merged 5 commits into from
Nov 13, 2023
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
2 changes: 0 additions & 2 deletions .github/workflows/ci-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
pip install pre-commit black
- name: Install and run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
linux-tests:
needs:
- lint
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ repos:
description: Forces to replace line ending by the UNIX 'lf' character.
- id: pretty-format-json
args: [ '--no-sort-keys' ]
exclude: '.*.ipynb'
- id: no-commit-to-branch
args: [ --branch, master ]
- id: no-commit-to-branch
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Create a **pull request to the main/master** branch once it is ready to be merge

#### VCR

ohsome-py records responses using [VCR](https://vcrpy.readthedocs.io/en/latest/) via [pytest-recording](https://github.com/kiwicom/pytest-recording) to prevent unnecessary network traffic and computing during testing. If you implement a test or change an existing one, make sure to update the recorded cassettes.
ohsome-py records responses using [VCR](https://vcrpy.readthedocs.io/en/latest/) via [pytest-recording](https://github.com/kiwicom/pytest-recording) to prevent unnecessary network traffic and computing during testing. If you implement a test or change an existing one, make sure to update the recorded cassettes. In addition, you should delete all cassettes after a certain time (e.g. every 6m or on each new ohsome release) and re-record them. To do that run

`poetry run pytest --record-mode=all`

Expand Down
70 changes: 64 additions & 6 deletions ohsome/test/cassettes/test_client/test_bbox_numpy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ interactions:
response:
body:
string: !!binary |
H4sIAAAAAAAAADSOQQrCMBRE9z1FyLqmv66kdxAXFheKi1g+baBtws+PKKUH8hqezDS1MJsZHjMz
ZUJIzUzmEdjYUYpKTDGLaaB+cbJjdr4qCtt5O6Cy1BaNdW8ybcde5ivM+OJEfz/i5HA8MyHyUTvR
2HFtt+RlhOc8TTpzQfL/RVmqg4LUJQl96FPXbXvCZkDPenCJ3UMJOyijaoAq6brdeOo+4EKBgmVL
3LP5BwAA//8DAEKd8n3jAAAA
H4sIAAAAAAAA/zSOQQrCMBRE9z1FyLqmPy57B3GhuFBcxPJpA20Tfn5EKT2Q1/BkpqmF2czwmJmp
EEIaZrKPyNaNUtRiSllKI/WLkx2zD3VVuS64AZWjtmqcf5NtOw6yXGHGF2f6+xFHj+OJCZEPxovG
jWu7oyATPJd50tsLUvgvSq00KJ3LJGGIfS67bVfYDhjYDD7De9CwA510BqizrtuPp+kjLhQoWMbE
vZh/AAAA//8DAFosYGTkAAAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,11 +43,69 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 08 Mar 2023 15:32:26 GMT
- Mon, 13 Nov 2023 11:26:31 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache/2.4.52 (Ubuntu)
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
- chunked
vary:
- accept-encoding
status:
code: 200
message: ''
- request:
body: bboxes=8.67066%2C49.41423%2C8.68177%2C49.4204&time=2010-01-01&filter=amenity%3Drestaurant+and+type%3Anode
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '105'
Content-Type:
- application/x-www-form-urlencoded
user-agent:
- ohsome-py/0.2.0
method: POST
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/zSOQQrCMBRE9z1FyLqmPy57B3GhuFBcxPJpA20Tfn5EKT2Q1/BkpqmF2czwmJmp
EEIaZrKPyNaNUtRiSllKI/WLkx2zD3VVuS64AZWjtmqcf5NtOw6yXGHGF2f6+xFHj+OJCZEPxovG
jWu7oyATPJd50tsLUvgvSq00KJ3LJGGIfS67bVfYDhjYDD7De9CwA510BqizrtuPp+kjLhQoWMbE
vZh/AAAA//8DAFosYGTkAAAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Access-Control-Allow-Headers:
- Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization
Access-Control-Allow-Methods:
- POST, GET
Access-Control-Allow-Origin:
- '*'
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-transform, public, max-age=31556926
Connection:
- Keep-Alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:27:21 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ interactions:
response:
body:
string: !!binary |
H4sIAAAAAAAAAISOQQqDMBBF954iZG1jdCXeoXRR6aKli1QGDagJk0lpEQ/Ua/RkjbGuhb+Zz+P9
mRLGuCJC/fCkzchZxabQhdZjv1y8I7KuyjLTOTOAMNhmjbFv1G1HjqcrTPCiSH8/7GRhPBMC0FFZ
1phxtRt0PMBzGietvgC6/yLPRSlkdHEE5/voum2fkB7AkRpsZAuZlweZh9RSVjHX7Y2n6j0slBQy
bu0oin0FuyfzDwAA//8DADdNhdEmAQAA
H4sIAAAAAAAA/4SOQQ6CMBBF95yi6RpLy8pwB+NC40LjopIJNAHaTKdGQziQ1/BkliJrkr+Zn5f3
Z8wY45oIzSOQsQNnFRtjF9uA3Xzxlsj5qihs620PwmJT1Na90TQteZ4vMMGLEv39sKOD4UQIQAft
WG2HxW7R8whPeZp05gLo/4tcCSWFSjKO4EOXZLf1FTI9eNK9S3Ap1X4nVcxZyirluv7x1F2AmZJC
prENRbmtYPds+gEAAP//AwCmzxy+JwEAAA==
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,11 +43,69 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 08 Mar 2023 15:32:36 GMT
- Mon, 13 Nov 2023 11:26:20 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache/2.4.52 (Ubuntu)
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
- chunked
vary:
- accept-encoding
status:
code: 200
message: ''
- request:
body: bcircles=0%3A8.678770065307615%2C49.414435400453954%2C100%7C1%3A8.697137832641602%2C49.41007968889129%2C150&time=2018-01-01T00%3A00%3A00%2C2018-01-02T00%3A00%3A00&filter=amenity%3Drestaurant+and+type%3Away
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '205'
Content-Type:
- application/x-www-form-urlencoded
user-agent:
- ohsome-py/0.2.0
method: POST
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/4SOQQ6CMBBF95yi6RpLy8pwB+NC40LjopIJNAHaTKdGQziQ1/BkliJrkr+Zn5f3
Z8wY45oIzSOQsQNnFRtjF9uA3Xzxlsj5qihs620PwmJT1Na90TQteZ4vMMGLEv39sKOD4UQIQAft
WG2HxW7R8whPeZp05gLo/4tcCSWFSjKO4EOXZLf1FTI9eNK9S3Ap1X4nVcxZyirluv7x1F2AmZJC
prENRbmtYPds+gEAAP//AwCmzxy+JwEAAA==
headers:
Access-Control-Allow-Credentials:
- 'true'
Access-Control-Allow-Headers:
- Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization
Access-Control-Allow-Methods:
- POST, GET
Access-Control-Allow-Origin:
- '*'
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-transform, public, max-age=31556926
Connection:
- Keep-Alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:27:09 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ interactions:
response:
body:
string: !!binary |
H4sIAAAAAAAAAKSOQQ6CMBBF956i6RpLwQ3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p9hwxhXRKjvnrTpOSvZELrQemynizdE1pVpahpnOhAG67Qy9oW6bsjxZIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzipNVnQPdb5JkohIwujuB8G13X5RPSHThSnY1sLrNiK7OQk5RlzGV546FaDxMl
hYxbK4r8f8VuXcFum/ELAAD//wMAv3PbtmkBAAA=
H4sIAAAAAAAA/6SOQQ6CMBBF95yi6RqhxY3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p8hYYwrItR3T9r0nJVsCF1oPbbTxRsi68o8N40zHWQG67wy9oW6bsjxdIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzjpNVnQPdb5DKTIpNRxhGcb6PsurxCugNHqrMRLoTcbYQMOQlRxlyWPx6q9TBR
IhNxbEVR/K/YrivYLRm/AAAA//8DANSeE0dqAQAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,11 +43,69 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 08 Mar 2023 15:32:23 GMT
- Mon, 13 Nov 2023 11:26:19 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache/2.4.52 (Ubuntu)
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
- chunked
vary:
- accept-encoding
status:
code: 200
message: ''
- request:
body: bcircles=0%3A8.678770065307615%2C49.414435400453954%2C100%7C1%3A8.697137832641602%2C49.41007968889129%2C150&time=2018-01-01T00%3A00%3A00%2C2018-01-02T00%3A00%3A00%2C2018-01-03T00%3A00%3A00&filter=amenity%3Drestaurant+and+type%3Away
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '231'
Content-Type:
- application/x-www-form-urlencoded
user-agent:
- ohsome-py/0.2.0
method: POST
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/6SOQQ6CMBBF95yi6RqhxY3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p8hYYwrItR3T9r0nJVsCF1oPbbTxRsi68o8N40zHWQG67wy9oW6bsjxdIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzjpNVnQPdb5DKTIpNRxhGcb6PsurxCugNHqrMRLoTcbYQMOQlRxlyWPx6q9TBR
IhNxbEVR/K/YrivYLRm/AAAA//8DANSeE0dqAQAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Access-Control-Allow-Headers:
- Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization
Access-Control-Allow-Methods:
- POST, GET
Access-Control-Allow-Origin:
- '*'
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-transform, public, max-age=31556926
Connection:
- Keep-Alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:27:08 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ interactions:
response:
body:
string: !!binary |
H4sIAAAAAAAAAKSOQQ6CMBBF956i6RpLwQ3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p9hwxhXRKjvnrTpOSvZELrQemynizdE1pVpahpnOhAG67Qy9oW6bsjxZIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzipNVnQPdb5JkohIwujuB8G13X5RPSHThSnY1sLrNiK7OQk5RlzGV546FaDxMl
hYxbK4r8f8VuXcFum/ELAAD//wMAv3PbtmkBAAA=
H4sIAAAAAAAA/6SOQQ6CMBBF95yi6RqhxY3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p8hYYwrItR3T9r0nJVsCF1oPbbTxRsi68o8N40zHWQG67wy9oW6bsjxdIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzjpNVnQPdb5DKTIpNRxhGcb6PsurxCugNHqrMRLoTcbYQMOQlRxlyWPx6q9TBR
IhNxbEVR/K/YrivYLRm/AAAA//8DANSeE0dqAQAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,11 +43,69 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 08 Mar 2023 15:32:22 GMT
- Mon, 13 Nov 2023 11:26:19 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache/2.4.52 (Ubuntu)
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
- chunked
vary:
- accept-encoding
status:
code: 200
message: ''
- request:
body: bcircles=0%3A8.678770065307615%2C49.414435400453954%2C100%7C1%3A8.697137832641602%2C49.41007968889129%2C150&time=2018-01-01T00%3A00%3A00%2C2018-01-02T00%3A00%3A00%2C2018-01-03T00%3A00%3A00&filter=amenity%3Drestaurant+and+type%3Away
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '231'
Content-Type:
- application/x-www-form-urlencoded
user-agent:
- ohsome-py/0.2.0
method: POST
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/6SOQQ6CMBBF95yi6RqhxY3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p8hYYwrItR3T9r0nJVsCF1oPbbTxRsi68o8N40zHWQG67wy9oW6bsjxdIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzjpNVnQPdb5DKTIpNRxhGcb6PsurxCugNHqrMRLoTcbYQMOQlRxlyWPx6q9TBR
IhNxbEVR/K/YrivYLRm/AAAA//8DANSeE0dqAQAA
headers:
Access-Control-Allow-Credentials:
- 'true'
Access-Control-Allow-Headers:
- Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization
Access-Control-Allow-Methods:
- POST, GET
Access-Control-Allow-Origin:
- '*'
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-transform, public, max-age=31556926
Connection:
- Keep-Alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:27:07 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
Expand Down
Loading