-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
125 lines (102 loc) · 3.05 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
[project]
name = "eq-devtools"
description = "A CLI app to facilitate common development tasks."
license.file = "LICENSE"
readme = "README.md"
dynamic = [
"dependencies",
"optional-dependencies",
"version",
]
requires-python = ">=3.11"
[project.scripts]
devtool = "eq.devtools.cli:cli"
[project.urls]
"repository" = "https://github.com/energy-quants/eq-devtools"
[build-system]
requires = [
"hatchling",
"hatch-requirements-txt",
"hatch-vcs",
]
build-backend = "hatchling.build"
[tool.hatch.version]
# https://github.com/ofek/hatch-vcs
source = "vcs"
[tool.hatch.version.raw-options]
version_scheme = "post-release"
[tool.hatch.build]
# https://hatch.pypa.io/latest/config/build/
include = ["/src"]
hooks.vcs.version-file = "src/eq/devtools/_version.py"
hooks.vcs.template = "__version__ = {version!r}"
targets.wheel.strict-naming = false
targets.wheel.packages = ["/src/eq"]
targets.sdist.strict-naming = false
targets.sdist.packages = ["/src/eq"]
[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.d/pypi/run.txt"]
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
dev = ["requirements.d/pypi/dev.txt"]
docs = ["requirements.d/pypi/docs.txt"]
host = ["requirements.d/pypi/host.txt"]
test = ["requirements.d/pypi/test.txt"]
[tool.pytest.ini_options]
# https://docs.pytest.org/en/7.1.x/reference/reference.html#ini-options-ref
minversion = "7.3"
testpaths = ["tests"]
addopts = "-lv --tb=short --color=yes --code-highlight=yes --import-mode=importlib --doctest-modules --doctest-continue-on-failure --html=.build/conda/test/html/test-report.html --self-contained-html --junit-xml=.build/conda/test/test-results.xml --cov=src/eq/devtools --cov-report=html:.build/conda/test/html/cov --cov-report=xml:.build/conda/test/coverage.xml"
junit_family = "xunit2"
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
[tool.black]
line-length = 88
target-version = ["py311"]
[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/options.html
profile = "black"
line_length = 88
force_grid_wrap = 2
multi_line_output=3
include_trailing_comma = true
lines_before_imports = 0
lines_after_imports = 2
force_alphabetical_sort_within_sections = true
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER",
]
default_section = "THIRDPARTY"
known_first_party = ["eq.devtools"]
[tool.ruff]
line-length = 88
[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
select = [
"E", # pycodestyle
"F", # pyflakes
# "I", # can't yet match isort config
]
[tool.ruff.format]
# https://docs.astral.sh/ruff/formatter/#configuration
preview = true
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.per-file-ignores]
"__init__.py" = [
"F401", # https://www.flake8rules.com/rules/F401.html
]
[tool.ruff.isort]
combine-as-imports = false
order-by-type = false
lines-after-imports = 2
split-on-trailing-comma = true
known-first-party = ["eq.devtools"]