Commit f4ca0c01 authored by Gregory Harris's avatar Gregory Harris
Browse files

Minor readme updates.

parent 21dab27d
Pipeline #97229 passed with stages
in 3 minutes and 45 seconds
......@@ -88,9 +88,9 @@ The `base_url` and `data_partition_id` must be correct for the OSDU instance tha
#### Custom mappings
**Custom mappings are an advanced feature of `wbdutil` that require knowledge of both `lasio.LASFile` and OSDU data object schemas and should be used with care.**
The configuration file can be used to define optional custom mappings from `lasio.LASFile` data objects
to OSDU wellbore and welllog objects of a specified kind.
This is an advanced feature of `wbdutil` that requires knowledge of both `lasio.LASFile` and OSDU data object schemas and should be used with care.
It is recommended that a new mapping is thoroughly tested using the `parse` command group, before upload to OSDU.
There are 2 mapping types `wellbore_mapping` and `welllog_mapping` both must contain a `kind` and a `mapping` attribute.
......@@ -164,7 +164,7 @@ For example:
This will set the value of the `CurveUnit` field to the output of the function `las2osdu_curve_uom_converter` using the input arguments in the args array (in this case `unit` from the input array element and `data_partition_id` from the configuration file).
The second complex mapping is `array` this should be used if the elements of an incoming array need to be changed in some way.
This could be a field name change, a change in the object structure or to call a function on specific data withing each element.
This could be a field name change, a change in the object structure or to call a function on specific data within each element.
Here is an example:
```
{
......@@ -197,7 +197,7 @@ The resulting output array is mapped to the `data.Curves` field of the output OS
An example configuration file that is setup for the preship OSDU instance is given in `src/example_opendes_configuration.json`,
it also contains example custom mappings for the `osdu:wks:master-data--Wellbore:1.0.0` wellbore kind and the `osdu:wks:work-product-component--WellLog:1.1.0` welllog kind.
There are a limited number of available functions these are listed below:
There are a limited number of mapping functions available these are listed below:
| Function name | Mapping type | Purpose |
| ------------------------------------------------------ | -------------------| ----------------------------------------------------- |
......@@ -205,6 +205,8 @@ There are a limited number of available functions these are listed below:
| `get_wellbore_id()` | `welllog_mapping` | Returns the wellbore id from the wellbore that corresponds to the welllog |
| `las2osdu_curve_uom_converter(unit, data_partition_id)`| `welllog_mapping` | This function converts a LAS format unit of measure to an OSDU format UoM. |
These are hard coded functions, so a change request will need to be raised if additional functions are required. We have avoided user defined functions, because such functions represent a small security risk.
## Development
The following instructions are provided as guidance for setting up a development environment for wbdutil. For development work we use a virtual environment managed by pipenv. To execute the application and run the tests you will need to install Python 3.8+ and pipenv.
......
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