-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
114 lines (92 loc) · 2.56 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
# Set up the build system
[build-system]
# Use latest setuotools, setuptools_scm for git versioning and
# numpy (numpy includes are needed for compilation of C extensions)
requires = ["setuptools>=64", "setuptools_scm>=8", "numpy>=1.23"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
# Make a version file at build time
version_file = "src/h5forest/_version.py"
[project]
dynamic = ["version"]
name = "h5forest"
description = "A tool to view HDF5 file structures in the terminal."
authors = [{name = "Will Roper", email = "[email protected]"}]
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.6"
dependencies = [
"h5py",
"numpy",
"prompt_toolkit",
"matplotlib",
]
# Add special dependencies for development
[project.optional-dependencies]
dev = ["ruff", ]
[project.urls]
"Homepage" = "https://github.com/WillJRoper/h5forest"
"Repository" = "https://github.com/WillJRoper/h5forest"
[project.scripts]
h5forest = "h5forest.h5_forest:main"
# Configure the linter and formatter
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
".DS_Store",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"*__init__.py" # ignore all init files
]
# PEP-8 line length
line-length = 79
indent-width = 4
# Assume Python 3.8 by default regardless
target-version = "py38"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and pycodestyle (`E`) codes by default.
select = ["F", "E", "W"]
ignore = [
"E402", # "module level import not at top of file" (isolate C imports in case python alternatives exist)
"F811", # "redefinition of unused name from line N" (breaks quantity objects)
]
# Sort imports alphabetically
extend-select = ["I"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"