akerbp-mlpet 6.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,79 @@
1
+ # These are some examples of commonly ignored file patterns.
2
+ # You should customize this list as applicable to your project.
3
+ # Learn more about .gitignore:
4
+ # https://www.atlassian.com/git/tutorials/saving-changes/gitignore
5
+
6
+ # Node artifact files
7
+ node_modules/
8
+
9
+ # Build relics
10
+ build/
11
+ dist/
12
+ *.egg-info
13
+
14
+ # Don't track doc builds
15
+ docs/build
16
+
17
+ # Compiled Java class files
18
+ *.class
19
+
20
+ # Compiled Python bytecode
21
+ *.py[cod]
22
+
23
+ # Log files
24
+ *.log
25
+
26
+ # Package files
27
+ *.jar
28
+
29
+ # Maven
30
+ target/
31
+ dist/
32
+
33
+ # JetBrains IDE
34
+ .idea/
35
+
36
+ # VSCode IDE
37
+ .vscode/
38
+
39
+ # Unit test reports
40
+ TEST*.xml
41
+
42
+ # Generated by MacOS
43
+ .DS_Store
44
+
45
+ # Generated by Windows
46
+ Thumbs.db
47
+
48
+ # Applications
49
+ *.app
50
+ *.exe
51
+ *.war
52
+
53
+ # Large media files
54
+ *.mp4
55
+ *.tiff
56
+ *.avi
57
+ *.flv
58
+ *.mov
59
+ *.wmv
60
+
61
+ # Don't upload data files
62
+ support/data/
63
+
64
+ # Coverage test files
65
+ .coverage
66
+ # Dont commit virutal environments
67
+ .venv
68
+
69
+ # Ignore env files
70
+ .env
71
+
72
+ # Ignore joblib files
73
+ *.joblib
74
+
75
+ # Ignore exploration notebooks
76
+ notebooks/
77
+
78
+ # pyenv files
79
+ .python-version
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2021 Aker BP ASA
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: akerbp-mlpet
3
+ Version: 6.0.1
4
+ Summary: Package to prepare well log data for ML projects.
5
+ Project-URL: Repository, https://github.com/AkerBP/expres-ml-mlpet
6
+ Project-URL: Tracker, https://github.com/AkerBP/expres-ml-mlpet/issues
7
+ Author-email: Yann Van Crombrugge <yann.van.crombrugge@akerbp.com>, Saghar Asadi <saghar.asadi@akerbp.com>, Flavia Dias Casagrande <flavia.dias.casagrande@akerbp.com>
8
+ Maintainer-email: Yann Van Crombrugge <yann.van.crombrugge@akerbp.com>, Peder Aursand <peder.aursand@akerbp.com>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Requires-Python: <4.0,>=3.9
12
+ Requires-Dist: importlib-metadata>=4.12
13
+ Requires-Dist: joblib
14
+ Requires-Dist: lasio
15
+ Requires-Dist: pandas<3
16
+ Requires-Dist: plotly
17
+ Requires-Dist: pyyaml>=5.4.1
18
+ Requires-Dist: scikit-learn
19
+ Requires-Dist: scipy
20
+ Requires-Dist: tqdm
21
+ Description-Content-Type: text/markdown
22
+
23
+ # akerbp.mlpet
24
+
25
+ Preprocessing tools for Petrophysics ML projects at Eureka
26
+
27
+ ## Installation
28
+
29
+ Install the package by running the following (requires python 3.8 or later)
30
+
31
+ pip install akerbp.mlpet
32
+
33
+
34
+ ## Quick start
35
+
36
+ For a short example of how to use the mlpet Dataset class for pre-processing data see below. Please refer to the tests folder of this repository for more examples as well as some examples of the `settings.yaml` file:
37
+
38
+ import os
39
+ from akerbp.mlpet import Dataset
40
+ from akerbp.mlpet import utilities
41
+
42
+ # Instantiate an empty dataset object using the example settings and mappings provided
43
+ ds = Dataset(
44
+ settings=os.path.abspath("settings.yaml"), # Absolute file paths are required
45
+ folder_path=os.path.abspath(r"./"), # Absolute file paths are required
46
+ )
47
+
48
+ # Populate the dataset with data from a file (support for multiple file formats and direct cdf data collection exists)
49
+ ds.load_from_pickle(r"data.pkl") # Absolute file paths are preferred
50
+
51
+ # The original data will be kept in ds.df_original and will remain unchanged
52
+ print(ds.df_original.head())
53
+
54
+ # Split the data into train-validation sets
55
+ df_train, df_test = utilities.train_test_split(
56
+ df=ds.df_original,
57
+ target_column=ds.label_column,
58
+ id_column=ds.id_column,
59
+ test_size=0.3,
60
+ )
61
+
62
+ # Preprocess the data for training according to default workflow
63
+ # print(ds.default_preprocessing_workflow) <- Uncomment to see what the workflow does
64
+ df_preprocessed = ds.preprocess(df_train)
65
+
66
+
67
+ The procedure will be exactly the same for any other dataset class. The only difference will be in the "settings". For a full list of possible settings keys see either the [built documentation](docs/build/html/akerbp.mlpet.html) or the akerbp.mlpet.Dataset class docstring. Make sure that the curve names are consistent with those in the dataset.
68
+
69
+ The loaded data is NOT mapped at load time but rather at preprocessing time (i.e. when preprocess is called).
70
+
71
+ ## Recommended workflow for preprocessing
72
+
73
+ Due to the operations performed by certain preprocessing methods in akerbp.mlpet, the order in which the different preprocessing steps can sometimes be important for achieving the desired results. Below is a simple guide that should be followed for most use cases:
74
+ 1. Misrepresented missing data should always be handled first (using `set_as_nan`)
75
+ 2. This should then be followed by data cleaning methods (e.g. `remove_outliers`, `remove_noise`, `remove_small_negative_values`)
76
+ 3. Depending on your use case, once the data is clean you can then impute missing values (see `imputers.py`). Note however that some features depend on the presence of missing values to provide better estimates (e.g. `calculate_VSH`)
77
+ 4. Add new features (using methods from `feature_engineering.py`) or using `process_wells` from `preprocessors.py` if the features should be well specific.
78
+ 5. Fill missing values if any still exist or were created during step 4. (using `fillna_with_fillers`)
79
+ 6. Scale whichever features you want (using `scale_curves` from `preprocessors.py`). In some use cases this step could also come before step 5.
80
+ 7. Encode the GROUP & FORMATION column if you want to use it for training. (using `encode_columns` from `preprocessors.py`)
81
+ 8. Select or drop the specific features you want to keep for model training. (using `select_columns` or `drop_columns` from `preprocessors.py`)
82
+
83
+ > **_NOTE:_** The dataset class **drops** all input columns that are not explicitly named in your settings.yaml or settings dictionary passed to the Dataset class at instantiation. This is to ensure that the data is not polluted with features that are not used. Therefore, if you have features that are being loaded into the Dataset class but are not being preprocessed, these need to be explicitly defined in your settings.yaml or settings dictionary under the keyword argument `keep_columns`.
84
+
85
+ ## API Documentation
86
+
87
+ Full API documentaion of the package can be found under the [docs](docs/build/html/index.html) folder once you have run the make html command.
88
+
89
+ ## For developers
90
+
91
+ - to make the API documentation, from the root directory of the project run (assuming you have installed all development dependencies)
92
+
93
+ cd docs/
94
+ make html
95
+
96
+ - to install mlpet in editable mode for use in another project, there are two
97
+ possible solutions dependent on the tools being used:
98
+ 1. If the other package uses poetry, please refer to this [guide](https://github.com/python-poetry/poetry/discussions/1135#discussioncomment-145756)
99
+ 2. If you are not using poetry (using conda, pyenv or something else), just revert to using `pip install -e .` from within the root directory (Note: you need to have pip version >= 21.3).
100
+ ## License
101
+
102
+ akerbp.mlpet Copyright 2021 AkerBP ASA
103
+
104
+ Licensed under the Apache License, Version 2.0 (the "License");
105
+ you may not use this file except in compliance with the License.
106
+ You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
107
+
108
+ Unless required by applicable law or agreed to in writing, software
109
+ distributed under the License is distributed on an "AS IS" BASIS,
110
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111
+ See the License for the specific language governing permissions and
112
+ limitations under the License.
@@ -0,0 +1,90 @@
1
+ # akerbp.mlpet
2
+
3
+ Preprocessing tools for Petrophysics ML projects at Eureka
4
+
5
+ ## Installation
6
+
7
+ Install the package by running the following (requires python 3.8 or later)
8
+
9
+ pip install akerbp.mlpet
10
+
11
+
12
+ ## Quick start
13
+
14
+ For a short example of how to use the mlpet Dataset class for pre-processing data see below. Please refer to the tests folder of this repository for more examples as well as some examples of the `settings.yaml` file:
15
+
16
+ import os
17
+ from akerbp.mlpet import Dataset
18
+ from akerbp.mlpet import utilities
19
+
20
+ # Instantiate an empty dataset object using the example settings and mappings provided
21
+ ds = Dataset(
22
+ settings=os.path.abspath("settings.yaml"), # Absolute file paths are required
23
+ folder_path=os.path.abspath(r"./"), # Absolute file paths are required
24
+ )
25
+
26
+ # Populate the dataset with data from a file (support for multiple file formats and direct cdf data collection exists)
27
+ ds.load_from_pickle(r"data.pkl") # Absolute file paths are preferred
28
+
29
+ # The original data will be kept in ds.df_original and will remain unchanged
30
+ print(ds.df_original.head())
31
+
32
+ # Split the data into train-validation sets
33
+ df_train, df_test = utilities.train_test_split(
34
+ df=ds.df_original,
35
+ target_column=ds.label_column,
36
+ id_column=ds.id_column,
37
+ test_size=0.3,
38
+ )
39
+
40
+ # Preprocess the data for training according to default workflow
41
+ # print(ds.default_preprocessing_workflow) <- Uncomment to see what the workflow does
42
+ df_preprocessed = ds.preprocess(df_train)
43
+
44
+
45
+ The procedure will be exactly the same for any other dataset class. The only difference will be in the "settings". For a full list of possible settings keys see either the [built documentation](docs/build/html/akerbp.mlpet.html) or the akerbp.mlpet.Dataset class docstring. Make sure that the curve names are consistent with those in the dataset.
46
+
47
+ The loaded data is NOT mapped at load time but rather at preprocessing time (i.e. when preprocess is called).
48
+
49
+ ## Recommended workflow for preprocessing
50
+
51
+ Due to the operations performed by certain preprocessing methods in akerbp.mlpet, the order in which the different preprocessing steps can sometimes be important for achieving the desired results. Below is a simple guide that should be followed for most use cases:
52
+ 1. Misrepresented missing data should always be handled first (using `set_as_nan`)
53
+ 2. This should then be followed by data cleaning methods (e.g. `remove_outliers`, `remove_noise`, `remove_small_negative_values`)
54
+ 3. Depending on your use case, once the data is clean you can then impute missing values (see `imputers.py`). Note however that some features depend on the presence of missing values to provide better estimates (e.g. `calculate_VSH`)
55
+ 4. Add new features (using methods from `feature_engineering.py`) or using `process_wells` from `preprocessors.py` if the features should be well specific.
56
+ 5. Fill missing values if any still exist or were created during step 4. (using `fillna_with_fillers`)
57
+ 6. Scale whichever features you want (using `scale_curves` from `preprocessors.py`). In some use cases this step could also come before step 5.
58
+ 7. Encode the GROUP & FORMATION column if you want to use it for training. (using `encode_columns` from `preprocessors.py`)
59
+ 8. Select or drop the specific features you want to keep for model training. (using `select_columns` or `drop_columns` from `preprocessors.py`)
60
+
61
+ > **_NOTE:_** The dataset class **drops** all input columns that are not explicitly named in your settings.yaml or settings dictionary passed to the Dataset class at instantiation. This is to ensure that the data is not polluted with features that are not used. Therefore, if you have features that are being loaded into the Dataset class but are not being preprocessed, these need to be explicitly defined in your settings.yaml or settings dictionary under the keyword argument `keep_columns`.
62
+
63
+ ## API Documentation
64
+
65
+ Full API documentaion of the package can be found under the [docs](docs/build/html/index.html) folder once you have run the make html command.
66
+
67
+ ## For developers
68
+
69
+ - to make the API documentation, from the root directory of the project run (assuming you have installed all development dependencies)
70
+
71
+ cd docs/
72
+ make html
73
+
74
+ - to install mlpet in editable mode for use in another project, there are two
75
+ possible solutions dependent on the tools being used:
76
+ 1. If the other package uses poetry, please refer to this [guide](https://github.com/python-poetry/poetry/discussions/1135#discussioncomment-145756)
77
+ 2. If you are not using poetry (using conda, pyenv or something else), just revert to using `pip install -e .` from within the root directory (Note: you need to have pip version >= 21.3).
78
+ ## License
79
+
80
+ akerbp.mlpet Copyright 2021 AkerBP ASA
81
+
82
+ Licensed under the Apache License, Version 2.0 (the "License");
83
+ you may not use this file except in compliance with the License.
84
+ You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
85
+
86
+ Unless required by applicable law or agreed to in writing, software
87
+ distributed under the License is distributed on an "AS IS" BASIS,
88
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
+ See the License for the specific language governing permissions and
90
+ limitations under the License.
@@ -0,0 +1,136 @@
1
+ [project]
2
+ name = "akerbp-mlpet"
3
+ version = "6.0.1"
4
+ description = "Package to prepare well log data for ML projects."
5
+ authors = [
6
+ { name = "Yann Van Crombrugge", email = "yann.van.crombrugge@akerbp.com" },
7
+ { name = "Saghar Asadi", email = "saghar.asadi@akerbp.com" },
8
+ { name = "Flavia Dias Casagrande", email = "flavia.dias.casagrande@akerbp.com" },
9
+ ]
10
+ requires-python = ">=3.9,<4.0"
11
+ readme = "README.md"
12
+ license = "Apache-2.0"
13
+ maintainers = [
14
+ { name = "Yann Van Crombrugge", email = "yann.van.crombrugge@akerbp.com" },
15
+ { name = "Peder Aursand", email = "peder.aursand@akerbp.com" },
16
+ ]
17
+ dependencies = [
18
+ "pyyaml>=5.4.1",
19
+ "pandas<3",
20
+ "importlib-metadata>=4.12",
21
+ "scipy",
22
+ "scikit-learn",
23
+ "plotly",
24
+ "tqdm",
25
+ "lasio",
26
+ "joblib",
27
+ ]
28
+
29
+ [project.urls]
30
+ Repository = "https://github.com/AkerBP/expres-ml-mlpet"
31
+ Tracker = "https://github.com/AkerBP/expres-ml-mlpet/issues"
32
+
33
+ [dependency-groups]
34
+ dev = [
35
+ "mypy",
36
+ "types-pyyaml",
37
+ "types-requests",
38
+ "types-toml",
39
+ "types-python-dateutil",
40
+ "ruff",
41
+ ]
42
+ pre-commit = ["pre-commit"]
43
+ doc = [
44
+ "sphinx",
45
+ "myst-parser",
46
+ "furo",
47
+ ]
48
+ tests = [
49
+ "pytest",
50
+ "coverage",
51
+ ]
52
+ version = [
53
+ "semver",
54
+ "toml",
55
+ "requests",
56
+ ]
57
+
58
+ [tool.uv]
59
+ default-groups = []
60
+
61
+ [tool.hatch.build.targets.sdist]
62
+ include = ["src/akerbp"]
63
+
64
+ [tool.hatch.build.targets.wheel]
65
+ include = ["src/akerbp"]
66
+
67
+ [tool.hatch.build.targets.wheel.sources]
68
+ "src/akerbp" = "akerbp"
69
+
70
+ [build-system]
71
+ requires = ["hatchling"]
72
+ build-backend = "hatchling.build"
73
+
74
+ [tool.pytest.ini_options]
75
+ minversion = "6.0"
76
+ addopts = "-v -rA"
77
+ testpaths = [
78
+ "tests",
79
+ ]
80
+ filterwarnings = [
81
+ "error::pandas.errors.SettingWithCopyWarning",
82
+ ]
83
+ log_cli = "true"
84
+
85
+ [tool.mypy]
86
+ files=["src/**/*.py", "tests/**/*.py"]
87
+ incremental = "True"
88
+ ignore_missing_imports = "True"
89
+ show_column_numbers = "True"
90
+ disallow_untyped_calls = "True"
91
+ warn_return_any = "True"
92
+ strict_optional = "True"
93
+ warn_no_return = "True"
94
+ warn_redundant_casts = "True"
95
+ warn_unused_ignores = "True"
96
+ disallow_any_generics = "True"
97
+ explicit_package_bases = "True"
98
+
99
+ [tool.ruff]
100
+ src = ["src",]
101
+ exclude = [
102
+ "docs",
103
+ ".venv",
104
+ "__pycache__",
105
+ ]
106
+
107
+ [tool.ruff.lint]
108
+ ignore = [
109
+ "E501", # Handled by formatter
110
+ "N818",
111
+ "G004", # Requires a bigger refactor of all of the logging
112
+ ]
113
+ select = [
114
+ "A",
115
+ "B",
116
+ "C",
117
+ "E",
118
+ "F",
119
+ "W",
120
+ "I",
121
+ "N",
122
+ "G",
123
+ "LOG",
124
+ "PD",
125
+ "PTH",
126
+ ]
127
+
128
+ [tool.ruff.lint.mccabe]
129
+ max-complexity = 18
130
+
131
+ [tool.ruff.lint.flake8-quotes]
132
+ docstring-quotes = "double"
133
+ multiline-quotes = "double"
134
+
135
+ [tool.ruff.lint.flake8-tidy-imports]
136
+ ban-relative-imports = "all"
@@ -0,0 +1,25 @@
1
+ import importlib_metadata
2
+
3
+ from akerbp.mlpet import (
4
+ feature_engineering,
5
+ imputers,
6
+ petrophysical_features,
7
+ plotting,
8
+ preprocessors,
9
+ utilities,
10
+ )
11
+ from akerbp.mlpet.dataset import Dataset
12
+ from akerbp.mlpet.transformer import MLPetTransformer
13
+
14
+ __version__ = importlib_metadata.version(__name__)
15
+
16
+ __all__ = [
17
+ "Dataset",
18
+ "feature_engineering",
19
+ "imputers",
20
+ "utilities",
21
+ "preprocessors",
22
+ "petrophysical_features",
23
+ "MLPetTransformer",
24
+ "plotting",
25
+ ]
File without changes