-
Notifications
You must be signed in to change notification settings - Fork 52
/
pyproject.toml
128 lines (103 loc) · 3.75 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
# ======================================================================================
# 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
# ======================================================================================
# 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"
[tool.codespell]
skip = "*.ipynb,inst/WORDLIST"