Resolve "Data loading - Allow user to provide welllog ID and writing bulk data to that welllog id"
Closes #22 (closed)
General code restructuring:
- Add
WellboreRecordclass torecord_mapper.pyand associated tests (almost identical to howWellLogRecordis set up). - Restructure commands: I have added
ingestas a top level command and movedfileload ingest-->ingest wellbore
Add ingest data command (to complete this ticket):
- Retrieve well log and associated wellbore records using OSDU client.
- Extract the info required for validation of the user-provided LAS file from these records - well name from wellbore record, curve IDs from well log record.
- Validate the LAS file (containing the data to be ingested) - well name in LAS file must match well name associate with wellbore and check curves in LAS file all exist in the existing well log record.
- If validation passes, extract data from the LAS file and write it to existing well log record.
Note:
Like before with testing the ingest wellbore (previously fileload ingest), I've found it difficult to write unit tests for the ingest data command (as it may fall under the umbrella of integration tests). The individual components have been unit tested though and the command has been manually tested by me.
Edited by Greg Harris