Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
and supported python versions.

Re-record test cassettes and fix issue #112 related to ISO standard formatted time that appeared in newer versions of pandas

closes #112 and #114 

Co-authored-by: rp280 , redfrexx
  • Loading branch information
SlowMo24 authored Nov 14, 2023
1 parent 5c0edd6 commit aca419e
Show file tree
Hide file tree
Showing 44 changed files with 3,144 additions and 3,744 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/ci-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install lint dependencies
Expand All @@ -23,26 +23,24 @@ jobs:
fail-fast: false
matrix:
config:
- python-version: 3.8
tox: 38
- python-version: 3.9
tox: 39
- python-version: "3.10"
tox: 310
- python-version: 3.11
tox: 311
poetry-version: [ 1.3.2 ]
- python-version: 3.12
tox: 312
poetry-version: [ 1.7.0 ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up testing Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Set up base Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Python Poetry Action
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,28 @@ jobs:
fail-fast: false
matrix:
config:
- python-version: 3.8
tox: 38
- python-version: 3.9
tox: 39
- python-version: "3.10"
tox: 310
- python-version: 3.11
tox: 311
poetry-version: [ 1.3.2 ]
- python-version: 3.12
tox: 312
poetry-version: [ 1.7.0 ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up testing Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Set up base Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.2.0
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
Expand All @@ -53,15 +51,15 @@ jobs:
needs:
- linux-tests
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up base Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.2.0
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.3.2
poetry-version: 1.7.0
- name: Publish distribution 📦 with test.pypi.org
if: startsWith(github.ref, 'refs/tags')
run: |
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

### Added

- support for python 3.12

### Removed

- support for python 3.8 and 3.9
- support for geopandas <= 0.14, pandas <= 2.1 and urllib3 <= 2.1

## 0.2.0

### Added
Expand Down
6 changes: 3 additions & 3 deletions ohsome/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ def _format_timestamp(self, result_df):
"""
if "timestamp" in result_df.columns:
result_df["timestamp"] = pd.to_datetime(
result_df["timestamp"], format="%Y-%m-%dT%H:%M:%S"
result_df["timestamp"], format="ISO8601"
)
else:
result_df["fromTimestamp"] = pd.to_datetime(
result_df["fromTimestamp"], format="%Y-%m-%dT%H:%M:%S"
result_df["fromTimestamp"], format="ISO8601"
)
result_df["toTimestamp"] = pd.to_datetime(
result_df["toTimestamp"], format="%Y-%m-%dT%H:%M:%S"
result_df["toTimestamp"], format="ISO8601"
)
69 changes: 5 additions & 64 deletions ohsome/test/cassettes/test_client/test_bbox_numpy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ interactions:
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/zSOQQrCMBRE9z1FyLqmPy57B3GhuFBcxPJpA20Tfn5EKT2Q1/BkpqmF2czwmJmp
EEIaZrKPyNaNUtRiSllKI/WLkx2zD3VVuS64AZWjtmqcf5NtOw6yXGHGF2f6+xFHj+OJCZEPxovG
jWu7oyATPJd50tsLUvgvSq00KJ3LJGGIfS67bVfYDhjYDD7De9CwA510BqizrtuPp+kjLhQoWMbE
vZh/AAAA//8DAFosYGTkAAAA
string: "{\n \"attribution\" : {\n \"url\" : \"https://ohsome.org/copyrights\",\n
\ \"text\" : \"\xA9 OpenStreetMap contributors\"\n },\n \"apiVersion\"
: \"1.10.1\",\n \"result\" : [ {\n \"timestamp\" : \"2010-01-01T00:00:00Z\",\n
\ \"value\" : 0.0\n } ]\n}"
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,65 +42,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:26:31 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- 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
- Mon, 13 Nov 2023 16:46:33 GMT
Keep-Alive:
- timeout=5, max=100
Server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ interactions:
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/4SOQQ6CMBBF95yi6RpLy8pwB+NC40LjopIJNAHaTKdGQziQ1/BkliJrkr+Zn5f3
Z8wY45oIzSOQsQNnFRtjF9uA3Xzxlsj5qihs620PwmJT1Na90TQteZ4vMMGLEv39sKOD4UQIQAft
WG2HxW7R8whPeZp05gLo/4tcCSWFSjKO4EOXZLf1FTI9eNK9S3Ap1X4nVcxZyirluv7x1F2AmZJC
prENRbmtYPds+gEAAP//AwCmzxy+JwEAAA==
string: "{\n \"attribution\" : {\n \"url\" : \"https://ohsome.org/copyrights\",\n
\ \"text\" : \"\xA9 OpenStreetMap contributors\"\n },\n \"apiVersion\"
: \"1.10.1\",\n \"result\" : [ {\n \"timestamp\" : \"2018-01-01T00:00:00Z\",\n
\ \"value\" : 0.0\n }, {\n \"timestamp\" : \"2018-01-02T00:00:00Z\",\n
\ \"value\" : 0.0\n } ]\n}"
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,65 +43,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:26:20 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- 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
- Mon, 13 Nov 2023 16:45:59 GMT
Keep-Alive:
- timeout=5, max=100
Server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ interactions:
uri: https://api.ohsome.org/v1/elements/count
response:
body:
string: !!binary |
H4sIAAAAAAAA/6SOQQ6CMBBF95yi6RqhxY3hDsaFxoXGRSUTaAK0mU6NhnAgr+HJLEXWLEz+Zn5e
3p8hYYwrItR3T9r0nJVsCF1oPbbTxRsi68o8N40zHWQG67wy9oW6bsjxdIYJnhTpz5sdLPRHQgDa
K8sq0892g44HeEzjpNVnQPdb5DKTIpNRxhGcb6PsurxCugNHqrMRLoTcbYQMOQlRxlyWPx6q9TBR
IhNxbEVR/K/YrivYLRm/AAAA//8DANSeE0dqAQAA
string: "{\n \"attribution\" : {\n \"url\" : \"https://ohsome.org/copyrights\",\n
\ \"text\" : \"\xA9 OpenStreetMap contributors\"\n },\n \"apiVersion\"
: \"1.10.1\",\n \"result\" : [ {\n \"timestamp\" : \"2018-01-01T00:00:00Z\",\n
\ \"value\" : 0.0\n }, {\n \"timestamp\" : \"2018-01-02T00:00:00Z\",\n
\ \"value\" : 0.0\n }, {\n \"timestamp\" : \"2018-01-03T00:00:00Z\",\n
\ \"value\" : 0.0\n } ]\n}"
headers:
Access-Control-Allow-Credentials:
- 'true'
Expand All @@ -43,65 +44,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 13 Nov 2023 11:26:19 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- 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
- Mon, 13 Nov 2023 16:45:56 GMT
Keep-Alive:
- timeout=5, max=100
Server:
Expand Down
Loading

0 comments on commit aca419e

Please sign in to comment.