well-log-toolkit 0.1.124__py3-none-any.whl → 0.1.125__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1642,7 +1642,7 @@ class WellDataManager:
1642
1642
  # No combine - load each file separately
1643
1643
  loaded_sources = []
1644
1644
  for file_path in file_paths:
1645
- # Read well name and source name before loading
1645
+ # Read well name before loading
1646
1646
  las = LasFile(file_path)
1647
1647
  if las.well_name is None:
1648
1648
  raise LasFileError(
@@ -1650,18 +1650,28 @@ class WellDataManager:
1650
1650
  "Cannot determine which well to load into."
1651
1651
  )
1652
1652
  well_name = las.well_name
1653
- source_name_from_file = las.source_name
1653
+ sanitized_name = sanitize_well_name(well_name)
1654
+ well_key = f"well_{sanitized_name}"
1655
+
1656
+ # Track existing sources before loading
1657
+ existing_sources = set()
1658
+ if well_key in self._wells:
1659
+ existing_sources = set(self._wells[well_key].sources)
1654
1660
 
1655
1661
  # Load the file
1656
1662
  self.load_las(file_path, path=None, sampled=sampled, combine=None, source_name=None)
1657
1663
 
1658
- # Track what was loaded
1659
- loaded_sources.append((well_name, source_name_from_file))
1664
+ # Find new sources that were added
1665
+ if well_key in self._wells:
1666
+ new_sources = set(self._wells[well_key].sources) - existing_sources
1667
+ for src_name in new_sources:
1668
+ loaded_sources.append((well_name, src_name))
1660
1669
 
1661
1670
  # Print debug output
1662
- print("Loaded sources:")
1663
- for well_name, src_name in loaded_sources:
1664
- print(f" - Well {well_name}: {src_name}")
1671
+ if loaded_sources:
1672
+ print("Loaded sources:")
1673
+ for well_name, src_name in loaded_sources:
1674
+ print(f" - Well {well_name}: {src_name}")
1665
1675
 
1666
1676
  return self
1667
1677
 
@@ -1681,12 +1691,15 @@ class WellDataManager:
1681
1691
  "Cannot determine which well to load into."
1682
1692
  )
1683
1693
 
1684
- source_name_from_file = las.source_name
1685
1694
  sanitized_name = sanitize_well_name(well_name)
1686
1695
  # Use well_ prefix for dictionary key (attribute access)
1687
1696
  well_key = f"well_{sanitized_name}"
1688
1697
 
1689
- if well_key not in self._wells:
1698
+ # Track existing sources before loading
1699
+ existing_sources = set()
1700
+ if well_key in self._wells:
1701
+ existing_sources = set(self._wells[well_key].sources)
1702
+ else:
1690
1703
  # Create new well
1691
1704
  self._wells[well_key] = Well(
1692
1705
  name=well_name,
@@ -1698,9 +1711,14 @@ class WellDataManager:
1698
1711
  # Load into well
1699
1712
  self._wells[well_key].load_las(las, sampled=sampled)
1700
1713
 
1714
+ # Find new sources that were added
1715
+ new_sources = set(self._wells[well_key].sources) - existing_sources
1716
+
1701
1717
  # Print debug output
1702
- print("Loaded sources:")
1703
- print(f" - Well {well_name}: {source_name_from_file}")
1718
+ if new_sources:
1719
+ print("Loaded sources:")
1720
+ for src_name in new_sources:
1721
+ print(f" - Well {well_name}: {src_name}")
1704
1722
 
1705
1723
  return self # Enable chaining
1706
1724
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: well-log-toolkit
3
- Version: 0.1.124
3
+ Version: 0.1.125
4
4
  Summary: Fast LAS file processing with lazy loading and filtering for well log analysis
5
5
  Author-email: Kristian dF Kollsgård <kkollsg@gmail.com>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  well_log_toolkit/__init__.py,sha256=ilJAIIhh68pYfD9I3V53juTEJpoMN8oHpcpEFNpuXAQ,3793
2
2
  well_log_toolkit/exceptions.py,sha256=X_fzC7d4yaBFO9Vx74dEIB6xmI9Agi6_bTU3MPxn6ko,985
3
3
  well_log_toolkit/las_file.py,sha256=Tj0mRfX1aX2s6uug7BBlY1m_mu3G50EGxHGzD0eEedE,53876
4
- well_log_toolkit/manager.py,sha256=oz67-IZvMEP7T_JEY7JMzeXWAvG1FmFSk8NKBif7yFI,108220
4
+ well_log_toolkit/manager.py,sha256=7v2zzdkUc_WFCdjZwn4DFHW5pkowtC85LS3o4lvZ9bI,109002
5
5
  well_log_toolkit/operations.py,sha256=z8j8fGBOwoJGUQFy-Vawjq9nm3OD_dUt0oaNh8yuG7o,18515
6
6
  well_log_toolkit/property.py,sha256=WOzoNQcmHCQ8moIKsnSyLgVC8s4LBu2x5IBXtFzmMe8,76236
7
7
  well_log_toolkit/regression.py,sha256=7D3oI-1XVlFb-mOoHTxTTtUHERFyvQSBAzJzAGVoZnk,25192
@@ -9,7 +9,7 @@ well_log_toolkit/statistics.py,sha256=_huPMbv2H3o9ezunjEM94mJknX5wPK8V4nDv2lIZZR
9
9
  well_log_toolkit/utils.py,sha256=O2KPq4htIoUlL74V2zKftdqqTjRfezU9M-568zPLme0,6866
10
10
  well_log_toolkit/visualization.py,sha256=xb870FG5FghU2gEkqdn1b2NbWNu07oDmFDN1Cx1HIi0,157280
11
11
  well_log_toolkit/well.py,sha256=kIN3Zr0sI3Zt3DeHbxDXADbQfWnVxXCQrHZ4UEMyeqI,103343
12
- well_log_toolkit-0.1.124.dist-info/METADATA,sha256=CfWF9CRjoyY3ZmsZ1CkKOSsuVUMg3yY3_XZE3B_lwf4,59810
13
- well_log_toolkit-0.1.124.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- well_log_toolkit-0.1.124.dist-info/top_level.txt,sha256=BMOo7OKLcZEnjo0wOLMclwzwTbYKYh31I8RGDOGSBdE,17
15
- well_log_toolkit-0.1.124.dist-info/RECORD,,
12
+ well_log_toolkit-0.1.125.dist-info/METADATA,sha256=I3JrySR3JycP7qOsp4gCCOKme-hcasI-VkhbaArGsRg,59810
13
+ well_log_toolkit-0.1.125.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ well_log_toolkit-0.1.125.dist-info/top_level.txt,sha256=BMOo7OKLcZEnjo0wOLMclwzwTbYKYh31I8RGDOGSBdE,17
15
+ well_log_toolkit-0.1.125.dist-info/RECORD,,