bartz 0.4.1__tar.gz → 0.6.0__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.
@@ -1,22 +1,20 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: bartz
3
- Version: 0.4.1
3
+ Version: 0.6.0
4
4
  Summary: Super-fast BART (Bayesian Additive Regression Trees) in Python
5
- License: MIT
6
5
  Author: Giacomo Petrillo
7
- Author-email: info@giacomopetrillo.com
6
+ Author-email: Giacomo Petrillo <info@giacomopetrillo.com>
7
+ License-Expression: MIT
8
+ Requires-Dist: equinox>=0.12.2
9
+ Requires-Dist: jax>=0.4.35
10
+ Requires-Dist: jaxlib>=0.4.35
11
+ Requires-Dist: jaxtyping>=0.3.2
12
+ Requires-Dist: numpy>=1.25.2
13
+ Requires-Dist: scipy>=1.11.4
8
14
  Requires-Python: >=3.10
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Requires-Dist: jax (>=0.4.35,<1)
16
- Requires-Dist: jaxlib (>=0.4.35,<1)
17
- Requires-Dist: numpy (>=1.25.2,<3)
18
- Requires-Dist: scipy (>=1.11.4,<2)
19
- Project-URL: Bug Tracker, https://github.com/Gattocrucco/bartz/issues
15
+ Project-URL: Documentation, https://gattocrucco.github.io/bartz/docs-dev
16
+ Project-URL: Homepage, https://github.com/Gattocrucco/bartz
17
+ Project-URL: Issues, https://github.com/Gattocrucco/bartz/issues
20
18
  Description-Content-Type: text/markdown
21
19
 
22
20
  [![PyPI](https://img.shields.io/pypi/v/bartz)](https://pypi.org/project/bartz/)
@@ -42,6 +40,7 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
42
40
  - [Documentation (development version)](https://gattocrucco.github.io/bartz/docs-dev)
43
41
  - [Repository](https://github.com/Gattocrucco/bartz)
44
42
  - [Code coverage](https://gattocrucco.github.io/bartz/coverage)
43
+ - [Benchmarks](https://gattocrucco.github.io/bartz/benchmarks)
45
44
  - [List of BART packages](https://gattocrucco.github.io/bartz/docs-dev/pkglist.html)
46
45
 
47
46
  ## Citing bartz
@@ -49,4 +48,3 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
49
48
  Article: Petrillo (2024), "Very fast Bayesian Additive Regression Trees on GPU", [arXiv:2410.23244](https://arxiv.org/abs/2410.23244).
50
49
 
51
50
  To cite the software directly, including the specific version, use [zenodo](https://doi.org/10.5281/zenodo.13931477).
52
-
@@ -21,6 +21,7 @@ On CPU, bartz runs at the speed of dbarts (the fastest implementation I know of)
21
21
  - [Documentation (development version)](https://gattocrucco.github.io/bartz/docs-dev)
22
22
  - [Repository](https://github.com/Gattocrucco/bartz)
23
23
  - [Code coverage](https://gattocrucco.github.io/bartz/coverage)
24
+ - [Benchmarks](https://gattocrucco.github.io/bartz/benchmarks)
24
25
  - [List of BART packages](https://gattocrucco.github.io/bartz/docs-dev/pkglist.html)
25
26
 
26
27
  ## Citing bartz
@@ -23,12 +23,12 @@
23
23
  # SOFTWARE.
24
24
 
25
25
  [build-system]
26
- requires = ["poetry-core>=2.0.0,<3.0.0"]
27
- build-backend = "poetry.core.masonry.api"
26
+ requires = ["uv_build>=0.7.3,<0.8.0"]
27
+ build-backend = "uv_build"
28
28
 
29
29
  [project]
30
30
  name = "bartz"
31
- version = "0.4.1"
31
+ version = "0.6.0"
32
32
  description = "Super-fast BART (Bayesian Additive Regression Trees) in Python"
33
33
  authors = [
34
34
  {name = "Giacomo Petrillo", email = "info@giacomopetrillo.com"},
@@ -36,42 +36,49 @@ authors = [
36
36
  license = "MIT"
37
37
  readme = "README.md"
38
38
  requires-python = ">=3.10"
39
- repository = "https://github.com/Gattocrucco/bartz"
40
- packages = [
41
- { include = "bartz", from = "src" },
42
- ]
43
39
  dependencies = [
44
- "jax >=0.4.35,<1",
45
- "jaxlib >=0.4.35,<1",
46
- "numpy >=1.25.2,<3",
47
- "scipy >=1.11.4,<2",
40
+ "equinox>=0.12.2",
41
+ "jax>=0.4.35",
42
+ "jaxlib>=0.4.35",
43
+ "jaxtyping>=0.3.2",
44
+ "numpy>=1.25.2",
45
+ "scipy>=1.11.4",
48
46
  ]
49
47
 
50
- [tool.poetry.urls]
51
- "Bug Tracker" = "https://github.com/Gattocrucco/bartz/issues"
52
-
53
- [tool.poetry.group.dev.dependencies]
54
- ipython = ">=8.22.2"
55
- matplotlib = "^3.8.3"
56
- appnope = "^0.1.4"
57
- tomli = "^2.0.1"
58
- packaging = "^24.0"
59
- xgboost = "^2.0.3"
60
- pre-commit = "^3.7.0"
61
- scikit-learn = "^1.4.2"
62
- matplotlib-label-lines = "^0.7.0"
63
- polars = {version = "^1.0.0", extras = ["pandas", "pyarrow"]}
64
-
65
- [tool.poetry.group.test.dependencies]
66
- coverage = "^7.4.3"
67
- pytest = "^8.1.1"
68
-
69
- [tool.poetry.group.docs.dependencies]
70
- Sphinx = ">=7.2.6,<9"
71
- numpydoc = "^1.6.0"
72
- myst-parser = "^4.0.1"
48
+ [project.urls]
49
+ Homepage = "https://github.com/Gattocrucco/bartz"
50
+ Documentation = "https://gattocrucco.github.io/bartz/docs-dev"
51
+ Issues = "https://github.com/Gattocrucco/bartz/issues"
52
+
53
+ [dependency-groups]
54
+ only-local = [
55
+ "appnope>=0.1.4",
56
+ "ipython>=8.36.0",
57
+ "matplotlib>=3.10.3",
58
+ "matplotlib-label-lines>=0.8.1",
59
+ "pre-commit>=4.2.0",
60
+ "pydoclint>=0.6.6",
61
+ "ruff>=0.11.9",
62
+ "scikit-learn>=1.6.1",
63
+ "tomli>=2.2.1",
64
+ "virtualenv>=20.31.2",
65
+ "xgboost>=3.0.0",
66
+ ]
67
+ ci = [
68
+ "asv>=0.6.4",
69
+ "coverage>=7.8.0",
70
+ "myst-parser>=4.0.1",
71
+ "numpydoc>=1.8.0",
72
+ "packaging>=25.0",
73
+ "polars[pandas,pyarrow]>=1.29.0",
74
+ "pytest>=8.3.5",
75
+ "pytest-timeout>=2.4.0",
76
+ "sphinx>=8.1.3",
77
+ "sphinx-autodoc-typehints>=3.0.1",
78
+ ]
73
79
 
74
80
  [tool.pytest.ini_options]
81
+ cache_dir = "config/pytest_cache"
75
82
  testpaths = ["tests"]
76
83
  filterwarnings = [
77
84
  'error:scatter inputs have incompatible types.*',
@@ -80,7 +87,10 @@ addopts = [
80
87
  "-r xXfE",
81
88
  "--pdbcls=IPython.terminal.debugger:TerminalPdb",
82
89
  "--durations=3",
90
+ "--verbose",
83
91
  ]
92
+ timeout = 64
93
+ timeout_method = "thread" # when jax hangs, signals do not work
84
94
 
85
95
  # I wanted to use `--import-mode=importlib`, but it breaks importing submodules,
86
96
  # in particular `from . import util`.
@@ -94,6 +104,7 @@ show_missing = true
94
104
 
95
105
  [tool.coverage.html]
96
106
  show_contexts = true
107
+ directory = "_site/coverage"
97
108
 
98
109
  [tool.coverage.paths]
99
110
  # the first path in each list must be the source directory in the machine that's
@@ -119,3 +130,56 @@ local = [
119
130
  '/opt/hostedtoolcache/Python/*/*/lib/python*/site-packages/bartz/',
120
131
  'C:\hostedtoolcache\windows\Python\*\*\Lib\site-packages\bartz\',
121
132
  ]
133
+
134
+ [tool.ruff]
135
+ exclude = [".asv", "*.ipynb"]
136
+ cache-dir = "config/ruff_cache"
137
+
138
+ [tool.ruff.format]
139
+ quote-style = "single"
140
+
141
+ [tool.ruff.lint]
142
+ select = [
143
+ "B", # bugbear: grab bag of additional stuff
144
+ "UP", # pyupgrade: fix some outdated idioms
145
+ "I", # isort: sort and reformat import statements
146
+ "F", # pyflakes
147
+ "D", # pydocstyle
148
+ "PT", # flake8-pytest-style
149
+ ]
150
+ ignore = [
151
+ "B028", # warn with stacklevel = 2
152
+ "D105", # Missing docstring in magic method
153
+ "F722", # Syntax error in forward annotation. I ignore this because jaxtyping uses strings for shapes instead of for deferred annotations.
154
+ "F821", # Undefined name. I ignore this because strings in jaxtyping.
155
+ "UP037", # Remove quotes from type annotation. Ignore because jaxtyping.
156
+ ]
157
+
158
+ [tool.ruff.lint.per-file-ignores]
159
+ "{config/*,benchmarks/*,docs/*,src/bartz/debug.py,tests/rbartpackages/*,tests/__init__.py}" = [
160
+ "D100", # Missing docstring in public module
161
+ "D101", # Missing docstring in public class
162
+ "D102", # Missing docstring in public method
163
+ "D103", # Missing docstring in public function
164
+ "D104", # Missing docstring in public package
165
+ ]
166
+
167
+ [tool.ruff.lint.pydocstyle]
168
+ convention = "numpy"
169
+ ignore-decorators = ["functools.cached_property"]
170
+
171
+ [tool.pydoclint]
172
+ baseline = "config/pydoclint-baseline.txt"
173
+ auto-regenerate-baseline = true
174
+ arg-type-hints-in-signature = true
175
+ arg-type-hints-in-docstring = false
176
+ check-return-types = false
177
+ check-yield-types = false
178
+ treat-property-methods-as-class-attributes = true
179
+ check-style-mismatch = true
180
+ show-filenames-in-every-violation-message = true
181
+ check-class-attributes = false
182
+
183
+ [tool.uv]
184
+ python-downloads = "never"
185
+ python-preference = "only-system"
Binary file