fmu-settings 0.6.0__py3-none-any.whl → 0.6.1__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.
Potentially problematic release.
This version of fmu-settings might be problematic. Click here for more details.
- fmu/settings/_fmu_dir.py +24 -6
- fmu/settings/_version.py +2 -2
- {fmu_settings-0.6.0.dist-info → fmu_settings-0.6.1.dist-info}/METADATA +1 -1
- {fmu_settings-0.6.0.dist-info → fmu_settings-0.6.1.dist-info}/RECORD +7 -7
- {fmu_settings-0.6.0.dist-info → fmu_settings-0.6.1.dist-info}/WHEEL +0 -0
- {fmu_settings-0.6.0.dist-info → fmu_settings-0.6.1.dist-info}/licenses/LICENSE +0 -0
- {fmu_settings-0.6.0.dist-info → fmu_settings-0.6.1.dist-info}/top_level.txt +0 -0
fmu/settings/_fmu_dir.py
CHANGED
|
@@ -347,11 +347,17 @@ class ProjectFMUDirectory(FMUDirectoryBase):
|
|
|
347
347
|
return None
|
|
348
348
|
|
|
349
349
|
@classmethod
|
|
350
|
-
def find_nearest(
|
|
350
|
+
def find_nearest(
|
|
351
|
+
cls: type[Self],
|
|
352
|
+
start_path: str | Path = ".",
|
|
353
|
+
*,
|
|
354
|
+
lock_timeout_seconds: int = DEFAULT_LOCK_TIMEOUT,
|
|
355
|
+
) -> Self:
|
|
351
356
|
"""Factory method to find and open the nearest .fmu directory.
|
|
352
357
|
|
|
353
358
|
Args:
|
|
354
359
|
start_path: Path to start searching from. Default current working director
|
|
360
|
+
lock_timeout_seconds: Lock expiration time in seconds. Default 20 minutes.
|
|
355
361
|
|
|
356
362
|
Returns:
|
|
357
363
|
FMUDirectory instance
|
|
@@ -363,7 +369,7 @@ class ProjectFMUDirectory(FMUDirectoryBase):
|
|
|
363
369
|
fmu_dir_path = cls.find_fmu_directory(start_path)
|
|
364
370
|
if fmu_dir_path is None:
|
|
365
371
|
raise FileNotFoundError(f"No .fmu directory found at or above {start_path}")
|
|
366
|
-
return cls(fmu_dir_path.parent)
|
|
372
|
+
return cls(fmu_dir_path.parent, lock_timeout_seconds=lock_timeout_seconds)
|
|
367
373
|
|
|
368
374
|
|
|
369
375
|
class UserFMUDirectory(FMUDirectoryBase):
|
|
@@ -412,12 +418,17 @@ class UserFMUDirectory(FMUDirectoryBase):
|
|
|
412
418
|
return cast("UserConfig", super().update_config(updates))
|
|
413
419
|
|
|
414
420
|
|
|
415
|
-
def get_fmu_directory(
|
|
421
|
+
def get_fmu_directory(
|
|
422
|
+
base_path: str | Path,
|
|
423
|
+
*,
|
|
424
|
+
lock_timeout_seconds: int = DEFAULT_LOCK_TIMEOUT,
|
|
425
|
+
) -> ProjectFMUDirectory:
|
|
416
426
|
"""Initializes access to a .fmu directory.
|
|
417
427
|
|
|
418
428
|
Args:
|
|
419
429
|
base_path: The directory containing the .fmu directory or one of its parent
|
|
420
430
|
dirs
|
|
431
|
+
lock_timeout_seconds: Lock expiration time in seconds. Default 20 minutes.
|
|
421
432
|
|
|
422
433
|
Returns:
|
|
423
434
|
FMUDirectory instance
|
|
@@ -428,14 +439,19 @@ def get_fmu_directory(base_path: str | Path) -> ProjectFMUDirectory:
|
|
|
428
439
|
PermissionError: If lacking permissions to read/write to the directory
|
|
429
440
|
|
|
430
441
|
"""
|
|
431
|
-
return ProjectFMUDirectory(base_path)
|
|
442
|
+
return ProjectFMUDirectory(base_path, lock_timeout_seconds=lock_timeout_seconds)
|
|
432
443
|
|
|
433
444
|
|
|
434
|
-
def find_nearest_fmu_directory(
|
|
445
|
+
def find_nearest_fmu_directory(
|
|
446
|
+
start_path: str | Path = ".",
|
|
447
|
+
*,
|
|
448
|
+
lock_timeout_seconds: int = DEFAULT_LOCK_TIMEOUT,
|
|
449
|
+
) -> ProjectFMUDirectory:
|
|
435
450
|
"""Factory method to find and open the nearest .fmu directory.
|
|
436
451
|
|
|
437
452
|
Args:
|
|
438
453
|
start_path: Path to start searching from. Default current working directory
|
|
454
|
+
lock_timeout_seconds: Lock expiration time in seconds. Default 20 minutes.
|
|
439
455
|
|
|
440
456
|
Returns:
|
|
441
457
|
FMUDirectory instance
|
|
@@ -443,4 +459,6 @@ def find_nearest_fmu_directory(start_path: str | Path = ".") -> ProjectFMUDirect
|
|
|
443
459
|
Raises:
|
|
444
460
|
FileNotFoundError: If no .fmu directory is found
|
|
445
461
|
"""
|
|
446
|
-
return ProjectFMUDirectory.find_nearest(
|
|
462
|
+
return ProjectFMUDirectory.find_nearest(
|
|
463
|
+
start_path, lock_timeout_seconds=lock_timeout_seconds
|
|
464
|
+
)
|
fmu/settings/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.6.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 6,
|
|
31
|
+
__version__ = version = '0.6.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 6, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
fmu/__init__.py,sha256=htx6HlMme77I6pZ8U256-2B2cMJuELsu3JN3YM2Efh4,144
|
|
2
2
|
fmu/settings/__init__.py,sha256=CkEE7al_uBCQO1lxBKN5LzyCwzzH5Aq6kkEIR7f-zTw,336
|
|
3
|
-
fmu/settings/_fmu_dir.py,sha256=
|
|
3
|
+
fmu/settings/_fmu_dir.py,sha256=2mkrfvoqgdCd1soRPDJdZF6_51QYh3198igBYJRJzmo,15300
|
|
4
4
|
fmu/settings/_global_config.py,sha256=C0_o99OhOc49ynz4h6ygbbHHH8OOI5lcVFr-9FCwD0c,9331
|
|
5
5
|
fmu/settings/_init.py,sha256=rgt5aZou54RiVAOegC4kzoigJcZefPY4Kv6ke7OAIxI,4014
|
|
6
6
|
fmu/settings/_logging.py,sha256=nEdmZlNCBsB1GfDmFMKCjZmeuRp3CRlbz1EYUemc95Y,1104
|
|
7
7
|
fmu/settings/_readme_texts.py,sha256=vVU_MTSZhN91z_Y16pCmA3fcCWxkWPF2aR1KfuI6Jwo,1067
|
|
8
|
-
fmu/settings/_version.py,sha256=
|
|
8
|
+
fmu/settings/_version.py,sha256=7vNQiXfKffK0nbqts6Xy6-E1b1YOm4EGigvgaHr83o4,704
|
|
9
9
|
fmu/settings/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
fmu/settings/types.py,sha256=aeXEsznBTT1YRRY_LSRqK1j2gmMmyLYYTGYl3a9fweU,513
|
|
11
11
|
fmu/settings/_resources/__init__.py,sha256=LHYR_F7lNGdv8N6R3cEwds5CJQpkOthXFqsEs24vgF8,118
|
|
@@ -19,8 +19,8 @@ fmu/settings/models/_mappings.py,sha256=Z4Ex7MtmajBr6FjaNzmwDRwtJlaZZ8YKh9NDmZHR
|
|
|
19
19
|
fmu/settings/models/lock_info.py,sha256=-oHDF9v9bDLCoFvEg4S6XXYLeo19zRAZ8HynCv75VWg,711
|
|
20
20
|
fmu/settings/models/project_config.py,sha256=uja8F956m76ZrtAzuWogLySgb3seYmoTQp5xJayBqyE,1188
|
|
21
21
|
fmu/settings/models/user_config.py,sha256=zl8-_UCvP9eygCuXksLo3eR9BmhPoeCRRn2Sn7ABsZY,2766
|
|
22
|
-
fmu_settings-0.6.
|
|
23
|
-
fmu_settings-0.6.
|
|
24
|
-
fmu_settings-0.6.
|
|
25
|
-
fmu_settings-0.6.
|
|
26
|
-
fmu_settings-0.6.
|
|
22
|
+
fmu_settings-0.6.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
23
|
+
fmu_settings-0.6.1.dist-info/METADATA,sha256=BP6unasHIcniTkH6XDZKpBRbNPJCe6JoT-dKCETr1MI,2116
|
|
24
|
+
fmu_settings-0.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
fmu_settings-0.6.1.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
|
|
26
|
+
fmu_settings-0.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|