-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
122 lines (108 loc) · 2.22 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
# build-system
[build-system]
requires = [
"setuptools>=61",
"setuptools-scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
# Project
[project]
name = "pgm"
description = "Python package for probabilistic network analysis."
version = "1.0"
requires-python = ">=3.10"
dependencies = [
"argparse",
"jupyter",
"matplotlib",
"networkx",
"numpy",
"pandas",
"pyyaml",
"pytest",
"scikit-learn",
"scipy",
"sparse",
"seaborn"
]
[project.optional-dependencies]
dev = [
"autopep8",
"coverage",
"coverage2clover",
"isort",
"jupyter",
"matplotlib",
"mypy",
"myst_nb",
"nbconvert",
"piccolo_theme",
"pylint",
"sphinxcontrib.napoleon",
"tox",
"unittest-xml-reporting"
]
# CLI
[project.scripts]
run_model = "pgm.main:main"
# Setuptools
[tool.setuptools]
packages = ["pgm"]
[tool.setuptools.package-data]
pgm = ["data/input", "data/model"]
[tool.setuptools.dynamic.readme]
file = "README.md"
# Autopep8
[tool.autopep8]
max_line_length = 100
aggressive = 3
# isort
[tool.isort]
profile = "google"
force_single_line = false
multi_line_output = 4
line_length = 100
src_paths = ["pgm"]
# Pylint
[tool.pylint.MASTER]
disable = ["attribute-defined-outside-init"]
load-plugins = "pylint.extensions.docparams"
extension-pkg-whitelist = "numpy"
[tool.pylint.FORMAT]
max-line-length = 100
[tool.pylint.MESSAGES_CONTROL]
disable = ["C", # convention
]
# Coverage
[tool.coverage.run]
branch = true
source = ["pgm"]
omit = ["pgm/version.py", "tests"]
[tool.coverage.report]
show_missing = true
skip_empty = true
# MyPy
[tool.mypy]
ignore_missing_imports = true
## sktensor needs numpy 1.22.0 but then python 3.11 gives errors; we can upgrade to 3.11 when sktensor is removed
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py310, docs
[testenv]
description =
run unit tests
extras =
dev
commands =
python -m xmlrunner
[testenv:docs]
basepython = python3.10
commands =
sphinx-build -d "{envtmpdir}{/}doctree" doc/source/ "{toxworkdir}{/}docs_out" --color -b html
python -c 'print(r"documentation available under file://{toxworkdir}{/}docs_out{/}index.html")'
[testenv:type]
deps = mypy
skip_install = true
commands = mypy --install-types pgm
"""