Commit 78bbce10 authored by Gregory Harris's avatar Gregory Harris
Browse files

More merge fixes

parent 19174280
......@@ -84,34 +84,6 @@ class WellLogRecord(Record):
return Record(self.kind, self.acl, self.legal, self.data)
class WellBoreRecord(Record):
_raw_data: dict[str, any]
def __init__(self, data: dict[str, any]) -> None:
self.kind = data.get("kind", None)
self.data = data.get("data", {})
self.acl = data.get("acl", {})
self.legal = data.get("legal", {})
self._raw_data = data
def get_raw_data(self) -> dict[str, any]:
"""
Get the well log data used to construct this object
:returns: The well log data
:rtype: dict[str, any]
"""
return self._raw_data
def to_record(self) -> Record:
"""
Convert this object to a base records type for upload to OSDU
:returns: A new instance of Record populated with data from this object
:rtype: Record
"""
return Record(self.kind, self.acl, self.legal, self.data)
class AttributeBuilder:
# Common
......
......@@ -5,7 +5,7 @@ from knack.log import get_logger
from lasio.las import LASFile
from lasloader.file_loader import FileValidationError, LasParser, LocalFileLoader
from lasloader.osdu_client import OsduClient, LasLoaderWebResponseError
from lasloader.record_mapper import LasToRecordMapper, Record, MappingUtilities, MapWellLogToLas, WellBoreRecord
from lasloader.record_mapper import LasToRecordMapper, Record, MappingUtilities, MapWellLogToLas, WellboreRecord
logger = get_logger(__name__)
......@@ -122,7 +122,7 @@ class WellLogService:
wellbore = Record(None, {}, {}, {})
else:
logger.warning(f"Getting wellbore ID {wellbore_id}")
wellbore = WellBoreRecord(self._client.get_wellbore_record(wellbore_id))
wellbore = self._client.get_wellbore_record(wellbore_id)
logger.warning(f"Getting curve data for welllog ID {welllog_id}")
......
......@@ -129,7 +129,7 @@ class TestWellLogService:
}
welllog = Record("LogKind", {}, {}, logdata)
wellbore = {"data": {"FacilityName": "Well name", "NameAliases": [{"AliasName": "Some Name"}]}}
wellbore = WellboreRecord({"data": {"FacilityName": "Well name", "NameAliases": [{"AliasName": "Some Name"}]}})
data = DataFrame({"ABC": [1, 2, 3], "XYZ": [9, 8, 7], "IJK": [-1, -2, -3]})
client = Mock(spec=OsduClient)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment