forked from sunpy/sunpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
148 lines (120 loc) · 4.46 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
[build-system]
requires = [
"setuptools>=56,!=61.0.0",
"setuptools_scm[toml]>=6.2",
"wheel",
"oldest-supported-numpy",
"extension-helpers"
]
build-backend = 'setuptools.build_meta'
[tool.setuptools_scm]
write_to = "sunpy/_version.py"
# Until we have h5py binaries we can't test wheels on Python 3.11
[tool.cibuildwheel]
test-command = "pytest -p no:warnings --doctest-rst -m 'not mpl_image_compare' --pyargs sunpy"
test-extras = ["all,tests"]
[ tool.gilesbot ]
[ tool.gilesbot.circleci_artifacts ]
enabled = true
[ tool.gilesbot.circleci_artifacts.figure_report ]
url = ".tmp/py310-figure/figure_test_images/fig_comparison.html"
message = "Click details to see the figure test comparisons, for py310-figure."
report_on_fail = true
[ tool.gilesbot.circleci_artifacts.figure_report_devdeps ]
url = ".tmp/py310-figure-devdeps/figure_test_images/fig_comparison.html"
message = "Click details to see the figure test comparisons for py310-figure-devdeps."
report_on_fail = true
[ tool.gilesbot.pull_requests ]
enabled = true
[ tool.gilesbot.towncrier_changelog ]
enabled = true
verify_pr_number = true
changelog_skip_label = "No Changelog Entry Needed"
help_url = "https://github.com/sunpy/sunpy/blob/main/changelog/README.rst"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunpy/blob/main/changelog/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/sunpy/blob/main/changelog/README.rst)"
number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file."
[tool.towncrier]
package = "sunpy"
filename = "CHANGELOG.rst"
directory = "changelog/"
issue_format = "`#{issue} <https://github.com/sunpy/sunpy/pull/{issue}>`__"
title_format = "{version} ({project_date})"
[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "trivial"
name = "Internal Changes"
showcontent = true
[tool.ruff]
target-version = "py39"
line-length = 110
exclude=[
".git,",
"__pycache__",
"build",
"sunpy/extern/**",
"sunpy/version.py",
]
select = [
"E",
"F",
"W",
"UP",
"PT",
#"RET",
#"TID",
]
extend-ignore = [
# pycodestyle (E, W)
"E501", # LineTooLong # TODO! fix
# pytest (PT)
"PT001", # Always use pytest.fixture()
"PT004", # Fixtures which don't return anything should have leading _
"PT007", # Parametrize should be lists of tuples # TODO! fix
"PT011", # Too broad exception assert # TODO! fix
"PT023", # Always use () on pytest decorators
]
[tool.ruff.flake8-tidy-imports]
[tool.ruff.flake8-tidy-imports.banned-api]
"warnings.warn".msg = "Use sunpy specific warning helpers warn_* from sunpy.utils.exceptions"
[tool.ruff.per-file-ignores]
# Part of configuration, not a package.
"setup.py" = ["INP001"]
"conftest.py" = ["INP001"]
# implicit-namespace-package. The examples are not a package.
"docs/*.py" = ["INP001"]
"__init__.py" = ["E402", "F401", "F403"]
"test_*.py" = ["B011", "D", "E402", "PGH001", "S101"]
# Need to import clients to register them, but don't use them in file
"sunpy/net/__init__.py" = ["F811"]
# These files are allowed to use warnings.warn
"sunpy/util/exceptions.py" = ["TID251"]
"sunpy/util/tests/test_logger.py" = ["TID251"]
"sunpy/util/decorators.py" = ["TID251"]
# Notebook config for binder uses undefined variable
".jupyter/jupyter_notebook_config.py" = ["F821"]
[tool.ruff.pydocstyle]
convention = "numpy"