-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
146 lines (135 loc) · 3.4 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
[tool.poetry]
name = "ampel-panstarrs"
version = "0.10.0a0"
license = "BSD-3-Clause"
readme = "README.md"
description = "Pan-STARRS query units for the Ampel system"
homepage = "https://ampelproject.github.io"
repository = "https://github.com/AmpelAstro/Ampel-PanSTARRS"
authors = [
"Valery Brinnel",
"Jakob van Santen <jakob.van.santen@desy.de>",
"Jakob Nordin",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Information Analysis",
"Typing :: Typed",
]
packages = [
{include = "ampel"}
]
include = [
'conf/*/*.json',
'conf/*/*/*.json',
'conf/*/*.yaml',
'conf/*/*/*.yaml',
'conf/*/*.yml',
'conf/*/*/*.yml',
]
[tool.poetry.dependencies]
python = "^3.10"
ampel-plot = {version = "^0.9.0a2", source = "pypi"}
ampel-interface = {version = ">=0.10.4a0,<0.11"}
ampel-photometry = {version = ">=0.10.1a0,<0.11"}
# pymage never made it to pypi; distribute our own package
pymage = {version = "^0.5", source = "desy-gitlab"}
[tool.poetry.group.dev.dependencies]
mypy = "^1.6.1"
# pytest = "^8.0.2"
# pytest-mock = "^3.12.0"
# types-requests = "^2.25.9"
# types-pytz = "^2022.1.2"
# types-pillow = "^10.2.0.20240213"
[[tool.poetry.source]]
name = "desy-gitlab"
url = "https://gitlab.desy.de/api/v4/projects/jakob.van.santen%2Fampel-pypi-demo/packages/pypi/simple"
priority = "supplemental"
[build-system]
requires = ["poetry-core>=1.0.0", "setuptools>=40.8.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
namespace_packages = true
show_error_codes = true
check_untyped_defs = true
[[tool.mypy.overrides]]
module = [
"numpy.*",
"scipy.*",
"pymongo.*",
"bson.*",
"matplotlib.*",
"pandas.*",
"seaborn.*",
"astropy.*",
"ampel.model.PlotProperties",
"ampel.plot.utils",
"dl.*",
"lcdata.*",
"timeout_decorator.*",
"parsnip.*",
"sncosmo.*",
"requests_toolbelt.*",
"adjustText.*",
"extcats.*",
"voeventparse.*",
"healpy.*",
"light_curve.*",
"xgboost.*",
"ligo.*",
"ztfquery.*",
"joblib.*",
"confluent_kafka.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "--cov=ampel --showlocals -ra"
filterwarnings = [
"error",
"always:numpy.ndarray size changed:RuntimeWarning",
"ignore:Deprecated call to `pkg_resources.declare_namespace\\('ligo'\\):DeprecationWarning",
"ignore:pkg_resources is deprecated:DeprecationWarning",
"ignore:(?s).*Pyarrow will become a required dependency of pandas:DeprecationWarning",
]
[tool.black]
line-length = 88
[tool.ruff]
target-version = "py310"
exclude = [
"ampel/contrib/hu/xgb_trees.py",
"notebooks",
"scripts",
"setup.py",
]
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"E4",
"E7",
"E9",
"F",
"I",
"UP", # pyupgrade
"B", # bugbear
"DTZ", # datetimez
"T20", # print statements
# "PT", # pytest-style
"RET", # return
"SLF",
"SIM",
# "ARG", # sometimes your arguments have to conform to an interface
# "ERA", # seems to prohibit all comments, that's bad
"PL",
"PERF",
"RUF",
]
ignore = [
"E741", # ambiguous variable name
"UP009", # UTF-8 encoding declaration is unnecessary
"PLR09", # too many (arguments|branches)
"PLR2004", # Magic value used in comparison
"RUF012", # fine for AmpelUnit, actually (ruff has a special case for pydantic)
"RUF023", # unsorted __slots__ are fine
]