/
default.nix
74 lines (62 loc) · 1.7 KB
/
default.nix
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
{ buildPythonPackage, lib, pytest, matplotlib, fractopo, pytest-regressions
, hypothesis, poetry-core, sphinxHook, pandoc, sphinx-autodoc-typehints
, sphinx-rtd-theme, sphinx-gallery, nbsphinx, notebook, ipython, coverage
, filter, pandera, json5
}:
buildPythonPackage {
pname = "tracerepo";
version = "0.0.1";
src = filter {
root = ./.;
# If no include is passed, it will include all the paths.
include = [
# Include the "src" path relative to the root.
"tracerepo"
"tests"
"README.rst"
"pyproject.toml"
"docs_src"
"examples"
# Include this specific path. The path must be under the root.
# ./package.json
# Include all files with the .js extension
# (filter.matchExt "js")
];
# Works like include, but the reverse.
# exclude = [ ./main.js ];
};
format = "pyproject";
nativeBuildInputs = [
# Uses poetry for install
poetry-core
# Documentation dependencies
sphinxHook
pandoc
sphinx-autodoc-typehints
sphinx-rtd-theme
sphinx-gallery
nbsphinx
matplotlib
notebook
ipython
];
sphinxRoot = "docs_src";
outputs = [ "out" "doc" ];
propagatedBuildInputs = [ fractopo pandera json5 ];
checkInputs = [ pytest pytest-regressions hypothesis coverage ];
checkPhase = ''
runHook preCheck
python -m coverage run --source tracerepo -m pytest
runHook postCheck
'';
postCheck = ''
python -m coverage report --fail-under 70
'';
pythonImportsCheck = [ "tracerepo" ];
meta = with lib; {
homepage = "https://github.com/nialov/tracerepo";
description = "Fracture Network analysis";
license = licenses.mit;
maintainers = [ maintainers.nialov ];
};
}