Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ignore_comments not mentioned in documentation #392

Closed
kinverarity1 opened this issue Sep 12, 2020 · 0 comments
Closed

ignore_comments not mentioned in documentation #392

kinverarity1 opened this issue Sep 12, 2020 · 0 comments
Assignees
Labels
documentation Anything that calls for improvements to the Sphinx docs

Comments

@kinverarity1
Copy link
Owner

The keyword argument ignore_comments on las.py:LASFile.read should be mentioned in the documentation, probably here: https://lasio.readthedocs.io/en/latest/header-section.html#handling-errors.

lasio/lasio/las.py

Lines 83 to 125 in 90a4dac

def read(
self,
file_ref,
ignore_data=False,
read_policy="default",
null_policy="strict",
ignore_header_errors=False,
ignore_comments=("#",),
mnemonic_case="upper",
index_unit=None,
remove_data_line_filter="#",
**kwargs
):
"""Read a LAS file.
Arguments:
file_ref (file-like object, str): either a filename, an open file
object, or a string containing the contents of a file.
Keyword Arguments:
null_policy (str or list): see
http://lasio.readthedocs.io/en/latest/data-section.html#handling-invalid-data-indicators-automatically
ignore_data (bool): if True, do not read in any of the actual data,
just the header metadata. False by default.
ignore_header_errors (bool): ignore LASHeaderErrors (False by
default)
ignore_comments (tuple/str): ignore comments beginning with characters
e.g. ``("#", '"')`` in header sections
mnemonic_case (str): 'preserve': keep the case of HeaderItem mnemonics
'upper': convert all HeaderItem mnemonics to uppercase
'lower': convert all HeaderItem mnemonics to lowercase
index_unit (str): Optionally force-set the index curve's unit to "m" or "ft"
remove_data_line_filter (str, func): string or function for removing/ignoring lines
in the data section e.g. a function which accepts a string (a line from the
data section) and returns either True (do not parse the line) or False
(parse the line). If this argument is a string it will instead be converted
to a function which rejects all lines starting with that value e.g. ``"#"``
will be converted to ``lambda line: line.strip().startswith("#")``
See :func:`lasio.reader.open_with_codecs` for additional keyword
arguments which help to manage issues relate to character encodings.
"""

@kinverarity1 kinverarity1 added the documentation Anything that calls for improvements to the Sphinx docs label Sep 12, 2020
@dcslagel dcslagel self-assigned this Nov 1, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Anything that calls for improvements to the Sphinx docs
Projects
None yet
Development

No branches or pull requests

2 participants