maps4fs 1.8.188__py3-none-any.whl → 1.8.190__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maps4fs/generator/dtm/srtm.py +2 -0
- maps4fs/generator/settings.py +17 -1
- {maps4fs-1.8.188.dist-info → maps4fs-1.8.190.dist-info}/METADATA +1 -1
- {maps4fs-1.8.188.dist-info → maps4fs-1.8.190.dist-info}/RECORD +7 -7
- {maps4fs-1.8.188.dist-info → maps4fs-1.8.190.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.8.188.dist-info → maps4fs-1.8.190.dist-info}/WHEEL +0 -0
- {maps4fs-1.8.188.dist-info → maps4fs-1.8.190.dist-info}/top_level.txt +0 -0
maps4fs/generator/dtm/srtm.py
CHANGED
@@ -15,6 +15,8 @@ from maps4fs.generator.dtm.dtm import DTMProvider, DTMProviderSettings
|
|
15
15
|
class SRTM30ProviderSettings(DTMProviderSettings):
|
16
16
|
"""Settings for SRTM 30m provider."""
|
17
17
|
|
18
|
+
test: int = 10
|
19
|
+
|
18
20
|
|
19
21
|
class SRTM30Provider(DTMProvider):
|
20
22
|
"""Provider of Shuttle Radar Topography Mission (SRTM) 30m data."""
|
maps4fs/generator/settings.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
import re
|
5
6
|
from typing import Any
|
6
7
|
|
7
8
|
from pydantic import BaseModel, ConfigDict
|
@@ -80,10 +81,25 @@ class SettingsModel(BaseModel):
|
|
80
81
|
if isinstance(value, (list, tuple)):
|
81
82
|
subclass_data[key] = value[0]
|
82
83
|
|
83
|
-
settings[subclass.__name__] = subclass(**subclass_data)
|
84
|
+
settings[cls.camel_to_snake(subclass.__name__)] = subclass(**subclass_data)
|
84
85
|
|
85
86
|
return settings
|
86
87
|
|
88
|
+
@staticmethod
|
89
|
+
def camel_to_snake(camel_string: str) -> str:
|
90
|
+
"""Convert a camel case string to snake case.
|
91
|
+
|
92
|
+
Arguments:
|
93
|
+
camel_string (str): Camel case string.
|
94
|
+
|
95
|
+
Returns:
|
96
|
+
str: Snake case string.
|
97
|
+
"""
|
98
|
+
splitted = re.split(r"(Settings)", camel_string)
|
99
|
+
print(splitted) # For debugging
|
100
|
+
joined = "_".join(part.lower() for part in splitted if part)
|
101
|
+
return joined
|
102
|
+
|
87
103
|
@classmethod
|
88
104
|
def all_settings(cls) -> list[SettingsModel]:
|
89
105
|
"""Get all settings of the current class and its subclasses.
|
@@ -5,7 +5,7 @@ maps4fs/generator/dem.py,sha256=dyzCFfDL6W_nCjwi9uF3-PCiL36rfOh3jGXlDuwiJYg,1179
|
|
5
5
|
maps4fs/generator/game.py,sha256=NZaxj5z7WzMiHzAvQyr-TvVjGoHgqGldM6ZsItuYyzA,11292
|
6
6
|
maps4fs/generator/map.py,sha256=BV7OTrv3zHud6DbTGpm3TU5JNWJlKgRhZUGfs_wxntw,11513
|
7
7
|
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
8
|
-
maps4fs/generator/settings.py,sha256=
|
8
|
+
maps4fs/generator/settings.py,sha256=g1RJBAHHr_nqUyq4GavG6wO26euBHTZgGrjaY52iUh8,6749
|
9
9
|
maps4fs/generator/component/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
10
10
|
maps4fs/generator/component/background.py,sha256=IF56eQ2eHM37kdK1kz2vEFt-s88Esn9XKex_TbWtUZY,18800
|
11
11
|
maps4fs/generator/component/config.py,sha256=RitKgFDZPzjA1fi8GcEi1na75qqaueUvpcITHjBvCXc,3674
|
@@ -41,7 +41,7 @@ maps4fs/generator/dtm/rema.py,sha256=oCjFFcycBaDp2sJ8VYSzcH5kgQ_lvbLxYwsBnT7C5bI
|
|
41
41
|
maps4fs/generator/dtm/sachsenanhalt.py,sha256=-Vjw3f8k1JtSpTGI07vbpmyF5TU0wvGt2VCmJnPmL5M,1128
|
42
42
|
maps4fs/generator/dtm/scotland.py,sha256=Od4dDMuCM_iteewjGBbmZXJ26S0bDwrhRhXeV4HyyOA,4803
|
43
43
|
maps4fs/generator/dtm/spain.py,sha256=HxN0MvrtRqqeTmhl47q60-1DGaMDb2wq6neMcDlDCl8,1005
|
44
|
-
maps4fs/generator/dtm/srtm.py,sha256=
|
44
|
+
maps4fs/generator/dtm/srtm.py,sha256=hQJC8yf1WgC7PPoQ36AkXTPMEFp7l-cwHAEGA_2GAqQ,4522
|
45
45
|
maps4fs/generator/dtm/switzerland.py,sha256=GC5fbWL5kkiWksB-H4dWl4I7GSmOsUZ_ywPpfkxBTo8,3547
|
46
46
|
maps4fs/generator/dtm/usgs.py,sha256=1XzLP5GJbe6xcqzkOrEBUtR2SPw7gm6rl1nw5YXmBP8,3253
|
47
47
|
maps4fs/generator/dtm/utils.py,sha256=I-wUSA_J85Xbt8sZCZAVKHSIcrMj5Ng-0adtPVhVmk0,2315
|
@@ -51,8 +51,8 @@ maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,4
|
|
51
51
|
maps4fs/toolbox/background.py,sha256=RclEqxEWLbMxuEkkegQP8jybzugwQ1_R3rdfDe0s21U,2104
|
52
52
|
maps4fs/toolbox/custom_osm.py,sha256=X6ZlPqiOhNjkmdD_qVroIfdOl9Rb90cDwVSLDVYgx80,1892
|
53
53
|
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
54
|
-
maps4fs-1.8.
|
55
|
-
maps4fs-1.8.
|
56
|
-
maps4fs-1.8.
|
57
|
-
maps4fs-1.8.
|
58
|
-
maps4fs-1.8.
|
54
|
+
maps4fs-1.8.190.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
55
|
+
maps4fs-1.8.190.dist-info/METADATA,sha256=ifNX9JQvv_dm3_abBxWzV4xI9A5R4_-DPLIw1QMmg58,45000
|
56
|
+
maps4fs-1.8.190.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
57
|
+
maps4fs-1.8.190.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
58
|
+
maps4fs-1.8.190.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|