Skip to content

Commit

Permalink
Prepare for release (#517)
Browse files Browse the repository at this point in the history
* increase version

* update hooks

* adjust changelog

* rerun hooks with a clean cache
  • Loading branch information
zigaLuksic committed Jan 10, 2024
1 parent ec0d592 commit e4fb34f
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 64 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repos:
- id: debug-statements

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.5"
rev: "v0.1.11"
hooks:
- id: ruff

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.7.1
hooks:
- id: nbqa-black
- id: nbqa-ruff
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [Version 3.10.1] - 2024-01-10

- Improved documentation for Copernicus Data Space Ecosystem.
- Restrict numpy version to <2 in anticipation of numpy 2.0 release.


## [Version 3.10.0] - 2023-12-08

- Adjust session caching to mirror changes to the core services. Older version might no longer correctly cache sessions.
Expand Down
16 changes: 7 additions & 9 deletions examples/process_request.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -989,15 +989,13 @@
"request_raw_dict = {\n",
" \"input\": {\n",
" \"bounds\": {\"properties\": {\"crs\": betsiboka_bbox.crs.opengis_string}, \"bbox\": list(betsiboka_bbox)},\n",
" \"data\": [\n",
" {\n",
" \"type\": \"S2L1C\",\n",
" \"dataFilter\": {\n",
" \"timeRange\": {\"from\": \"2020-06-01T00:00:00Z\", \"to\": \"2020-06-30T00:00:00Z\"},\n",
" \"mosaickingOrder\": \"leastCC\",\n",
" },\n",
" }\n",
" ],\n",
" \"data\": [{\n",
" \"type\": \"S2L1C\",\n",
" \"dataFilter\": {\n",
" \"timeRange\": {\"from\": \"2020-06-01T00:00:00Z\", \"to\": \"2020-06-30T00:00:00Z\"},\n",
" \"mosaickingOrder\": \"leastCC\",\n",
" },\n",
" }],\n",
" },\n",
" \"output\": {\n",
" \"width\": betsiboka_size[0],\n",
Expand Down
16 changes: 7 additions & 9 deletions examples/process_request_cdse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -941,15 +941,13 @@
"request_raw_dict = {\n",
" \"input\": {\n",
" \"bounds\": {\"properties\": {\"crs\": betsiboka_bbox.crs.opengis_string}, \"bbox\": list(betsiboka_bbox)},\n",
" \"data\": [\n",
" {\n",
" \"type\": \"S2L1C\",\n",
" \"dataFilter\": {\n",
" \"timeRange\": {\"from\": \"2020-06-01T00:00:00Z\", \"to\": \"2020-06-30T00:00:00Z\"},\n",
" \"mosaickingOrder\": \"leastCC\",\n",
" },\n",
" }\n",
" ],\n",
" \"data\": [{\n",
" \"type\": \"S2L1C\",\n",
" \"dataFilter\": {\n",
" \"timeRange\": {\"from\": \"2020-06-01T00:00:00Z\", \"to\": \"2020-06-30T00:00:00Z\"},\n",
" \"mosaickingOrder\": \"leastCC\",\n",
" },\n",
" }],\n",
" },\n",
" \"output\": {\n",
" \"width\": betsiboka_size[0],\n",
Expand Down
2 changes: 1 addition & 1 deletion sentinelhub/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the sentinelhub package."""

__version__ = "3.10.0"
__version__ = "3.10.1"
28 changes: 13 additions & 15 deletions tests/api/batch/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,21 @@ def test_create_and_run_batch_request(batch_client: SentinelHubBatch, requests_m
request_id = "mocked-id"
requests_mock.post(
"/api/v1/batch/process",
[
{
"json": {
"id": request_id,
"processRequest": {
"input": {
"bounds": {
"bbox": list(bbox),
"properties": {"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"},
}
[{
"json": {
"id": request_id,
"processRequest": {
"input": {
"bounds": {
"bbox": list(bbox),
"properties": {"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"},
}
},
"tileCount": 42,
"status": "CREATED",
}
}
},
"tileCount": 42,
"status": "CREATED",
}
],
}],
)

batch_request = batch_client.create(
Expand Down
34 changes: 15 additions & 19 deletions tests/api/test_byoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ def collection_fixture() -> JsonDict:
"maxMetersPerPixel": 800.0,
"extent": {
"type": "Polygon",
"coordinates": [
[
[13.293347498, 45.366449953],
[13.293347498, 46.897693758],
[16.575424424, 46.897693758],
[16.575424424, 45.366449953],
[13.293347498, 45.366449953],
]
],
"coordinates": [[
[13.293347498, 45.366449953],
[13.293347498, 46.897693758],
[16.575424424, 46.897693758],
[16.575424424, 45.366449953],
[13.293347498, 45.366449953],
]],
},
"hasSensingTimes": "NO",
},
Expand Down Expand Up @@ -82,17 +80,15 @@ def tile_fixture() -> JsonDict:
"coverGeometry": {
"crs": {"type": "name", "properties": {"name": "urn:ogc:def:crs:EPSG::32633"}},
"type": "MultiPolygon",
"coordinates": [
"coordinates": [(
(
(
(369999.99998228427, 5025000.000464492),
(620000.000010147, 5025000.000464773),
(620000.000012391, 5195000.000585059),
(369999.9999783558, 5195000.00058473),
(369999.99998228427, 5025000.000464492),
),
)
],
(369999.99998228427, 5025000.000464492),
(620000.000010147, 5025000.000464773),
(620000.000012391, 5195000.000585059),
(369999.9999783558, 5195000.00058473),
(369999.99998228427, 5025000.000464492),
),
)],
},
"created": "2020-06-22T12:33:36.081000Z",
"sensingTime": None,
Expand Down
14 changes: 6 additions & 8 deletions tests/download/test_sentinelhub_statistical_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,13 @@ def test_statistical_client_runs_out_of_retries(download_request: DownloadReques

requests_mock.post(
url="/api/v1/statistics",
response_list=[
{
"json": {
"data": [
{"interval": {"from": "2020-01-20", "to": "2020-01-20"}, "error": {"type": "EXECUTION_ERROR"}},
]
}
response_list=[{
"json": {
"data": [
{"interval": {"from": "2020-01-20", "to": "2020-01-20"}, "error": {"type": "EXECUTION_ERROR"}},
]
}
],
}],
)

with pytest.raises(DownloadFailedException) as exception_info:
Expand Down

0 comments on commit e4fb34f

Please sign in to comment.