-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
169 lines (142 loc) · 4.16 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[tool.poetry]
name = "nexusLIMS"
version = "1.4.3"
description = "The NIST Electron Microscopy Nexus LIMS project"
authors = ["Joshua Taillon <joshua.taillon@nist.gov>"]
maintainers = ["Joshua Taillon <joshua.taillon@nist.gov>"]
readme = "README.md"
repository = "https://github.com/usnistgov/NexusLIMS.git"
documentation = "http://pages.nist.gov/NexusLIMS"
license = "NIST Public License"
# necessary if we want to have a package name with capitals... see
# https://github.com/python-poetry/poetry/issues/1538#issuecomment-555753130
packages = [
{include = "nexusLIMS"}
]
[tool.poetry.dependencies]
python = ">=3.8.1,<3.11"
lxml = "^4.9.2"
requests = "^2.28.1"
requests_ntlm = "^1.1.0"
pytz = "^2022.7"
hyperspy = "1.7.3"
scikit-learn = "^1.2.0"
python-dotenv = "^0.21.0"
defusedxml = "^0.7.1"
[tool.poetry.dev-dependencies]
pytest = "^7.2"
coverage = "^7.0.0"
pytest-mpl = "^0.16.1"
pytest-cov = "^4.0.0"
Sphinx = "^4.3.1"
sphinx-bootstrap-theme = "^0.8.0"
tox = "^4.0"
[tool.poetry.scripts]
[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
isort = "^5.12.0"
pylint = "^2.16.4"
ruff = "^0.0.259"
sphinxcontrib-towncrier = "^0.3.2a0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
src_paths = ["nexusLIMS", "tests"]
[tool.pylint.format]
max-line-length = "88"
good-names = ["f", "i", "j", "k", "v", "s"]
ignore-long-lines = "^\\s*(# |\\.\\. _.*: |``/feed)(<?https?://\\S+>|\\S+)?$"
[tool.pylint.Main]
extension-pkg-allow-list = ["lxml"]
[tool.pylint.MASTER]
init-hook="from pylint.config import find_default_config_files; import os, sys; sys.path.append(os.path.dirname(next(find_default_config_files())))"
ignore="dev_scripts"
[tool.pylint."MESSAGES CONTROL"]
disable = "locally-disabled"
[tool.ruff]
select = [
"F", "E", "W", "I", "N", "D", "YTT", "UP", "S", "FBT", "B", "A", "COM", "C4",
"DTZ", "T10", "EM", "EXE", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI",
"PT", "Q", "RSE", "RET", "SLF", "SIM", "TID", "TCH", "ARG", "PTH", "ERA", "PL",
"TRY", "RUF"
]
ignore = ["N999", "UP006", "UP007", "UP035", "B905", "RUF007"]
[tool.ruff.per-file-ignores]
"tests/*" = ["S"]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.towncrier]
directory = "docs/changes"
package = "nexusLIMS"
package_dir = "nexusLIMS"
title_format = "v{version} ({project_date})"
filename = "docs/development_log.rst"
issue_format = "`#{issue} <https://gitlab.nist.gov/gitlab/nexuslims/NexusMicroscopyLIMS/-/issues/{issue}>`_"
[[tool.towncrier.type]]
directory = "feature"
name = "New features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "enhancement"
name = "Enhancements"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentation improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous/Development changes"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and/or Removals"
showcontent = true
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist =
lint
py{38, 39, 310}
[testenv]
passenv = *
allowlist_externals = poetry
commands =
poetry install
poetry run pytest tests/ --cov=nexusLIMS --cov=tests \
--cov-config=tests/.coveragerc \
--cov-report html:tests/coverage \
--cov-report term-missing \
--junitxml=tests/test_report.xml \
--mpl --mpl-baseline-path=tests/files/figs
[testenv:gen_mpl_baseline]
passenv = *
description = use pytest-mpl to generate baseline figures for comparison
commands =
poetry install
poetry run pytest tests/test_extractors.py \
-k TestThumbnailGenerator \
--mpl-generate-path=tests/files/figs
[testenv:docs]
passenv = *
description = invoke sphinx-build to build the HTML docs
commands =
poetry install
poetry run python -m sphinx.cmd.build ./docs ./_build -n -E -a -j auto -b html
[testenv:lint]
passenv = *
description = run liniting scripts
commands =
poetry install
poetry run isort . --check-only
poetry run black --check .
poetry run ruff check nexusLIMS tests
poetry run pylint nexusLIMS tests
"""