adios_db.data_sources.exxon_assays package

Subpackages

Submodules

adios_db.data_sources.exxon_assays.common module

adios_db.data_sources.exxon_assays.common.get_next_properties_row(data, exp_field)
adios_db.data_sources.exxon_assays.common.is_empty(row)
adios_db.data_sources.exxon_assays.common.next_id()

Generate the next oil record identifier

adios_db.data_sources.exxon_assays.common.next_non_empty(data)
adios_db.data_sources.exxon_assays.common.norm(string)

normalizes a string for comparing

so far: lower case, whitespace strip trailing and leading comma strip

adios_db.data_sources.exxon_assays.common.to_number(field)

Try to extract a number from a text field. Within this scope, we don’t care to try extract any unit information, just the number. Some variations on numeric data fields in the Exxon Assays: - ‘1000F+’ - ‘1000F’ - ‘650’ - ‘C5’ is not numeric

adios_db.data_sources.exxon_assays.mapper module

Exxon Mapper Base

Not really a class – it’s really a function that build up an oil object

adios_db.data_sources.exxon_assays.mapper.ExxonMapper(record)

Accepts and Exxon record:

tuple of:
  • oil name

  • list of lists of the spreadsheet contents

returns an Oil Object

adios_db.data_sources.exxon_assays.parser module

For the Exxon Assays, a Parser isn’t really required

so this is just a pass-through function – no need even for a class

adios_db.data_sources.exxon_assays.parser.ExxonRecordParser(name, record)

adios_db.data_sources.exxon_assays.reader module

class adios_db.data_sources.exxon_assays.reader.ExxonDataReader(data_index_file, data_dir=None)

Bases: object

reads the Exxon Excel files, and returns records as simple nested data structures:

Essentially the file as a raw table

get_records()
static read_excel_file(filename)

The code that reads an excel file, and returns what’s in it as a nested list.

Note: you’d think this would be a single call in openpyxl, but I

couldn’t find it

Note: Recently, a new format for the Exxon assays has appeared, which

contains 2 sheets. For the moment, we can fail to parse the new formatted information, but reading the first sheet should not fail.