|
1 | | -[tool.black] |
2 | | -target-version = ['py38'] |
3 | | -include = '\.pyi?$' |
| 1 | +[build-system] |
| 2 | +requires = ["setuptools>=64", "setuptools_scm[toml]>=8"] |
| 3 | +build-backend = "setuptools.build_meta" |
4 | 4 |
|
5 | | -[tool.isort] |
6 | | -profile = "black" |
| 5 | +[project] |
| 6 | +name = "imbalanced-learn" |
| 7 | +dynamic = ["version", "readme"] |
| 8 | +description = "Toolbox for imbalanced dataset in machine learning" |
| 9 | +authors = [ |
| 10 | + { name= "G. Lemaitre", email= "[email protected]"}, |
| 11 | + { name= "C. Aridas", email= "[email protected]"}, |
| 12 | +] |
| 13 | +classifiers = [ |
| 14 | + "Development Status :: 5 - Production/Stable", |
| 15 | + "Environment :: Console", |
| 16 | + "Intended Audience :: Science/Research", |
| 17 | + "License :: OSI Approved :: MIT License", |
| 18 | + "Operating System :: OS Independent", |
| 19 | + "Programming Language :: Python :: 3.10", |
| 20 | + "Programming Language :: Python :: 3.11", |
| 21 | + "Programming Language :: Python :: 3.12", |
| 22 | + "Topic :: Scientific/Engineering", |
| 23 | + "Topic :: Software Development :: Libraries", |
| 24 | +] |
| 25 | +requires-python = ">=3.10" |
| 26 | +dependencies = [ |
| 27 | + "numpy>=1.24.3,<3", |
| 28 | + "scipy>=1.10.1,<2", |
| 29 | + "scikit-learn>=1.2.2,<2", |
| 30 | + "joblib>=1.1.1,<2", |
| 31 | + "threadpoolctl>=2.0.0,<4", |
| 32 | +] |
7 | 33 |
|
8 | | -[tool.ruff] |
9 | | -# all rules can be found here: https://beta.ruff.rs/docs/rules/ |
10 | | -select = ["E", "F", "W", "I"] |
| 34 | +[tool.setuptools.dynamic] |
| 35 | +version = { file = "imblearn/VERSION.txt" } |
| 36 | +readme = { file = "README.rst" } |
| 37 | + |
| 38 | +[project.optional-dependencies] |
| 39 | +dev = [ |
| 40 | + "ipykernel", |
| 41 | + "ipython", |
| 42 | + "jupyterlab", |
| 43 | +] |
| 44 | +docs = [ |
| 45 | + "pandas>=1.5.3,<3", |
| 46 | + "tensorflow>=2.11.1,<3", |
| 47 | + "matplotlib>=3.7.3,<4", |
| 48 | + "seaborn>=0.12.2,<1", |
| 49 | + "memory_profiler>=0.61.0,<1", |
| 50 | + "numpydoc>=1.5.0,<2", |
| 51 | + "sphinx>=8.0.2,<9", |
| 52 | + "sphinx-gallery>=0.13.0,<1", |
| 53 | + "sphinxcontrib-bibtex>=2.6.3,<3", |
| 54 | + "sphinx-copybutton>=0.5.2,<1", |
| 55 | + "pydata-sphinx-theme>=0.15.4,<1", |
| 56 | + "sphinx-design>=0.6.1,<1", |
| 57 | +] |
| 58 | +linters = [ |
| 59 | + "black==23.3.0", |
| 60 | + "ruff==0.4.8", |
| 61 | + "pre-commit", |
| 62 | +] |
| 63 | +optional = [ |
| 64 | + "tensorflow>=2.11.1,<3", |
| 65 | + "keras>=2.11.1,<4", |
| 66 | + "pandas>=1.4.4,<3", |
| 67 | +] |
| 68 | +tests = [ |
| 69 | + "pytest>=7.2.2,<9", |
| 70 | + "pytest-cov>=4.1.0,<6", |
| 71 | + "pytest-xdist>=3.5.0,<4", |
| 72 | +] |
| 73 | + |
| 74 | +[project.urls] |
| 75 | +Homepage = "https://imbalanced-learn.org/" |
| 76 | +Source = "https://github.com/scikit-learn-contrib/imbalanced-learn" |
| 77 | +Issues = "https://github.com/scikit-learn-contrib/imbalanced-learn/issues" |
| 78 | + |
| 79 | +[tool.setuptools] |
| 80 | +packages = ["imblearn"] |
| 81 | + |
| 82 | +[tool.pixi.project] |
| 83 | +channels = ["conda-forge"] |
| 84 | +platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"] |
| 85 | + |
| 86 | +[tool.pixi.dependencies] |
| 87 | +numpy = ">=1.23.5,<2" |
| 88 | +scipy = ">=1.9.3,<2" |
| 89 | +scikit-learn = ">=1.0.2,<2" |
| 90 | +joblib = ">=1.1.1,<2" |
| 91 | +threadpoolctl = ">=2.0.0,<4" |
| 92 | + |
| 93 | +[tool.pixi.feature.dev.dependencies] |
| 94 | +ipykernel = "*" |
| 95 | +ipython = "*" |
| 96 | +jupyterlab = "*" |
11 | 97 |
|
| 98 | +[tool.pixi.feature.docs.dependencies] |
| 99 | +matplotlib = ">=3.7.3,<4" |
| 100 | +seaborn = ">=0.12.2,<1" |
| 101 | +memory_profiler = ">=0.61.0,<1" |
| 102 | +numpydoc = ">=1.5.0,<2" |
| 103 | +sphinx = ">=8.0.2,<9" |
| 104 | +sphinx-gallery = ">=0.13.0,<1" |
| 105 | +sphinxcontrib-bibtex = ">=2.4.1,<3" |
| 106 | +sphinx-copybutton = ">=0.5.2,<1" |
| 107 | +pydata-sphinx-theme = ">=0.15.4,<1" |
| 108 | +sphinx-design = ">=0.6.1,<1" |
| 109 | + |
| 110 | +[tool.pixi.feature.linters.dependencies] |
| 111 | +black = "==23.3.0" |
| 112 | +ruff = "==0.4.8" |
| 113 | +pre-commit = "*" |
| 114 | + |
| 115 | +[tool.pixi.feature.optional.dependencies] |
| 116 | +keras = ">=2.9.1,<4" |
| 117 | +pandas = ">=1.4.4,<3" |
| 118 | + |
| 119 | +[tool.pixi.feature.tensorflow] |
| 120 | +platforms = ["linux-64", "osx-arm64", "osx-64"] |
| 121 | + |
| 122 | +[tool.pixi.feature.tensorflow.dependencies] |
| 123 | +tensorflow = ">=2.11.1,<3" |
| 124 | + |
| 125 | +[tool.pixi.feature.tests.dependencies] |
| 126 | +pytest = ">=7.2.2,<9" |
| 127 | +pytest-cov = ">=4.1.0,<6" |
| 128 | +pytest-xdist = ">=3.5.0,<4" |
| 129 | + |
| 130 | +[tool.pixi.pypi-dependencies] |
| 131 | +imbalanced-learn = { path = ".", editable = true } |
| 132 | + |
| 133 | +[tool.pixi.environments] |
| 134 | +linters = ["linters"] |
| 135 | +docs = ["optional", "docs", "tensorflow"] |
| 136 | +tests = ["optional", "tests", "tensorflow"] |
| 137 | +dev = ["dev", "optional", "docs", "linters", "tests", "tensorflow"] |
| 138 | + |
| 139 | +[tool.black] |
| 140 | +line-length = 88 |
| 141 | +target_version = ['py310', 'py311'] |
| 142 | +preview = true |
| 143 | +# Exclude irrelevant directories for formatting |
| 144 | +exclude = ''' |
| 145 | +/( |
| 146 | + \.eggs |
| 147 | + | \.git |
| 148 | + | \.mypy_cache |
| 149 | + | \.vscode |
| 150 | + | \.pytest_cache |
| 151 | + | \.idea |
| 152 | + | build |
| 153 | + | dist |
| 154 | +)/ |
| 155 | +''' |
| 156 | + |
| 157 | +[tool.ruff] |
12 | 158 | # max line length for black |
13 | 159 | line-length = 88 |
14 | | -target-version = "py38" |
| 160 | +target-version = "py310" |
| 161 | +exclude=[ |
| 162 | + ".git", |
| 163 | + "__pycache__", |
| 164 | + "dist", |
| 165 | + "doc/_build", |
| 166 | + "doc/auto_examples", |
| 167 | + "build", |
| 168 | +] |
15 | 169 |
|
| 170 | +[tool.ruff.lint] |
| 171 | +# all rules can be found here: https://beta.ruff.rs/docs/rules/ |
| 172 | +select = ["E", "F", "W", "I"] |
16 | 173 | ignore=[ |
17 | 174 | # space before : (needed for how black formats slicing) |
18 | 175 | "E203", |
19 | 176 | # do not assign a lambda expression, use a def |
20 | 177 | "E731", |
21 | 178 | # do not use variables named 'l', 'O', or 'I' |
22 | 179 | "E741", |
23 | | - # Import not on the top of the file |
24 | | - "E402", |
25 | 180 | ] |
| 181 | + |
| 182 | +[tool.ruff.lint.per-file-ignores] |
| 183 | +# It's fine not to put the import at the top of the file in the examples |
| 184 | +# folder. |
| 185 | +"examples/*"=["E402"] |
| 186 | +"doc/conf.py"=["E402"] |
| 187 | + |
| 188 | +[tool.pytest.ini_options] |
| 189 | +filterwarnings = [ |
| 190 | + # Turn deprecation warnings into errors |
| 191 | + "error::FutureWarning", |
| 192 | + "error::DeprecationWarning", |
| 193 | +] |
| 194 | +addopts = "--doctest-modules --color=yes -rs" |
| 195 | +doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS" |
0 commit comments