fmu-settings 0.0.1__py3-none-any.whl → 0.1.0__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/_version.py CHANGED
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.0.1'
21
- __version_tuple__ = version_tuple = (0, 0, 1)
31
+ __version__ = version = '0.1.0'
32
+ __version_tuple__ = version_tuple = (0, 1, 0)
33
+
34
+ __commit_id__ = commit_id = None
@@ -6,7 +6,7 @@ from uuid import UUID
6
6
 
7
7
  from pydantic import BaseModel, RootModel
8
8
 
9
- from fmu.dataio._models.enums import Content # type: ignore
9
+ from fmu.datamodels.enums import Content # type: ignore
10
10
 
11
11
  from ._enums import (
12
12
  DataEntrySource,
@@ -3,25 +3,13 @@
3
3
  import getpass
4
4
  from datetime import UTC, datetime
5
5
  from typing import Self
6
- from uuid import UUID # noqa TC003
7
6
 
8
- from pydantic import AwareDatetime, BaseModel, Field
7
+ from pydantic import AwareDatetime, Field
9
8
 
9
+ from fmu.datamodels.fmu_results.fields import Access, Masterdata, Model
10
10
  from fmu.settings import __version__
11
11
  from fmu.settings.types import ResettableBaseModel, VersionStr # noqa TC001
12
12
 
13
- from .smda import Smda
14
-
15
-
16
- class Masterdata(BaseModel):
17
- """The ``masterdata`` block contains information related to masterdata.
18
-
19
- Currently, SMDA holds the masterdata.
20
- """
21
-
22
- smda: Smda | None = Field(default=None)
23
- """Block containing SMDA-related attributes. See :class:`Smda`."""
24
-
25
13
 
26
14
  class ProjectConfig(ResettableBaseModel):
27
15
  """The configuration file in a .fmu directory.
@@ -32,7 +20,9 @@ class ProjectConfig(ResettableBaseModel):
32
20
  version: VersionStr
33
21
  created_at: AwareDatetime
34
22
  created_by: str
35
- masterdata: Masterdata
23
+ masterdata: Masterdata | None = Field(default=None)
24
+ model: Model | None = Field(default=None)
25
+ access: Access | None = Field(default=None)
36
26
 
37
27
  @classmethod
38
28
  def reset(cls: type[Self]) -> Self:
@@ -45,5 +35,7 @@ class ProjectConfig(ResettableBaseModel):
45
35
  version=__version__,
46
36
  created_at=datetime.now(UTC),
47
37
  created_by=getpass.getuser(),
48
- masterdata=Masterdata(),
38
+ masterdata=None,
39
+ model=None,
40
+ access=None,
49
41
  )
@@ -73,7 +73,7 @@ class ConfigManager(PydanticResourceManager[T]):
73
73
  default: Value to return if key is not found. Default None
74
74
 
75
75
  Returns:
76
- The configuration value or deafult
76
+ The configuration value or default
77
77
  """
78
78
  try:
79
79
  config = self.load()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmu-settings
3
- Version: 0.0.1
3
+ Version: 0.1.0
4
4
  Summary: A library for managing FMU settings
5
5
  Author-email: Equinor <fg-fmu_atlas@equinor.com>
6
6
  License: GPL-3.0
@@ -18,7 +18,7 @@ Requires-Python: >=3.11
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: annotated_types
21
- Requires-Dist: fmu-dataio
21
+ Requires-Dist: fmu-datamodels
22
22
  Requires-Dist: pydantic
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: mypy; extra == "dev"
@@ -3,19 +3,18 @@ fmu/settings/__init__.py,sha256=x96dVVR-2n2lYD84LGbL7W8l3-r7W_0reUTKZlE7S34,331
3
3
  fmu/settings/_fmu_dir.py,sha256=-w3cB0_2WCKYkXTmoOQtZHI_fHfCDbnzEtTF_lcYod8,10572
4
4
  fmu/settings/_init.py,sha256=5CT7tV2XHz5wuLh97XozyLiKpwogrsfjpxm2dpn7KWE,4097
5
5
  fmu/settings/_logging.py,sha256=nEdmZlNCBsB1GfDmFMKCjZmeuRp3CRlbz1EYUemc95Y,1104
6
- fmu/settings/_version.py,sha256=vgltXBYF55vNcC2regxjGN0_cbebmm8VgcDdQaDapWQ,511
6
+ fmu/settings/_version.py,sha256=5jwwVncvCiTnhOedfkzzxmxsggwmTBORdFL_4wq0ZeY,704
7
7
  fmu/settings/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  fmu/settings/types.py,sha256=aeXEsznBTT1YRRY_LSRqK1j2gmMmyLYYTGYl3a9fweU,513
9
9
  fmu/settings/models/__init__.py,sha256=lRlXgl55ba2upmDzdvzx8N30JMq2Osnm8aa_xxTZn8A,112
10
10
  fmu/settings/models/_enums.py,sha256=SQUZ-2mQcTx4F0oefPFfuQzMKsKTSFSB-wq_CH7TBRE,734
11
- fmu/settings/models/_mappings.py,sha256=uaSAE_0y88Gvv-vM3VR5xx7yuXn9mio_8V3YC1t9wLI,2836
12
- fmu/settings/models/project_config.py,sha256=vImpk_rPrMEn3G9NZj83Recq9YzqAABQS7ZVUlBa0vM,1207
13
- fmu/settings/models/smda.py,sha256=nQ3-EI2VDRappwHgipLLXnWbEVQCsLrtJn14lES2Q6g,2639
11
+ fmu/settings/models/_mappings.py,sha256=Z4Ex7MtmajBr6FjaNzmwDRwtJlaZZ8YKh9NDmZHRKPI,2832
12
+ fmu/settings/models/project_config.py,sha256=K7y4PZMuq5wD-0Br60xfffBN6QQUV8viKGjjOcCB-7M,1098
14
13
  fmu/settings/models/user_config.py,sha256=JhMeSmWcE4GrBRkM_D5QVnUbRKfVy_XakHeKqJrYxvE,2217
15
- fmu/settings/resources/config_managers.py,sha256=4rA2xXS8BoNkM-RCfhJ6FNiwRGW_jTckZzpT_llkqlY,6852
14
+ fmu/settings/resources/config_managers.py,sha256=nWUTu5Fp82ap0v7EmM3i29UnBT21XNURPLxQioje1FI,6852
16
15
  fmu/settings/resources/managers.py,sha256=t4Rp6MOSIq85iKfDHZLJxeGRj8S3SKanWHWri0p9wV8,3161
17
- fmu_settings-0.0.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
18
- fmu_settings-0.0.1.dist-info/METADATA,sha256=_Jt3s4v_3G-lhNAd4S8ocOYZ0_KoRQEdCRCIvaQqO68,2020
19
- fmu_settings-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- fmu_settings-0.0.1.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
21
- fmu_settings-0.0.1.dist-info/RECORD,,
16
+ fmu_settings-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
+ fmu_settings-0.1.0.dist-info/METADATA,sha256=p9Hj7jKoexgusl1ErS1FwngSUjYMY2P39dgejhxOz2M,2024
18
+ fmu_settings-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ fmu_settings-0.1.0.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
20
+ fmu_settings-0.1.0.dist-info/RECORD,,
@@ -1,90 +0,0 @@
1
- """Models for SMDA masterdata."""
2
-
3
- from uuid import UUID
4
-
5
- from pydantic import BaseModel, Field
6
-
7
- from fmu.settings.types import VersionStr # noqa TC001
8
-
9
-
10
- class SmdaIdentifier(BaseModel):
11
- """The identifier for something known to SMDA."""
12
-
13
- identifier: str
14
- """Identifier known to SMDA."""
15
-
16
- uuid: UUID
17
- """Identifier known to SMDA."""
18
-
19
-
20
- class CountryItem(SmdaIdentifier):
21
- """A single country in the list of countries known to SMDA."""
22
-
23
- identifier: str = Field(examples=["Norway"])
24
- """Identifier known to SMDA."""
25
-
26
- uuid: UUID = Field(examples=["15ce3b84-766f-4c93-9050-b154861f9100"])
27
- """Identifier known to SMDA."""
28
-
29
-
30
- class FieldItem(SmdaIdentifier):
31
- """A single field in the list of fields known to SMDA."""
32
-
33
- identifier: str = Field(examples=["OseFax"])
34
- """Identifier known to SMDA."""
35
-
36
- uuid: UUID = Field(examples=["15ce3b84-766f-4c93-9050-b154861f9100"])
37
- """Identifier known to SMDA."""
38
-
39
-
40
- class CoordinateSystem(SmdaIdentifier):
41
- """Contains the coordinate system known to SMDA."""
42
-
43
- identifier: str = Field(examples=["ST_WGS84_UTM37N_P32637"])
44
- """Identifier known to SMDA."""
45
-
46
- uuid: UUID = Field(examples=["15ce3b84-766f-4c93-9050-b154861f9100"])
47
- """Identifier known to SMDA."""
48
-
49
-
50
- class StratigraphicColumn(SmdaIdentifier):
51
- """Contains the stratigraphic column known to SMDA."""
52
-
53
- identifier: str = Field(examples=["DROGON_2020"])
54
- """Identifier known to SMDA."""
55
-
56
- uuid: UUID = Field(examples=["15ce3b84-766f-4c93-9050-b154861f9100"])
57
- """Identifier known to SMDA."""
58
-
59
-
60
- class DiscoveryItem(BaseModel):
61
- """A single discovery in the list of discoveries known to SMDA."""
62
-
63
- short_identifier: str = Field(examples=["SomeDiscovery"])
64
- """Identifier known to SMDA."""
65
-
66
- uuid: UUID = Field(examples=["15ce3b84-766f-4c93-9050-b154861f9100"])
67
- """Identifier known to SMDA."""
68
-
69
-
70
- class Smda(BaseModel):
71
- """Contains SMDA-related attributes."""
72
-
73
- coordinate_system: CoordinateSystem
74
- """Reference to coordinate system known to SMDA. See :class:`CoordinateSystem`."""
75
-
76
- country: list[CountryItem]
77
- """A list referring to countries known to SMDA. First item is primary.
78
- See :class:`CountryItem`."""
79
-
80
- discovery: list[DiscoveryItem]
81
- """A list referring to discoveries known to SMDA. First item is primary.
82
- See :class:`DiscoveryItem`."""
83
-
84
- field: list[FieldItem]
85
- """A list referring to fields known to SMDA. First item is primary.
86
- See :class:`FieldItem`."""
87
-
88
- stratigraphic_column: StratigraphicColumn
89
- """Reference to stratigraphic column known to SMDA.
90
- See :class:`StratigraphicColumn`."""