forked from feder-observatory/stellarphot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
197 lines (182 loc) · 5.75 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "stellarphot"
dynamic = ["version"]
description = "A package for performing stellar photometry."
readme = "README.md"
license = { text = "BSD-3-Clause" }
requires-python = ">=3.10"
authors = [
{ name = "Matt Craig", email = "[email protected]" },
]
dependencies = [
"astropy >=5",
"astroquery",
"astrowidgets",
"bottleneck",
"camel-converter",
"ccdproc",
"ginga",
"ipyautoui >=0.7.19",
"ipyfilechooser",
"ipywidgets",
"jupyter-app-launcher",
"matplotlib",
"papermill",
"pandas",
"photutils >=1.9",
"pydantic >=2",
"pyyaml",
"platformdirs",
]
[project.optional-dependencies]
docs = [
"sphinx",
"sphinx-astropy[confv2]",
"graphviz",
]
exo_fitting = [
"batman-package",
]
test = [
"black",
"pre-commit",
"pytest-astropy",
"ruff",
"tox",
]
[project.urls]
Homepage = "https://github.com/stellarphot/stellarphot"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "stellarphot/_version.py"
[tool.hatch.build.targets.sdist]
# This section determines what files are included in the source distribution
include = [
# The source code
"/stellarphot",
# Logo for JupyterLab launcher
"/docs/_static/stellarphot-logo.svg",
# Configuration for jupyter-app-launcher
"/.jp_app_launcher_stellarphot.yaml"
]
[tool.hatch.build.targets.wheel.shared-data]
# This section determines what data files are included in the wheel
# and where they should eventually be installed in the user's environment.
"docs/_static/stellarphot-logo.svg" = "share/jupyter/stellarphot/stellarphot-logo.svg"
# This includes the notebooks used in the launcher
"stellarphot/notebooks" = "share/jupyter/stellarphot"
".jp_app_launcher_stellarphot.yaml" = "share/jupyter/jupyter_app_launcher/jp_app_launcher_stellarphot.yaml"
[tool.coverage]
[tool.coverage.run]
source = ["stellarphot"]
omit = [
"stellarphot/_astropy_init*",
"stellarphot/conftest*",
"stellarphot/setup_package*",
"stellarphot/tests/*",
"stellarphot/**/tests/*",
"stellarphot/*version*",
"stellarphot/**/__init__.py"
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about packages we have installed
"except ImportError",
# Don't complain if tests don't hit assertions
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about connection errors
"raise requests.ConnectionError",
# Don't complain about script hooks
"def main(.*):",
# Ignore branches that don't pertain to this version of Python
"pragma: py{ignore_python_version}",
]
[tool.black]
line-length = 88
target-version = ['py310', 'py311']
include = '\.pyi?$|\.ipynb$'
# 'extend-exclude' excludes files or directories in addition to the defaults
# extend-exclude = '''
# # A regex preceded with ^/ will apply only to files and directories
# # in the root of the project.
# (
# ^/docs
# )
# '''
[tool.ruff]
# ruff 0.6.0 started automatically linting notebooks. We are not ready for that yet.
extend-exclude = ["*.ipynb"]
[tool.ruff.lint]
select = [
"E", # E and W are the checks done by pycodestyle
"W",
"F", # pyflakes checks
"ARG", # flake8-unused-arguments
"UP", # language updates
"NPY", # check for numpy deprecations
"I", # isort checks
"B", # flake8-bugbear
]
[tool.ruff.lint.per-file-ignores]
# Ignore `E402` and `F403` (import violations) in all `__init__.py` files.
"__init__.py" = ["E402", "F403"]
# Ignore F405 (variable may be from star imports) in docs/conf.py
"docs/conf.py" = ["F405"]
[tool.codespell]
skip = '*.svg'
ignore-words = "ignore-words.txt"
[tool.pytest.ini_options]
minversion = 7.0
testpaths = [
"stellarphot",
"docs",
]
norecursedirs = [
"docs[\\/]_build",
"docs[\\/]generated",
]
astropy_header = true
doctest_plus = "enabled"
text_file_format = "rst"
remote_data_strict = true
addopts = [
"-ra",
"--color=yes",
"--doctest-rst",
"--strict-config",
"--strict-markers",
]
log_cli_level = "info"
xfail_strict = true
filterwarnings = [
"error",
# Apparently bqplot is using deprecated traitlets APIs
'ignore:\s+Sentinel is not a public part of the traitlets API:DeprecationWarning',
# ginga is using something from asdf that has been deprecated
'ignore:AsdfInFits has been deprecated:DeprecationWarning',
# ipyautoui generates this warning...
'ignore:metadata \{.+\} was set from the constructor:DeprecationWarning',
# Generated from batman
'ignore:Conversion of an array with ndim > 0 to a scalar:DeprecationWarning',
# ipywidgets or ipyautoui generates this warning...
'ignore:Passing unrecognized arguments to super:DeprecationWarning',
# pandas will require pyarrow at some point, which is good to know, I guess...
'ignore:[.\n]*Pyarrow will become a required dependency of pandas[.\n]*:DeprecationWarning',
# ipyautoui is generating this on import because they still have some pydantic changes to make
'ignore:Using extra keyword arguments on `Field` is deprecated:',
# ipywidgets is using something deprecated in traitlets
'ignore:Deprecated in traitlets 4.1, use the instance:DeprecationWarning',
# Some WCS headers are issuing warnings
'ignore:RADECSYS=:',
# papermill is using deprecated jupyter paths
'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning',
# papermill is also using a deprecated method of getting current time
'ignore:.*is deprecated and scheduled for removal.*:DeprecationWarning'
]