Skip to content

Commit fd3222a

Browse files
authored
Merge pull request #109 from sentinel-hub/feat/python3.5-drop
Feat/python3.5 drop
2 parents 559e8fc + 0ae4833 commit fd3222a

File tree

5 files changed

+29
-32
lines changed

5 files changed

+29
-32
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ notifications:
66
email: false
77

88
python:
9-
- "3.5"
109
- "3.6"
1110
- "3.7"
1211
- "3.8"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ stored in ESA .SAFE format (all types of .SAFE format are supported).
1919

2020
# Installation
2121

22-
The package requires a Python version >= 3.5 and installed C/C++ compiler. The package is available on
22+
The package requires a Python version >= 3.6 and installed C/C++ compiler. The package is available on
2323
the PyPI package manager and can be installed with
2424

2525
```

sentinelhub/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Version of sentinelhub package
33
"""
44

5-
__version__ = '3.0.0.b1'
5+
__version__ = '3.0.0'

sentinelhub/config.py

+26-27
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import os
66
import json
7-
from collections import OrderedDict
87

98

109
class SHConfig:
@@ -42,26 +41,26 @@ class SHConfig:
4241
class _SHConfig:
4342
""" Internal class holding configuration parameters
4443
"""
45-
CONFIG_PARAMS = OrderedDict([
46-
('instance_id', ''),
47-
('sh_client_id', ''),
48-
('sh_client_secret', ''),
49-
('sh_base_url', 'https://services.sentinel-hub.com'),
50-
('geopedia_wms_url', 'https://service.geopedia.world'),
51-
('geopedia_rest_url', 'https://www.geopedia.world/rest'),
52-
('aws_access_key_id', ''),
53-
('aws_secret_access_key', ''),
54-
('aws_metadata_url', 'https://roda.sentinel-hub.com'),
55-
('aws_s3_l1c_bucket', 'sentinel-s2-l1c'),
56-
('aws_s3_l2a_bucket', 'sentinel-s2-l2a'),
57-
('opensearch_url', 'http://opensearch.sentinel-hub.com/resto/api/collections/Sentinel2'),
58-
('max_wfs_records_per_query', 100),
59-
('max_opensearch_records_per_query', 500),
60-
('max_download_attempts', 4),
61-
('download_sleep_time', 5),
62-
('download_timeout_seconds', 120),
63-
('number_of_download_processes', 1)
64-
])
44+
CONFIG_PARAMS = {
45+
'instance_id': '',
46+
'sh_client_id': '',
47+
'sh_client_secret': '',
48+
'sh_base_url': 'https://services.sentinel-hub.com',
49+
'geopedia_wms_url': 'https://service.geopedia.world',
50+
'geopedia_rest_url': 'https://www.geopedia.world/rest',
51+
'aws_access_key_id': '',
52+
'aws_secret_access_key': '',
53+
'aws_metadata_url': 'https://roda.sentinel-hub.com',
54+
'aws_s3_l1c_bucket': 'sentinel-s2-l1c',
55+
'aws_s3_l2a_bucket': 'sentinel-s2-l2a',
56+
'opensearch_url': 'http://opensearch.sentinel-hub.com/resto/api/collections/Sentinel2',
57+
'max_wfs_records_per_query': 100,
58+
'max_opensearch_records_per_query': 500,
59+
'max_download_attempts': 4,
60+
'download_sleep_time': 5,
61+
'download_timeout_seconds': 120,
62+
'number_of_download_processes': 1
63+
}
6564

6665
def __init__(self):
6766
self.instance_id = ''
@@ -118,12 +117,12 @@ def load_configuration(self):
118117
setattr(self, prop, config[prop])
119118

120119
def get_config(self):
121-
""" Returns ordered dictionary with configuration parameters
120+
""" Returns a dictionary with configuration parameters
122121
123-
:return: Ordered dictionary
124-
:rtype: collections.OrderedDict
122+
:return: A dictionary
123+
:rtype: dict
125124
"""
126-
config = OrderedDict((prop, getattr(self, prop)) for prop in self.CONFIG_PARAMS)
125+
config = {prop: getattr(self, prop) for prop in self.CONFIG_PARAMS}
127126
if config['instance_id'] is None:
128127
config['instance_id'] = ''
129128
return config
@@ -231,9 +230,9 @@ def get_config_dict(self):
231230
""" Get a dictionary representation of `SHConfig` class
232231
233232
:return: A dictionary with configuration parameters
234-
:rtype: OrderedDict
233+
:rtype: dict
235234
"""
236-
return OrderedDict((prop, getattr(self, prop)) for prop in self._instance.CONFIG_PARAMS)
235+
return {prop: getattr(self, prop) for prop in self._instance.CONFIG_PARAMS}
237236

238237
def get_config_location(self):
239238
""" Returns location of configuration file on disk

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def update_package_config():
5757

5858
setup(
5959
name='sentinelhub',
60-
python_requires='>=3.5',
60+
python_requires='>=3.6',
6161
version=get_version(),
6262
description='Sentinel Hub Utilities',
6363
long_description=get_long_description(),
@@ -90,7 +90,6 @@ def update_package_config():
9090
'Operating System :: Unix',
9191
'Programming Language :: Python',
9292
'Programming Language :: Python :: 3',
93-
'Programming Language :: Python :: 3.5',
9493
'Programming Language :: Python :: 3.6',
9594
'Programming Language :: Python :: 3.7',
9695
'Programming Language :: Python :: 3.8',

0 commit comments

Comments
 (0)