-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
216 lines (181 loc) · 7.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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# Defines the build system used for the project. For pure-python projects, uses the hatchling build system, which is
# used internally by scikit-build for our C-extension projects. Therefore, there is clear continuity between our
# c-extension and pure-python projects.
[build-system]
requires = ["hatchling>=1,<2"]
build-backend = "hatchling.build"
# Project metdata section. Provides the general ID information about the project.
[project]
name = "ataraxis-data-structures"
version = "2.0.1"
description = "Provides classes and structures for storing, manipulating, and sharing data between Python processes."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
authors = [
{ name = "Ivan Kondratyev", email = "ik278@cornell.edu" },
{ name = "Edwin Chen", email = "ec769@cornell.edu" },
]
maintainers = [
{ name = "Ivan Kondratyev", email = "ik278@cornell.edu" },
]
keywords = ['data structures', 'data manipulation', 'nested dictionary', 'shared memory', 'ataraxis']
classifiers = [
# Development status
"Development Status :: 5 - Production/Stable",
# Intended audience and project topic
"Intended Audience :: Developers",
"Topic :: Multimedia :: Video",
# License
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
# Supported Python Versions
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
# Supported OS systems
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X"
]
# Runtime project dependencies. This overlaps with 'condarun' optional list.
dependencies = [
"numpy>=2,<3",
"ataraxis-base-utilities>=3,<4",
"ataraxis-time>=3,<4",
"dacite>=1,<2",
"pyyaml>=6,<7",
]
[project.urls]
Homepage = "https://github.com/Sun-Lab-NBB/ataraxis-data-structures"
Documentation = "https://ataraxis-data-structures-api-docs.netlify.app/"
# Specifies additional dependencies that can be installed alongside the main library. Also, this is the section that
# stores conda, condarun, and noconda lists that facilitate setting up dependencies via conda where possible.
[project.optional-dependencies]
# Runtime dependencies known to be installable with conda for all development platforms
# (OSX ARM64, WIN AMD64, LIN AMD64). This specification is used by ataraxis-automation to resolve as many
# project dependencies with conda over pip as possible.
condarun = [
"numpy>=2,<3",
"dacite>=1,<2",
"pyyaml>=6,<7",
]
# Dependencies known to be installable with conda for all development platforms (OSX ARM64, WIN AMD64, LIN AMD64).
conda = [
# Testing
"pytest>=8,<9",
"pytest-cov>=6,<7",
"pytest-xdist>=3,<4",
# Coverage Reports
"coverage[toml]>=7,<8",
"junitparser>=3,<4",
# Documentation
"sphinx>=8,<9",
"importlib_metadata>=8,<9",
"sphinx-rtd-theme>=3,<4",
"sphinx-click>=6,<7",
"sphinx-autodoc-typehints>=2,<3",
# Linting and Stub-generation
"mypy>=1,<2",
"ruff>=0,<1",
# Types
"types-pyyaml>=6,<7",
# Building
"hatchling>=1,<2",
# Distribution
"twine>=5,<6",
"grayskull>=2,<3",
# Miscellaneous helpers
"black>=24,<25",
]
# Dependencies known to not be installable with conda for at least one supported development platform
# (OSX ARM64, WIN AMD64, LIN AMD64).
noconda =[
# Tox
"tox>=4,<5",
"tox-uv>=1,<2",
"uv>=0,<1",
# Building
"build>=1,<2",
# Automation
"ataraxis-automation>=4,<5",
]
# A shorthand specification that installs tox and all packages required for development tasks. This specification can
# be used by developers to quickly install all necessary components for working on this project. Has to be installed
# from pip.
dev = [
"ataraxis-data-structures[conda]",
"ataraxis-data-structures[noconda]"
]
# In the future, callable scripts can be added here
[project.scripts]
# Specifies files that should not be included in the source-code distribution, but are also not part of gitignore.
[tool.hatch.build.targets.sdist]
exclude = [".github", "recipe"]
# Specifies the library structure.
[tool.hatch.build.targets.wheel]
packages = ["src/ataraxis_data_structures"]
# Ruff Configuration.
[tool.ruff]
line-length = 120 # Maximum column length is set to 120 for this project.
indent-width = 4 # Same as black, indents are 4 spaces
target-version = "py311" # Targets the lowest supported version of python
src = ["src"] # The name of the source directory
# Excludes 'service' .py files, such as the sphinx configuration file from linting.
extend-exclude = ["conf.py"]
# Checks for all potential violations and uses the exclusions below to target-disable specific ones.
lint.select = ["ALL"]
# General ignore directives
lint.ignore = [
"COM812", # Conflicts with the formatter
"ISC001", # Conflicts with the formatter
"PT001", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT023", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"D107", # Project-specific, __init__ is documented inside the main class docstring where applicable
"D205", # Bugs out for file descriptions
"PLW0603", # While global statement usage is not ideal, it greatly streamlines certain development patterns
]
# Additional formatting configurations
[tool.ruff.format]
quote-style = "double" # Uses double quotes for strings
indent-style = "space" # Uses space for indents
skip-magic-trailing-comma = false # Like black, ignores trailing commas
line-ending = "auto" # Automatically detects and standardizes line ending character
# Docstrings and comments' line length
[tool.ruff.lint.pycodestyle]
max-doc-length = 120 # Maximum documentation line length, the same as code
# Docstrings style
[tool.ruff.lint.pydocstyle]
convention = "google"
# Additional, file-specific 'ignore' directives
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F401", # Imported but unused
"F403", # Wildcard imports
]
[tool.ruff.lint.isort]
case-sensitive = true # Takes case into account when sorting imports
combine-as-imports = true # Combines multiple "as" imports for the same package
force-wrap-aliases = true # Wraps "as" imports so that each uses a separate line (after combining for package)
force-sort-within-sections = true # Forces "as" and "from" imports for the same package to be close
length-sort = true # Places shorter imports first
# MyPy configuration section.
[tool.mypy]
disallow_untyped_defs = true # Enforces function annotation
warn_unused_ignores = true # Warns against using 'type: ignore' for packages that have type stubs available.
exclude = [
"ataraxis-data-structures-\\d+", # Ignores temporary folder created by setuptools when building the sdist
"venv.*/", # Ignores virtual environments
"build/", # Ignores the sdist directory
"dist/", # Ignores the wheel directory
"docs/", # Ignores the sphinx / doxygen directory
"stubs/", # Ignores stubs directory (stubgen output target)
"recipe/", # Ignores recipe directory (grayskull output target)
"tests/", # Ignores the test directory.
]
# This is used by the 'test' tox tasks to aggregate coverage data produced during pytest runtimes.
[tool.coverage.paths]
# Maps coverage measured in site-packages to source files in src
source = ["src/", ".tox/*/lib/python*/site-packages/"]
# Same as above, specifies the output directory for the coverage .html report
[tool.coverage.html]
directory = "reports/coverage_html"