-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathpyproject.toml
184 lines (150 loc) · 5.52 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
# ======================================================================================
# Project metadata
# ======================================================================================
[project]
name = "template_project"
description = "Template for reproducible research projects in economics"
requires-python = ">=3.11"
dynamic = ["version"]
keywords = [
"Reproducible Research",
"Economics",
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
]
authors = [
{ name = "JANE DOE", email = "[email protected]" },
]
maintainers = [
{ name = "JANE DOE", email = "[email protected]" },
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
text = "MIT"
[project.urls]
Changelog = "https://github.com/OpenSourceEconomics/econ-project-templates"
Documentation = "https://github.com/OpenSourceEconomics/econ-project-templates"
Github = "https://github.com/OpenSourceEconomics/econ-project-templates"
Tracker = "https://github.com/OpenSourceEconomics/econ-project-templates/issues"
# ======================================================================================
# Build system configuration
# ======================================================================================
[build-system]
requires = ["hatchling", "hatch_vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.vcs]
version-file = "src/template_project/_version.py"
[tool.hatch.build.targets.sdist]
exclude = ["tests"]
only-packages = true
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
# ======================================================================================
# Pixi configuration
# ======================================================================================
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
[tool.pixi.dependencies]
python = "~=3.13"
jupyterlab = "*"
pre-commit = "*"
pytask = ">=0.5.0"
pytask-latex = ">=0.4.2"
pytask-parallel = ">=0.5.0"
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
statsmodels = "*"
numpy = "*"
pandas = ">=2.2"
plotly = ">=5.2.0,<6"
[tool.pixi.pypi-dependencies]
template_project = {path = ".", editable = true}
pdbp = "*"
[tool.pixi.target.unix.pypi-dependencies]
kaleido = "*"
[tool.pixi.target.win-64.pypi-dependencies]
kaleido = "==0.1.0.post1"
[tool.pixi.feature.docs.dependencies]
furo = "*"
myst-parser = "*"
nbsphinx = "*"
pydata-sphinx-theme = ">=0.3.0"
sphinx = "*"
sphinx-autoapi = "*"
sphinx-click = "*"
sphinx-copybutton = "*"
sphinx-panels = "*"
sphinxcontrib-bibtex = "*"
standard-imghdr = "*"
[tool.pixi.feature.docs.tasks]
# The 'build-docs' command can be used to build the docs locally or on ReadTheDocs. The
# env variable READTHEDOCS_OUTPUT is set by ReadTheDocs. If it is not set, the default
# value is used, which is what we want for local builds.
build-docs = { cmd = "sphinx-build -T -b html -d $READTHEDOCS_OUTPUT/doctrees -D language=en . $READTHEDOCS_OUTPUT/html", cwd = "docs_template/source" , env = {READTHEDOCS_OUTPUT = "../build"}}
# The 'check-docs-urls' command is only run locally and on the CI. It checks all URLs in
# the documentation for validity.
check-docs-urls = { cmd = "sphinx-build -T -b linkcheck -d ../build/doctrees -D language=en . ../build/linkcheck", cwd = "docs_template/source" }
[tool.pixi.environments]
docs = {features = ["docs"], solve-group = "default"}
# ======================================================================================
# Pytask configuration
# ======================================================================================
[tool.pytask.ini_options]
paths = ["./src/template_project", "./documents"]
pdbcls = "pdbp:Pdb"
# ======================================================================================
# Ruff configuration
# ======================================================================================
[tool.ruff]
target-version = "py312"
fix = true
[tool.ruff.lint]
select = ["ALL"]
extend-ignore = [
"ANN", # Missing type annotations
"COM812", # Conflict with ruff-format
"D10", # Missing docstrings
"ISC001", # Conflict with ruff-format
"PD901", # df is a great name with functional data management
"PLR0913", # Too many arguments in function definition
"RET504", # Don't force to calculate upon return
"S101", # Use of `assert` detected.
"S301", # pickle module is unsafe
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "PD011"]
"task_*.py" = ["ANN", "ARG001"]
[tool.ruff.lint.pydocstyle]
convention = "google"
# ======================================================================================
# Miscellaneous tools configuration
# ======================================================================================
[tool.pytest.ini_options]
addopts = "--pdbcls=pdbp:Pdb"
filterwarnings = []
markers = [
"wip: Tests that are work-in-progress.",
"unit: Flag for unit tests which target mainly a single function.",
"integration: Flag for integration tests which may comprise of multiple unit tests.",
"end_to_end: Flag for tests that cover the whole program.",
]
norecursedirs = ["docs"]
[tool.yamlfix]
line_length = 88
none_representation = "null"