Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Parse dir #63

Merged
merged 2 commits into from
Mar 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alaska/keyword_tree.py
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ def parse_directory(self, directory):
comprehensive_dict = {}
comprehensive_not_found = []
for filename in os.listdir(directory):
if filename.endswith(".las"):
if filename.endswith((".LAS",".las")):
path = os.path.join(directory, filename)
las = lasio.read(path)
mnem, desc = [], []
9 changes: 9 additions & 0 deletions alaska/tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -199,6 +199,15 @@ def test_parse_directory_2():
assert "empty" in not_aliased


def test_parse_directory_3():
"""
Test that Aliaser can parse .LAS and .las
"""
aliaser = Alias()
aliased, _ = aliaser.parse_directory(test_dir_1)
assert len(aliased.keys()) > 0


def test_dictionary_parse_1():
"""
Test that dictionary parser in Aliaser parses and returns correct labels