Lasio

Latest version: v0.31

Safety actively analyzes 621420 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

0.31

- Many improvements to code style and formatting, and the documentation
- 555 - Fix problem when writing with changed data (different number of depths)
- 554 / 556 - Enable DLM (delimiter) TAB
- 552 - Remove or replace cchardet with chardet
- 530 - Detect hyphens in data section and adjust regexp_subs as needed
- Fix 322 - provide a way to consistently retrieve header items which may
or may not be present in the header:

If you try ordinary item-style access,
as is normal in Python, a KeyError exception will be raised if it is missing:

python
>>> permit = las.well['PRMT']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\devapps\kinverarity\projects\lasio\lasio\las_items.py", line 313, in __getitem__
raise KeyError("%s not in %s" % (key, self.keys()))
KeyError: "PRMT not in ['STRT', 'STOP', 'STEP', 'NULL', 'COMP', 'WELL', 'FLD', 'LOC', 'PROV', 'SRVC', 'DATE', 'UWI']"


A better pattern is to use the ``lasio.SectionItems.get`` method, which
allows you to specify a default value in the case of it missing:

python
>>> permit = las.well.get('PRMT', 'unknown')
>>> permit
HeaderItem(mnemonic="PRMT", unit="", value="unknown", descr="")


You can use the ``add=True`` keyword argument if you would like this
header item to be added, as well as returned:

python
>>> permit = las.well.get('PRMT', 'unknown', add=True)
>>> las.well
[HeaderItem(mnemonic="STRT", unit="M", value="0.05", descr="FIRST INDEX VALUE"),
HeaderItem(mnemonic="STOP", unit="M", value="136.6", descr="LAST INDEX VALUE"),
HeaderItem(mnemonic="STEP", unit="M", value="0.05", descr="STEP"),
HeaderItem(mnemonic="NULL", unit="", value="-99999", descr="NULL VALUE"),
HeaderItem(mnemonic="COMP", unit="", value="", descr="COMP"),
HeaderItem(mnemonic="WELL", unit="", value="Scorpio E1", descr="WELL"),
HeaderItem(mnemonic="FLD", unit="", value="", descr=""),
HeaderItem(mnemonic="LOC", unit="", value="Mt Eba", descr="LOC"),
HeaderItem(mnemonic="SRVC", unit="", value="", descr=""),
HeaderItem(mnemonic="CTRY", unit="", value="", descr=""),
HeaderItem(mnemonic="STAT", unit="", value="SA", descr="STAT"),
HeaderItem(mnemonic="CNTY", unit="", value="", descr=""),
HeaderItem(mnemonic="DATE", unit="", value="15/03/2015", descr="DATE"),
HeaderItem(mnemonic="UWI", unit="", value="6038-187", descr="WUNT"),
HeaderItem(mnemonic="PRMT", unit="", value="unknown", descr="")]

0.30

- Fixes for 446 (Implement a numpy-based reader for the data section; 452) and 444 (Provide a way to benchmark speed performance of LASFile.read; 449). This leads to a big improvement in speed (e.g. from 1091 msec to 341 msec for
a large sample file).
- Fixes for 439 (Data section containing non-numeric chars is parsed entirely as str) and 227 (NULL value replacing valid value in DEPT) by allowing different data types for different columns (PRs 459, 460, 461)
- Partially fix 375 (allow writing mnemonics in ~ASCII line; PRs 466, 471, 465)
- Partial fix for 265 (Parse comma-delimited ~ASCII sections; 485)
- Fix 83 (LAS file with more curves defined in ~C section than available in ~A section; 480)
- Improve visibility and access to the Code of Conduct (469)
- Fix 453 (rounding issues when writing LAS file) (455)
- Fix 268 (remove side-effects from writer) (447, 451)
- Documentation updates (475, 477, 481, 501, 498, 500)
- Fix 473 (Header lines without a period are discarded unnecessarily)
- Fix 472 (Detect and raise IOError exception for LiDAR files; 482)
- Fix 483 (perfomance decrease in DEBUG logging level; 484)
- Fix 478 (:1 :2 should only be appended to mnemonics when using LASFile.read) with 479:
Add update_curve and replace_curve_item methods to LASFile
- Fix 490 (LAS 2.1 reading error; 491)
- Fix 486 (Adding a citation file, and maybe a DOI; 487)
- Fix 392 (ignore_comments not mentioned in documentation; 495)
- Fix 332: Describe default read_policies in docstring, with 489
- Fix 502 (NumPy type conversion alias deprecation; 503)
- minor performance improvements (470, )

0.29

- Fix 404 (lasio changes STEP with imprecise floating-point number behaviour; 432)
- Add option ``len_numeric_field=-1``, ``lhs_spacer=" "``, and ``spacer=" "`` to writer.py:write (see 412; PR 418)
- Fix 271 (Read quoted strings in data section properly; 423)
- Fix 427 (Change null_policy to handle small non-zero values; 429)
- Fix 417 (Fix parsing for empty ~Other section; 430)
- Fix 402 (fixes issue when unit starts with dot; 403)
- Fix 395 (Update doc examples to reflect new HeaderItem repr; 410)
- Fix 426 (Update urllib.request to be the preferred urllib; 428)
- Add check for pushed tag version to version tests (396)
- Update GitHub Action Python CI testing (399, 400)
- Improve ``las_items.py:HeaderItem.__repr__`` truncation logic (397)
- Remove codecs import (unused) and fix typo (406)
- Exclude LAS files from GitHubs Language Stats (411)
- Re-add try-except check around call to reader.read_data_section_iterative() (401)
- Remove reader.py:read_file_contents - unused code (see 401; 393)
- Add test for timestring with colon in ~Well section (see 419 - PR 420)
- Fix SyntaxWarning in writer.py (425)
- Add bugfix and feature request issue templates to GitHub repository
- Apply ``black`` code style to all Python files (438, 398)
- Update [demo notebook for using logging levels](https://github.com/kinverarity1/lasio/blob/master/notebooks/set%20logging%20level%20for%20lasio.ipynb) with current behaviour
- Update [contributing guide](https://github.com/kinverarity1/lasio/blob/master/docs/source/contributing.rst) (#437, 441)

0.28

- Major re-write of reader code working towards LAS 3.0 support (327; 347, 345, 353, 355, 358, 367, 368, 369)
- Fix 377 (writing "None" as the value instead of ""; 377)
- Fix 373 (enable GitHub Actions CI testing on MacOS, Windows, Ubuntu; 374, 387)
- Fix 363 (parse composite units such as "1000 lbf" correctly; 390)
- Fix 319 (allow skipping comment lines in data sections; 391)
- Avoid unnecessary exceptions on reading LAS 3.0 data sections (385)
- Fix broken ReadTheDocs build

0.27

- Fix 380 (install failed without git installed; 382)

0.26

- This is the final version which works on Python 2.7 (364)
- Fix 333 (header lines not parsed when colon is in description; 335)
- Fix 359 (sections not found when leading whitespace in line; 360, 361)
- Fix 350 (bug with NULL; 352)
- Fix 339 (0.1IN not recognised as index unit; 340, 349)
- Fix 31 (add command-line script to convert between LAS versions; 329)
- Fix 75 (add Cyrillic variant for metres; 330)
- Fix 326 (Support header-only LAS files--don't lose the last header section before a missing ~A section)
- Improve documentation regarding deleting items and curves (315, 325)
- Add deprecation markers (331)
- Align json.dumps and LASFile.to_json() (328)
- Fixes and updates to setup.py relating to the adoption of setuptools_scm (312, 317, 318)
- Clean up and background changes related to future LAS 3.0 support: 334, 337, 338, 341, 342, 346, 348, 372

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.