Skip to content

Commit

Permalink
Merge branch 'develop' into deprecate-the-deprecator
Browse files Browse the repository at this point in the history
  • Loading branch information
zigaLuksic committed Nov 13, 2023
2 parents 0e4ab59 + 6f8cbb4 commit f642750
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
with:
args: "https://git.sinergise.com/eo/code/sentinelhub-py-dev/"
env:
FOLLOW_TAGS: "true"
GITLAB_HOSTNAME: "git.sinergise.com"
GITLAB_USERNAME: "github-action"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: trigger

on:
release:
types:
- published

jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger API
run: >
curl -X POST --fail \
-F token=${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }} \
-F ref=main \
-F variables[CUSTOM_RUN_TAG]=auto \
-F variables[LAYER_NAME]=dotai-eo \
https://git.sinergise.com/api/v4/projects/1031/trigger/pipeline
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ update_base_image:
run_sh_integration_tests:
stage: test
image: "$BASE_IMAGE"
dependencies: [ ]
needs: [ ]
dependencies: []
needs: []
rules:
- when: always
if: '$UPDATE_BASE_IMAGE != "true"'
Expand Down
2 changes: 1 addition & 1 deletion sentinelhub/api/byoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ByocCollectionAdditionalData:
other_data: CatchAll = field(default_factory=dict)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.INCLUDE)
@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass
class ByocCollection(BaseCollection):
"""Dataclass to hold BYOC collection data"""
Expand Down
4 changes: 2 additions & 2 deletions sentinelhub/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
letter_case=LetterCase.CAMEL,
)

geometry_config = dataclass_config( # type: ignore[misc]
geometry_config = dataclass_config(
encoder=Geometry.get_geojson,
decoder=lambda geojson: Geometry.from_geojson(geojson) if geojson else None,
exclude=lambda geojson: geojson is None,
Expand All @@ -31,7 +31,7 @@

def enum_config(enum_class: Type[Enum]) -> Dict[str, dict]:
"""Given an Enum class it provide an object for serialization/deserialization"""
return dataclass_config( # type: ignore[misc]
return dataclass_config(
encoder=lambda enum_item: enum_item.value,
decoder=lambda item: enum_class(item) if item else None,
exclude=lambda item: item is None,
Expand Down
6 changes: 3 additions & 3 deletions sentinelhub/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
from abc import ABCMeta, abstractmethod
from math import ceil
from typing import Callable, Dict, Iterator, Tuple, TypeVar, Union, cast
from typing import Callable, Dict, Iterator, Tuple, TypeVar, Union

import shapely.geometry
import shapely.geometry.base
Expand Down Expand Up @@ -159,9 +159,9 @@ def _tuple_from_list_or_tuple(
:raises: TypeError
"""
if len(bbox) == 4:
min_x, min_y, max_x, max_y = cast(Tuple[float, float, float, float], bbox)
min_x, min_y, max_x, max_y = bbox
else:
(min_x, min_y), (max_x, max_y) = cast(Tuple[Tuple[float, float], Tuple[float, float]], bbox)
(min_x, min_y), (max_x, max_y) = bbox
return float(min_x), float(min_y), float(max_x), float(max_y)

@staticmethod
Expand Down

0 comments on commit f642750

Please sign in to comment.