-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (117 loc) · 4.43 KB
/
pyproject.toml
File metadata and controls
140 lines (117 loc) · 4.43 KB
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
# =====================================================================
# === Build backend & settings
# =====================================================================
[build-system]
requires = ["setuptools>=68", "wheel"] # or "hatchling", "flit_core", etc.
build-backend = "setuptools.build_meta"
# =====================================================================
# === Project metadata (PEP 621)
# =====================================================================
[project]
name = "timeout_test" # < will be replaced by scaffold script
version = "0.1.0"
description = "Short, one-line summary."
authors = [{ name = "markur4", email = "you@example.com" }]
readme = "README.md"
license = "MIT"
requires-python = ">=3.12"
dependencies = [
# === Install from PyPI ===================================
"openai"
# === Install from Github =================================
# "neddata @ git+https://github.com/HisQu/neddata.git",
# === Install as editable =================================
# "haiu" # < Specify below under [tool.uv.sources] and [tool.pyright] !
]
# == This Allows refactoring across repo boundaries
# !! Comment out before packaging !!
# [tool.uv.sources]
# haiu = { path = "../haiu", editable = true }
# [tool.pyright]
# include = ["src", "../haiu/src"]
# extraPaths = ["src", "../haiu/src"]
# =====================================================================
# === Extra Dependencies
# =====================================================================
[dependency-groups]
### pip install -e .[dev]
dev = [
# === Install from PyPI ===================================
# --- Interactive development -------
"jupyterlab", # < Brings notebook, widgets, ipykernel, etc.
# "ipywidgets", # < e.g. For loading bars. Broken at this point?
"jupytext", # < Jupyter Notebook export
# --- Testing ----------------------
"pytest>=8.2",
# "pytest-xdist", # < Multi-core testing
# "pytest-cov", # < Code-Coverage
# --- Linting / formatting ---------
# "black>=25.1",
# "ruff>=0.4",
# "mypy>=1.10",
# --- Plotting -----------------------
# "matplotlib",
# "seaborn",
# "plotastic",
# "scipy",
# --- IO -----------------------------
"dill", # < Extended pickle for complex objects
# "sacred", # < Experiment management
]
# =====================================================================
# === Packaging
# =====================================================================
# === Define import paths to packages =======
# !! Best practice: ONE import package with same name as project!
[tool.setuptools]
package-dir = { "" = "src"}
# > Autodiscovery:
[tool.setuptools.packages.find]
where = ["src"] # < Scan only src/ for packages
# namespaces = false # < Implicit namespace packages ok
# === Include non-py files *inside* the package =======
[tool.setuptools.package-data]
"*" = [
"data/**/*.xlsx", # src/timeout_test/data/
"images/**/*.{png,jpg}", # src/timeout_test/images/
]
# === Include data *outside* the package (e.g. top-level docs/) ====
# > Installs into <sys.prefix>/share/timeout_test
# !! Requires a MANIFEST.in!
# TODO: Find solution to get rid of MANIFEST.in (hatchling..?)
# [tool.setuptools.data-files]
# "share/timeout_test/experiments" = ["experiments/*.ipynb"]
# "share/timeout_test/examples" = ["examples/*.ipynb"]
# "share/timeout_test/config" = ["config/*.ini"]
# =====================================================================
# === Terminal entry points
# =====================================================================
# [project.scripts]
# timeout_test = "timeout_test.cli:main" # !! No template yet for cli.py
# =====================================================================
# === Tool configurations
# =====================================================================
# Black code-formatter defaults
[tool.black]
line-length = 88
target-version = ["py312"]
exclude = '''
/(
\.venv
| venv
| \.direnv
| build
| dist
)/
'''
# Ruff (linter) – keep rules in sync with Black
[tool.ruff]
line-length = 88
unsafe-fixes = true
# Pytest configration (This replaces `pytest.ini`)
[tool.pytest.ini_options]
# addopts = "-ra -q" # < run tests quietly, show only errors and warnings
testpaths = ["tests"]
# ===========================
# End of file
# ===========================