forked from arup-group/genet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
116 lines (92 loc) · 3.62 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
[tool.pytest.ini_options]
minversion = "6.0"
# opts:
# `--strict-markers` - Raise error on unexpected pytest markers being used (add new markers to `markers` config)
# `-nauto` - parallelise over all available threads (uses pytest-xdist). If using `--pdb`, tests will be run without parallelisation.
# `--nbmake --nbmake-kernel=genet` - test example notebooks using the "genet" 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)
addopts = "-rav --strict-markers -nauto --nbmake --nbmake-kernel=genet --cov --cov-report=xml --cov-config=pyproject.toml"
testpaths = ["tests", "examples"]
# to mark a test, decorate it with `@pytest.mark.MARKER-NAME`
# then add MARKER-NAME to the markers list.
markers = []
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 = ["genet/"]
[tool.coverage.report]
fail_under = 94
[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...
"F811" # TODO: reintroduce once fixtures are fixed.
]
# 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 = ["genet*"]
[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/**/*"
genet = ["configs/**/*"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
classifiers = [
"Development Status :: 3 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
name = "cml-genet"
authors = [
{ name = "Kasia Kozlowska", email = "[email protected]" },
]
maintainers = []
description = "GeNet provides tools to represent and work with a multi-modal transport network with public transport (PT) services"
readme = "README.md"
requires-python = ">=3.9"
keywords = ["genet"]
license = { text = "MIT" }
dynamic = ["dependencies", "optional-dependencies", "version"]
[tool.setuptools.dynamic]
dependencies = { file = ["requirements/base.txt"] }
version = { attr = "genet.__version__" }
[project.scripts]
genet = "genet.cli:cli"
[tool.setuptools.dynamic.optional-dependencies]
dev = { file = ["requirements/dev.txt"] }
[project.urls]
repository = "https://github.com/arup-group/genet"
changelog = "https://github.com/arup-group/genet/blob/main/CHANGELOG.md"