commonlib-reader 1.1.0__tar.gz → 1.1.1__tar.gz
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.
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/PKG-INFO +3 -2
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/facility.py +33 -1
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/tag.py +1 -1
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/pyproject.toml +1 -1
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/README.md +0 -0
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/__init__.py +0 -0
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/connector.py +0 -0
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/ims.py +0 -0
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/unit.py +0 -0
- {commonlib_reader-1.1.0 → commonlib_reader-1.1.1}/commonlib_reader/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: commonlib-reader
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Reader for Equinor commonlib api.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Åsmund Våge Fannemel
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
Requires-Dist: eq-api-connector (>=1.0.0,<2.0.0)
|
|
16
17
|
Requires-Dist: pandas (>=2.1.4)
|
|
17
18
|
Requires-Dist: requests (>=2.32.4)
|
|
@@ -85,7 +85,7 @@ class Facility:
|
|
|
85
85
|
return self._attributes.get("ParentFacility", "")
|
|
86
86
|
|
|
87
87
|
@property
|
|
88
|
-
def npd_id(self):
|
|
88
|
+
def npd_id(self) -> str:
|
|
89
89
|
return self._attributes.get("NPDID", "")
|
|
90
90
|
|
|
91
91
|
@property
|
|
@@ -218,6 +218,38 @@ class Facility:
|
|
|
218
218
|
f = Facility._get_all_facility_data()
|
|
219
219
|
return [Facility(x["identity"]) for x in f]
|
|
220
220
|
|
|
221
|
+
@classmethod
|
|
222
|
+
def get_stid_facilities(cls) -> List["Facility"]:
|
|
223
|
+
fac = cls.get_all_facilities()
|
|
224
|
+
return [f for f in fac if f.is_stid]
|
|
225
|
+
|
|
226
|
+
@classmethod
|
|
227
|
+
def get_sap_facilities(cls) -> List["Facility"]:
|
|
228
|
+
fac = cls.get_all_facilities()
|
|
229
|
+
return [f for f in fac if len(f.sap) > 0]
|
|
230
|
+
|
|
231
|
+
@classmethod
|
|
232
|
+
def get_ioc_facilities(cls) -> List["Facility"]:
|
|
233
|
+
fac = cls.get_all_facilities()
|
|
234
|
+
return [f for f in fac if len(f.ioc_plant) > 0]
|
|
235
|
+
|
|
236
|
+
@classmethod
|
|
237
|
+
def get_gov_facilities(cls) -> List["Facility"]:
|
|
238
|
+
fac = cls.get_all_facilities()
|
|
239
|
+
return [f for f in fac if len(f.governmental_name) > 0]
|
|
240
|
+
|
|
241
|
+
@classmethod
|
|
242
|
+
def get_ioc_plant_names(cls) -> List[str]:
|
|
243
|
+
fac = cls.get_all_facilities()
|
|
244
|
+
return list(set([f.ioc_plant for f in fac if len(f.ioc_plant) > 0]))
|
|
245
|
+
|
|
246
|
+
@classmethod
|
|
247
|
+
def get_gov_fcty_names(cls) -> List[str]:
|
|
248
|
+
fac = cls.get_all_facilities()
|
|
249
|
+
return list(
|
|
250
|
+
set([f.governmental_name for f in fac if len(f.governmental_name) > 0])
|
|
251
|
+
)
|
|
252
|
+
|
|
221
253
|
@classmethod
|
|
222
254
|
def _get_all_facility_data(cls) -> List[dict]:
|
|
223
255
|
"""
|
|
@@ -69,7 +69,7 @@ class TagFormatElement:
|
|
|
69
69
|
|
|
70
70
|
@staticmethod
|
|
71
71
|
def get_TagFormatElements(
|
|
72
|
-
tag_format: Union["TagFormat", str]
|
|
72
|
+
tag_format: Union["TagFormat", str],
|
|
73
73
|
) -> List["TagFormatElement"]:
|
|
74
74
|
if isinstance(tag_format, TagFormat):
|
|
75
75
|
tag_format_id = tag_format.get_id()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|