-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
125 lines (112 loc) · 3.42 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
[tool.poetry]
name = "supernnova"
version = "0.0.0-dev" # Just a place holder; package version is managed by the dynamic-versioning plugin & git tags
description = "framework for Bayesian, Neural Network based supernova light-curve classification"
authors = [ "Anais Moller <[email protected]>","Thibault de Boissiere" ]
license = "MIT-expat"
readme = "README.md"
packages = [
{ include = "supernnova", from = "python" },
{ include = "cli"}
]
homepage = "https://github.com/supernnova/SuperNNova"
documentation = "https://supernnova.readthedocs.io/en/latest/"
[tool.poetry.dependencies]
python = " >=3.11, <3.13" # Update versions in workflows if you change this
click = "^8.1.3"
Sphinx = { version = "^6.1.3", optional = true }
sphinx-rtd-theme = { version = "1.2.0", optional = true }
myst-parser = { version = "^1.0.0", optional = true }
pre-commit = { version = "^3.0.4", optional = true }
pytest = { version = "^7.0", optional = true }
pytest-cov = { version = "^4.1.0", optional = true }
pytest-mock = { version = "^3.11.1", optional = true }
black = { version = ">=22.10,<25.0", optional = true }
ruff = { version = "^0.0.243", optional = true}
mypy = { version = "^1.1.1", optional = true }
sphinx-copybutton = { version = "^0.5.1", optional = true }
line-profiler = { version = "^4.1.2", optional = true }
memory-profiler = { version = "^0.61.0", optional = true }
poetry = "^1.6.1"
# torch = "2.0.0" # See here: https://github.com/pytorch/pytorch/issues/104259
# torchvision = "0.15.1"
h5py = "^3.10.0"
pandas = "1.5.1"
natsort = "^8.4.0"
tqdm = "^4.66.1"
astropy = "^5.3.4"
scikit-learn = "^1.3.2"
seaborn = "^0.13.0"
tabulate = "^0.9.0"
colorama = "^0.4.6"
mlflow = "^2.10.2"
[tool.poetry.extras]
docs = [
"Sphinx",
"sphinx-rtd-theme",
"myst-parser",
"sphinx-copybutton",
]
dev = ["pre-commit",
"pytest",
"pytest-cov",
"mypy",
"black",
"ruff",
"line-profiler",
"memory-profiler",
]
[tool.poetry.scripts]
snn = "cli.run:main"
[tool.pytest.ini_options]
addopts = "--cov"
pythonpath = "./python" # relative to root directory
# Uncomment and edit the following line to add custom markers to your tests
# These can be run with the following (for example):
#
# $ pytest -m marker_name
#
#markers = [ "marker_name: A short description of the marker" ]
# This configures the Poetry plugin which enables dynamic versioning via the repo tags
# Note the changes that are also needed to the [build-system] config below.
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
[tool.mypy]
ignore_missing_imports = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/python"
[tool.coverage.paths]
source = ["python"]
[tool.coverage.run]
branch = true
source = ["python"]
omit = ["python/supernnova/tests/*"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:"
]
[tool.ruff]
line-length = 88 # to match Black
select = [
"E",
"F",
"W",
]
ignore = [
"E501", # line length violations (let Black handle this)
]
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402"]
[tool.ruff.pydocstyle]
convention = "numpy"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"