forked from equinor/xtgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes: - Adding ENUM types instead of hardcoding "DISC", "CONT" - Adding ENUM for xname, yname, ... - Reorganising modules, making public modules less code - A core class is _xyz_data.py in xyz, which can be re-used by Points and Polygons - Add type annotations, but not complete - Some linting and code improvements
- Loading branch information
1 parent
aeae39f
commit 4ed15a0
Showing
31 changed files
with
1,769 additions
and
947 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from enum import Enum, unique | ||
|
||
|
||
# to be able to list all values in an easy manner e.g. _AttrName.list() | ||
class ExtendedEnum(Enum): | ||
@classmethod | ||
def list(cls): | ||
return list(map(lambda c: c.value, cls)) | ||
|
||
|
||
# default names of special column names | ||
@unique | ||
class _AttrName(ExtendedEnum): | ||
XNAME = "X_UTME" | ||
YNAME = "Y_UTMN" | ||
ZNAME = "Z_TVDSS" | ||
M_MD_NAME = "M_MDEPTH" | ||
Q_MD_NAME = "Q_MDEPTH" | ||
M_AZI_NAME = "M_AZI" | ||
Q_AZI_NAME = "Q_AZI" | ||
M_INCL_NAME = "M_INCL" | ||
Q_INCL_NAME = "Q_INCL" | ||
I_INDEX = "I_INDEX" | ||
J_INDEX = "J_INDEX" | ||
K_INDEX = "K_INDEX" | ||
R_HLEN_NAME = "R_HLEN" | ||
|
||
|
||
@unique | ||
class _AttrType(ExtendedEnum): | ||
"""Enumerate type of attribute/log""" | ||
|
||
CONT = "CONT" | ||
DISC = "DISC" | ||
|
||
|
||
@unique | ||
class _XYZType(ExtendedEnum): | ||
"""Enumerate type of context""" | ||
|
||
POINTS = 1 | ||
POLYGONS = 2 # ie. same here as PolyLines | ||
WELL = 3 |
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
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
Oops, something went wrong.