Skip to content

Commit f438d3c

Browse files
authored
Merge pull request #289 from OpenGeoscience/upgrade-python
Upgrade Python to 3.12
2 parents 84df6e4 + c1a5f53 commit f438d3c

File tree

5 files changed

+204
-2015
lines changed

5 files changed

+204
-2015
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10
1+
3.12

geoinsight/core/models/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def write_geojson_data(self, content: str | dict):
6868

6969
def read_geojson_data(self) -> dict:
7070
"""Read and load the data from geojson_data into a dict."""
71-
return json.load(self.geojson_data.open())
71+
with self.geojson_data.open() as f:
72+
return json.load(f)
7273

7374
def get_summary(self, cache=True):
7475
if cache and self.summary:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55
[project]
66
name = "geoinsight"
77
version = "1.28.1"
8-
requires-python = ">=3.10"
8+
requires-python = ">=3.12"
99
license = "Apache-2.0"
1010
license-files = ["LICENSE", "NOTICE"]
1111
classifiers = ["Private :: Do Not Upload"]
@@ -139,7 +139,7 @@ packages = [
139139
[tool.black]
140140
line-length = 100
141141
skip-string-normalization = true
142-
target-version = ["py310"]
142+
target-version = ["py312"]
143143

144144
[tool.isort]
145145
profile = "black"

scripts/sentinelDownload/sentinel2Download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def download_stac_sentinel(
194194
break
195195
date_str = item.datetime.strftime('%Y-%m-%d')
196196
item_id = item.id
197-
click.echo(f'[{i+1}/{len(items)}] {item_id} from {date_str}')
197+
click.echo(f'[{i + 1}/{len(items)}] {item_id} from {date_str}')
198198

199199
visual_asset = item.assets.get('visual')
200200
if visual_asset:

0 commit comments

Comments
 (0)