-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
128 lines (112 loc) · 3.48 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
[tool.poetry]
name = "scythe-extractors"
version = "0.1.1"
description = "A library of tools that generate summaries of the data contained in scientific data files"
authors = ["Materials Data Facility <materialsdatafacility@uchicago.edu>"]
license = "Apache"
readme = "README.md"
repository = "https://github.com/materials-data-facility/scythe"
packages = [
{ include = "scythe" },
]
[tool.poetry.dependencies]
python = ">=3.8.0,<3.11"
mdf-toolbox = "^0.5.3"
stevedore = "^3.5.0"
pandas = "^1.4.2"
llvmlite = "^0.38.0"
numba = "^0.55"
ase = { version = "~3.19", optional = true }
pymatgen = { version = "^2022.3.24", optional = true }
tableschema = { version = "^1,<2", optional = true }
dfttopif = { version = "^1.1.0", optional = true }
hyperspy = { version = "^1.4.1", optional = true }
python-magic = { version = "^0.4.15", optional = true }
Pillow = { version = "^9.0.1", optional = true }
xmltodict = { version = "^0.12.0", optional = true }
pycalphad = { version = "^0.10.0", optional = true }
[tool.poetry.dev-dependencies]
flake8 = "^3.9.2" # pinned due to incompatibility with flake8 v4 and sphinx
pytest = "^7.1.1"
coveralls = "^3.3.1"
pytest-cov = "^3.0.0"
tox = "^3.25.0"
Sphinx = "^4.5.0"
sphinx-rtd-theme = "^1.0.0"
diff-cover = "^6.4.5"
[tool.poetry.extras]
ase = ['ase']
crystal_structure = ['pymatgen', 'ase']
csv = ['tableschema']
dft = ['dfttopif']
electron_microscopy = ['hyperspy']
file = ['python-magic']
image = ['Pillow']
tdb = ['pycalphad']
xml = ['xmltodict']
# to make it easy to add all extras, maintain the list below as the sum
# of all the dependencies above
all = ['ase',
'pymatgen',
'tableschema',
'dfttopif',
'hyperspy',
'python-magic',
'Pillow',
'xmltodict',
'pycalphad']
[tool.poetry.plugins]
[tool.poetry.plugins."scythe.extractor"]
"ase" = "scythe.ase:ASEExtractor"
"crystal" = "scythe.crystal_structure:CrystalStructureExtractor"
"csv" = "scythe.csv:CSVExtractor"
"dft" = "scythe.dft:DFTExtractor"
"em" = "scythe.electron_microscopy:ElectronMicroscopyExtractor"
"filename" = "scythe.filename:FilenameExtractor"
"generic" = "scythe.file:GenericFileExtractor"
"image" = "scythe.image:ImageExtractor"
"json" = "scythe.json:JSONExtractor"
"noop" = "scythe.testing:NOOPExtractor"
"tdb" = "scythe.tdb:TDBExtractor"
"xml" = "scythe.xml:XMLExtractor"
"yaml" = "scythe.yaml:YAMLExtractor"
[tool.poetry.plugins."scythe.adapter"]
"noop" = "scythe.adapters.base:NOOPAdapter"
"serialize" = "scythe.adapters.base:SerializeAdapter"
"greedy_serialize" = "scythe.adapters.base:GreedySerializeAdapter"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = "--ignore=.venv --ignore=.tox --cov=scythe --cov-report html --cov-report term-missing --cov-report=xml"
testpaths = ['tests']
[tool.coverage.run]
omit = [".tox/*"]
dynamic_context = "test_function"
[tool.coverage.report]
show_missing = true
[tool.coverage.html]
directory = "coverage_html"
show_contexts = true
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = py3{8,9,10}
[testenv]
passenv = *
whitelist_externals = poetry
commands =
poetry install -E all
poetry run flake8
poetry run pytest
poetry run diff-cover coverage.xml --compare-branch=origin/master
[testenv:docs]
passenv = *
envlist = py310
description = invoke sphinx-build to build the HTML docs
commands =
poetry install -E all
poetry run flake8
poetry run python -m sphinx.cmd.build ./docs/source ./docs/_build -n -E -a -j auto -b html
"""