-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to types. separate utility functions
- Loading branch information
1 parent
cf79ef1
commit cb750ae
Showing
10 changed files
with
101 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
from typing import List | ||
|
||
from .queries.get_stratigraphic_units import get_stratigraphic_units | ||
from .types import StratigraphicUnit, StratigraphicSurface | ||
from .stratigraphy_utils import sort_stratigraphic_names_by_hierarchy, sort_stratigraphic_units_by_hierarchy | ||
from .types import StratigraphicUnit | ||
|
||
|
||
class StratigraphyAccess: | ||
def __init__(self, access_token: str): | ||
self._smda_token = access_token | ||
|
||
def get_stratigraphic_units(self, stratigraphic_column_identifier: str) -> List[StratigraphicUnit]: | ||
"""Get stratigraphic units for stratigraphic column in lithostratigraphical order.""" | ||
stratigraphic_units = get_stratigraphic_units(self._smda_token, stratigraphic_column_identifier) | ||
|
||
sorted_units = sort_stratigraphic_units_by_hierarchy(stratigraphic_units) | ||
return sorted_units | ||
|
||
def get_stratigraphic_surfaces(self, stratigraphic_column_identifier: str) -> List[StratigraphicSurface]: | ||
"""Get a flatten list of top/unit/base surface names in lithostratigraphical order""" | ||
stratigraphic_units = get_stratigraphic_units(self._smda_token, stratigraphic_column_identifier) | ||
|
||
sorted_units = sort_stratigraphic_names_by_hierarchy(stratigraphic_units) | ||
return sorted_units | ||
"""Get stratigraphic units for a given stratigraphic column""" | ||
return get_stratigraphic_units(self._smda_token, stratigraphic_column_identifier) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters