Repository: kinverarity1/lasio

Issue:
Header lines without a period are discarded unnecessarily
**Is your feature request related to a problem? Please describe.**
Frustrating when erroneous LAS header section lines like this are discarded and therefore unavailable for parsing:

```
   ##   Unique Well Identification ##
           HOLE NUMBER :CEM146
   ##  Drilling Information  ##
              DRILLED  :12/11/2010
```

**Describe the solution you'd like**
For lines such as those above (i.e. missing a period, but including a colon), parse them as containing only a mnemonic and a value.

**Describe alternatives you've considered**

**Additional context**



Discussion:

Patch:
diff --git a/lasio/reader.py b/lasio/reader.py
index d3a715d..00290b9 100644
--- a/lasio/reader.py
+++ b/lasio/reader.py
@@ -918,17 +918,32 @@ def configure_metadata_patterns(line, section_name):
     unit_re = r"(?P<unit>([0-9]+\s)?[^\s]*)"
 
     # Alternate regular expressions for special cases
+    name_missing_period_re = r"(?P<name>[^:]*):"
+    value_missing_period_re = r"(?P<value>.*)"
     value_without_colon_delimiter_re = r"(?P<value>[^:]*)"
     value_with_time_colon_re = (
         r"(?P<value>.*?)(?:(?<!( [0-2][0-3]| hh| HH)):(?!([0-5][0-9]|mm|MM)))"
     )
     name_with_dots_re = r"\.?(?P<name>[^.].*[.])\."
     no_desc_re = ""
+    no_unit_re = ""
 
     # Configure special cases
-    # 1. missing colon delimiter and description field
-    # 2. double_dots '..' caused by mnemonic abbreviation (with period)
+    # 1. missing period (assume that only name and value are present)
+    # 2. missing colon delimiter and description field
+    # 3. double_dots '..' caused by mnemonic abbreviation (with period)
     #    next to the dot delimiter.
+    if ":" in line:
+        if not "." in line[:line.find(":")]:
+            # If there is no period, then we assume that the colon exists and
+            # everything on the left is the name, and everything on the right
+            # is the value - therefore no unit or description field.
+            name_re = name_missing_period_re
+            value_re = value_missing_period_re
+            desc_re = no_desc_re
+            unit_re = no_unit_re
+            value_with_time_colon_re = value_missing_period_re
+        
     if not ":" in line:
         # If there isn't a colon delimiter then there isn't
         # a description field either.


Test patch:
diff --git a/tests/test_read_header_line.py b/tests/test_read_header_line.py
index 9ce519f..c2bb479 100644
--- a/tests/test_read_header_line.py
+++ b/tests/test_read_header_line.py
@@ -83,3 +83,28 @@ def test_unit_with_space():
     assert result["unit"] == "1000 lbf"
     assert result["value"] == ""
     assert result["descr"] == "(RT)"
+
+
+def test_line_without_period():
+    line = "              DRILLED  :12/11/2010"
+    result = read_header_line(line)
+    assert result["name"] == "DRILLED"
+    assert result["value"] == "12/11/2010"
+
+def test_line_without_period_with_space():
+    line = "              PERM DAT :1"
+    result = read_header_line(line)
+    assert result["name"] == "PERM DAT"
+    assert result["value"] == "1"
+
+def test_line_without_period_with_colon():
+    line = "			  TIME     :14:00:32"
+    result = read_header_line(line)
+    assert result["name"] == "TIME"
+    assert result["value"] == "14:00:32"
+
+def test_line_without_period_with_decimal_value():
+    line = "              HOLE DIA :85.7"
+    result = read_header_line(line)
+    assert result["name"] == "HOLE DIA"
+    assert result["value"] == "85.7"