-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
239 lines (210 loc) · 7.82 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
[build-system]
requires = ["hatchling>=1.8.0"]
build-backend = "hatchling.build"
[project]
name = "temporalscope"
dynamic = ["version"]
description = "TemporalScope: Model-Agnostic Temporal Feature Importance Analysis."
authors = [
{ name = "Philip Ndikum", email = "[email protected]" },
{ name = "Serge Ndikum" },
{ name = "Kane Norman", email = "[email protected]" },
]
license = "Apache-2.0"
readme = "README.md"
requires-python = ">=3.10,<3.12"
dependencies = [
# Core Explainability Libraries
"shap>=0.46.0", # SHAP (SHapley Additive exPlanations): For model interpretability and feature importance in machine learning.
"borutashap>=1.0.17", # Boruta-SHAP: Combines SHAP with Boruta for feature selection, helping identify the most important features.
"lime>=0.2.0.1", # LIME (Local Interpretable Model-agnostic Explanations): Enables model-agnostic interpretability, focusing on local, instance-specific explanations.
# General Machine Learning and Statistics
"scikit-learn>=1.5.1", # Scikit-Learn: Essential machine learning library for classification, regression, and clustering.
"lightgbm>=4.5.0", # LightGBM: Gradient-boosted decision tree library that's efficient for high-dimensional data.
"statsmodels>=0.14.2", # Statsmodels: Provides statistical models and hypothesis tests, useful for traditional time series analysis.
# Data Manipulation and Storage
"pandas>=1.5.0", # Pandas: Core library for handling structured data in DataFrames.
"modin[all]>=0.31.0", # Modin: Parallelizes Pandas operations for large datasets with Dask/Ray backend.
"pyarrow>=17.0.0", # PyArrow: Enables efficient columnar data format (Arrow) for fast data processing and storage, commonly used with Parquet files.
"polars>=1.5.0", # Polars: High-performance DataFrame library, ideal for handling large datasets in memory.
"dask[dataframe]>=2024.7", # Dask DataFrame: Handles parallelized computations for very large datasets.
# Specialized Computation
"flax>=0.8.5", # Flax: Neural network library for JAX, useful for building deep learning models.
"jax>=0.4.31", # JAX: Accelerated computation for machine learning research, supporting CPU/GPU/TPU backends.
# Backend-Agnostic Processing
"narwhals>=0.2.3", # Narwhals: Ensures backend compatibility across Pandas, Polars, Modin, and other dataframes, optimizing performance.
# Environment Configuration
"python-dotenv>=1.0.1", # Python-Dotenv: Manages environment variables for secure and flexible configuration.
# Markdown Table Display
"tabulate>=0.9.0", # Tabulate: Allows Markdown-friendly table formatting for DataFrames in Narwhals.
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
keywords = [
"Shap",
"Borutashap",
"Feature-Importance",
"Temporal-Feature-Importance",
"Temporal-Feature-Analysis",
"XAI",
"ML",
"AI",
"Machine-Learning",
"Artificial-Intelligence",
"TemporalScope",
"Time-Series",
]
[project.optional-dependencies]
docs = [
"mkdocs",
"mkdocstrings-python",
"mkdocs-material",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-section-index",
"markdown-callouts",
"black",
]
[project.urls]
"Source code" = "https://github.com/philip-ndikum/TemporalScope"
Documentation = "https://temporalscope.readthedocs.io/en/latest/"
[tool.hatch.envs.default]
dependencies = [
"pre-commit",
"ruff",
"jupyterlab",
"notebook",
"commitizen",
"types-tabulate>=0.9.0",
]
[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.test]
extra-dependencies = [
"pytest",
"pytest-cov",
"pytest-custom_exit_code",
"pytest-mock",
"papermill>=2.5.0",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --strict"
serve = "mkdocs serve --strict"
[tool.hatch.envs.test.scripts]
unit = 'pytest --cov-report=lcov --cov-report=term --cov="temporalscope" -m "not integration and not notebook" {args:test}'
notebook = 'pytest -m "notebook" {args:test}'
integration = 'pytest -m "integration" {args:test}'
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v -ra -q"
log_cli = true
log_cli_level = "INFO"
log_format = "[%(asctime)s][%(levelname)s] %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
minversion = "6.0"
filterwarnings = "ignore"
markers = [
"notebook: marks tests that verify notebook execution",
"integration: marks tests that require external resources",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff]
extend-exclude = ["*.pyc", "tutorial_notebooks/*"]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"A001", # builtin-variable-shadowing
"A002", # builtin-argument-shadowing
"A003", # builtin-attribute-shadowing
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"D", # flake8-docstrings
"E501", # Long lines
"EXE", # flake8-executable
"F", # Pyflakes
"I", # isort
"INT", # flake8-gettext
"PERF", # Perflint
"PL", # Pylint
"Q", # flake8-quotes
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"C901", # temporary
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D203", # 1 blank line required before class docstring
"D211", # No blank lines allowed before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D400", # Ignore "First line should end with a period" for docstrings.
"D401", # Ignore "First line should be in imperative mood" for docstrings.
"D415", # Ignore "First line should end with a period, question mark, or exclamation point."
"E501", # Ignore "Line too long" in docstrings/comments for exceeding 120 characters.
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # Use a list comprehension to create a transformed list
"PLR0913", # too many arguments
"PLR1714", # repeated-equality-comparison
"PLR5501", # collapsible-else-if
"PLW2901", # redefined-loop-name
"SIM102", # temporary
"SIM108", # if-else-block-instead-of-if-exp
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = [
"A001", # builtin-variable-shadowing
"D103", # missing docstring in public function
]
"test/*" = ["PLR2004"] # Ignore magic number warnings in test files
[tool.mypy]
files = "src/temporalscope"
python_version = "3.10"
ignore_missing_imports = true
warn_unreachable = true
exclude = 'test/*'
warn_return_any = false # Turn off MyPy warnings for missing return types
[tool.bandit]
exclude_dirs = ["test"]
[tool.hatch.build.targets.wheel]
packages = ["src/temporalscope"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/VERSION.txt"]
[tool.hatch.version]
path = "VERSION.txt"
pattern = "(?P<version>.+)"
[tool.hatch.envs.default.scripts]
check = "ruff check {args}"
fix = "ruff check --fix"
format = "ruff format {args}"
format-check = "ruff format --check {args}"
clear-coverage = "coverage erase"
generate-kernel = """
python -m ipykernel install --user --name temporalscope-kernel --display-name "TemporalScope"
echo "Jupyter kernel 'TemporalScope' created. You can now use it in Jupyter notebooks."
"""
[tool.commitizen]
version = "0.1.0"
update_changelog_on_bump = true
tag_format = "v$version"
version_files = ["pyproject.toml:version", "VERSION.txt"]
[tool.hatch.metadata]
allow-direct-references = true