-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
117 lines (93 loc) · 3.8 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
[tool.pytest.ini_options]
minversion = "6.0"
# opts:
# `--strict-markers` - Raise error on unexpected pytest markers being used (add new markers to `markers` config)
# `-n2` - parallelise over two threads (uses pytest-xdist)
# `--nbmake --nbmake-kernel=tastail1` - test example notebooks using the "tastail1" notebook kernel (uses nbmake)
# `--cov --cov-report=xml --cov-config=pyproject.toml` - generate coverage report for tests (uses pytest-cov; call `--no-cov` in CLI to switch off; `--cov-config` include to avoid bug)
# `-m 'not high_mem'` - Do not run tests marked as consuming large amounts of memory (call `-m "high_mem"` in CLI to invert this; only `high_mem` marked tests will be run)
# `-p no:memray` - Do not use the memray memory profiling plugin (call `-p memray` in CLI to switch on memory profiling)
addopts = "-rav --strict-markers -n2 --nbmake --nbmake-kernel=tastail1 --cov --cov-report=xml --cov-config=pyproject.toml -m 'not high_mem' -p no:memray"
testpaths = ["tests", "examples"]
# to mark a test, decorate it with `@pytest.mark.[marker-name]`
markers = ["high_mem", "limit_memory"]
filterwarnings = [
# https://github.com/pytest-dev/pytest-xdist/issues/825
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning",
]
[tool.coverage.run]
branch = true
source = ["tastail1/"]
[tool.coverage.report]
fail_under = 89
[tool.coverage.html]
directory = "reports/coverage"
[tool.coverage.xml]
output = "reports/coverage/coverage.xml"
[tool.black]
line-length = 100
skip_magic_trailing_comma = true
[tool.ruff]
line-length = 100
select = ["E", "F", "I", "Q"]
ignore = [
"E501", # line too long: Black will handle this.
"D1", # Ignore missing docstrings in public functions/modules. There are just too many of them missing...
]
# Exclude a variety of commonly ignored directories.
exclude = [".*", "__pypackages__", "build", "dist", "venv", "reports/"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
# Ignore `E402` (import violations) and `F401` (unused imports) in all `__init__.py` files
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"*.ipynb" = ["E402"]
# Ignore `E402` for all notebooks
[tool.nbqa.addopts]
ruff = ["--extend-ignore=E402"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.setuptools.packages.find]
include = ["tastail1*"]
[tool.setuptools.package-data]
# Add file globs from the source code directory if they include non-py files that should be packaged
# E.g. "fixtures/**/*"
tastail1 = []
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
name = "tastail1"
authors = [
{ name = "Neil Montague", email = "[email protected]" },
]
maintainers = []
description = "Python Boilerplate contains all the boilerplate you need to create a Python package."
readme = "README.md"
requires-python = ">=3.8"
keywords = ["tastail1"]
license = { text = "MIT" }
dynamic = ["dependencies", "optional-dependencies"]
version = "0.1.0"
[tool.setuptools.dynamic]
dependencies = { file = ["requirements/base.txt"] }
[project.scripts]
tastail1="tastail1.cli:cli"
[tool.setuptools.dynamic.optional-dependencies]
dev = { file = ["requirements/dev.txt"] }
[project.urls]
repository = "https://github.com/arup-group/tastail1"
documentation = "https://arup-group.github.io/tastail1"
changelog = "https://github.com/arup-group/tastail1/blob/main/CHANGELOG.md"