1+ # ======================================================================================
2+ # Project metadata
3+ # ======================================================================================
4+ [project ]
5+ name = " tranquilo"
6+ description = " Trust-region optimizer for scalar, least-square and noisy problems."
7+ requires-python = " >=3.10"
8+ dependencies = [
9+ " joblib" ,
10+ " numba" ,
11+ " numpy>=1.17.0" ,
12+ " pandas" ,
13+ " scipy>=1.2.1" ,
14+ ]
15+ dynamic = [" version" ]
16+ keywords = [
17+ " optimization" ,
18+ " dfo" ,
19+ " derivative free optimization" ,
20+ " noisy optimization" ,
21+ " parallel optimization" ,
22+ " numerical optimization" ,
23+ " trust region" ,
24+ ]
25+ classifiers = [
26+ " Development Status :: 3 - Alpha" ,
27+ " Intended Audience :: Science/Research" ,
28+ " License :: OSI Approved :: MIT License" ,
29+ " Operating System :: MacOS :: MacOS X" ,
30+ " Operating System :: Microsoft :: Windows" ,
31+ " Operating System :: POSIX" ,
32+ " Programming Language :: Python :: 3" ,
33+ " Programming Language :: Python :: 3.10" ,
34+ " Programming Language :: Python :: 3.11" ,
35+ " Programming Language :: Python :: 3.12" ,
36+ " Programming Language :: Python :: 3.13" ,
37+ " Topic :: Scientific/Engineering" ,
38+ ]
39+ authors = [
40+ { name = " Janos Gabler" , email = " janos.gabler@gmail.com" },
41+ ]
42+ maintainers = [
43+ { name = " Janos Gabler" , email = " janos.gabler@gmail.com" },
44+ { name = " Tim Mensinger" , email = " mensingertim@gmail.com" },
45+ ]
46+
47+ [project .readme ]
48+ file = " README.md"
49+ content-type = " text/markdown"
50+
51+ [project .license ]
52+ text = " MIT"
53+
54+ [project .urls ]
55+ Repository = " https://github.com/OpenSourceEconomics/tranquilo"
56+ Github = " https://github.com/OpenSourceEconomics/tranquilo"
57+ Tracker = " https://github.com/OpenSourceEconomics/tranquilo/issues"
58+
59+ [project .optional-dependencies ]
60+ plotly = [" plotly" ]
61+
62+
63+ # ======================================================================================
64+ # Build system configuration
65+ # ======================================================================================
166[build-system ]
2- requires = [" setuptools>=45" , " wheel" , " setuptools_scm[toml]>=6.0" ]
3- build-backend = " setuptools.build_meta"
67+ requires = [" hatchling" , " hatch_vcs" ]
68+ build-backend = " hatchling.build"
69+
70+ [tool .hatch .build .hooks .vcs ]
71+ version-file = " src/tranquilo/_version.py"
72+
73+ [tool .hatch .build .targets .sdist ]
74+ exclude = [" tests" ]
75+ only-packages = true
476
77+ [tool .hatch .build .targets .wheel ]
78+ only-include = [" src" ]
79+ sources = [" src" ]
580
6- [tool .setuptools_scm ]
7- write_to = " src/tranquilo/_version.py "
81+ [tool .hatch . version ]
82+ source = " vcs "
883
84+ [tool .hatch .metadata ]
85+ allow-direct-references = true
986
87+
88+ # ======================================================================================
89+ # Ruff configuration
90+ # ======================================================================================
1091[tool .ruff ]
11- target-version = " py37 "
92+ target-version = " py310 "
1293fix = true
1394
95+ [tool .ruff .lint ]
1496select = [
15- # pyflakes
16- " F" ,
17- # pycodestyle
18- " E" ,
19- " W" ,
20- # flake8-2020
21- " YTT" ,
22- # flake8-bugbear
23- " B" ,
24- # flake8-quotes
25- " Q" ,
26- # pylint
27- " PLE" , " PLR" , " PLW" ,
28- # misc lints
29- " PIE" ,
30- # tidy imports
31- " TID" ,
32- # implicit string concatenation
33- " ISC" ,
97+ # isort
98+ " I" ,
99+ # pyflakes
100+ " F" ,
101+ # pycodestyle
102+ " E" ,
103+ " W" ,
104+ # flake8-2020
105+ " YTT" ,
106+ # flake8-bugbear
107+ " B" ,
108+ # flake8-quotes
109+ " Q" ,
110+ # pylint
111+ " PLE" ,
112+ " PLR" ,
113+ " PLW" ,
114+ # misc lints
115+ " PIE" ,
116+ # tidy imports
117+ " TID" ,
118+ # implicit string concatenation
119+ " ISC" ,
34120]
35121
36122extend-ignore = [
37-
38- # allow module import not at top of file, important for notebooks
39- " E402" ,
40- # do not assign a lambda expression, use a def
41- " E731" ,
42- # Too many arguments to function call
43- " PLR0913" ,
44- # Too many returns
45- " PLR0911" ,
46- # Too many branches
47- " PLR0912" ,
48- # Too many statements
49- " PLR0915" ,
50- # Magic number
51- " PLR2004" ,
52- # Consider `elif` instead of `else` then `if` to remove indentation level
53- " PLR5501" ,
54- # For calls to warnings.warn(): No explicit `stacklevel` keyword argument found
55- " B028" ,
123+ # allow module import not at top of file, important for notebooks
124+ " E402" ,
125+ # do not assign a lambda expression, use a def
126+ " E731" ,
127+ # Too many arguments to function call
128+ " PLR0913" ,
129+ # Too many returns
130+ " PLR0911" ,
131+ # Too many branches
132+ " PLR0912" ,
133+ # Too many statements
134+ " PLR0915" ,
135+ # Magic number
136+ " PLR2004" ,
137+ # Consider `elif` instead of `else` then `if` to remove indentation level
138+ " PLR5501" ,
139+ # For calls to warnings.warn(): No explicit `stacklevel` keyword argument found
140+ " B028" ,
141+ # Incompatible with formatting
142+ " ISC001" ,
56143]
57144
58- [tool .ruff .per-file-ignores ]
145+ [tool .ruff .lint . per-file-ignores ]
59146"docs/source/conf.py" = [" E501" , " ERA001" , " DTZ005" ]
60147"docs/source/*" = [" B018" ]
61148
62- [tool .ruff .pydocstyle ]
149+ [tool .ruff .lint . pydocstyle ]
63150convention = " google"
64151
65- [tool .nbqa .config ]
66- black = " pyproject.toml"
67-
68- [tool .nbqa .mutate ]
69- black = 1
70152
153+ # ======================================================================================
154+ # Pytest configuration
155+ # ======================================================================================
71156[tool .pytest .ini_options ]
72157filterwarnings = [
73- " ignore:delta_grad == 0.0" , # UserWarning in test_poisedness.py
74- " ignore:Jupyter is migrating" , # DeprecationWarning from jupyter client
158+ " ignore:delta_grad == 0.0" ,
159+ " ignore:Jupyter is migrating" ,
75160 " ignore:Noisy scalar functions are experimental" ,
161+ " ignore:Parallelization together with" ,
76162]
77163markers = [
78164 " wip: Tests that are work-in-progress." ,
@@ -81,6 +167,15 @@ markers = [
81167norecursedirs = [" docs" , " .envs" ]
82168
83169
170+ # ======================================================================================
171+ # Misc configuration
172+ # ======================================================================================
173+ [tool .nbqa .config ]
174+ black = " pyproject.toml"
175+
176+ [tool .nbqa .mutate ]
177+ black = 1
178+
84179[tool .yamlfix ]
85180line_length = 88
86181sequence_style = " block_style"
0 commit comments