forked from NASA-PDS/template-repo-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
215 lines (187 loc) · 6.52 KB
/
setup.cfg
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# Packaging Information
# =====================
#
# This is the Planetary Data System's template for packaging information of
# Python packages. After making a copy of the template repository, go through
# this file *carefully* and fill in sections, change settings, etc., as
# needed for your particular project. Look for the ``TODO`` indicators as
# well as the comments sprinkled throughout, and replace obvious strings
# like ``your_pckage_name`` and ``A short description…``.
#
#
# Metadata
# --------
#
# Fill in your package metadata here in order to give "window shoppers"
# information about the package, whether they can use it and should use
# it, and how to get it.
[metadata]
name = your_package_name
author = PDS
author_email = [email protected]
description = A short description, about 100-120 characters, suitable for search summaries
long_description = file: README.md
long_description_content_type = text/markdown
version = file: src/pds/your_package_name/VERSION.txt
license = apache-2.0
keywords = pds, planetary data, various, other, keywords
url = https://github.com/NASA-PDS/<TODO: complete URL>
download_url = https://github.com/NASA-PDS/<TODO: complete URL>/releases/
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
# Options
# -------
#
# The options here describe the morphology of the package, such as the
# packages it depends on, namespaces, and so forth.
[options]
#install_requires =
# Put your requirements here
# Change this to False if you use things like __file__ or __path__—which you
# shouldn't use anyway, because that's what ``pkg_resources`` is for 🙂
zip_safe = True
include_package_data = True
namespace_packages = pds
# base directory for code is in src/. Don't change this.
package_dir =
= src
packages = find_namespace:
python_requires = >= 3.9
[options.extras_require]
dev =
black~=23.7.0
flake8~=6.1.0
flake8-bugbear~=23.7.10
flake8-docstrings~=1.7.0
pep8-naming~=0.13.3
mypy~=1.5.1
pydocstyle~=6.3.0
coverage~=7.3.0
pytest~=7.4.0
pytest-cov~=4.1.0
pytest-watch~=4.2.0
pytest-xdist~=3.3.1
pre-commit~=3.3.3
sphinx~=3.2.1
sphinx-rtd-theme~=0.5.0
tox~=4.11.0
types-setuptools~=68.1.0.0
Jinja2<3.1
[options.entry_points]
# Put your entry point scripts here
#console_scripts =
# some_script: ...
[options.packages.find]
# Don't change this. Needed to find packages under src/
where = src
# Coverage Testing
# ----------------
#
# The ``coverage`` tool helps ensure that all parts of your code is actually
# used. The settings here tell what files we can skip. Feel free to adjust
# this.
#
# See https://coverage.readthedocs.io/ for more.
[coverage:run]
omit = */_version.py,*/__init__.py
# Test Options
# ------------
#
# Generic unit, functional, integration, acceptance, etc., testing goes here.
# Right now it's blank.
[test]
# (Blank for now.)
# Pytest
# ------
#
# Pytest is the modern way to run all sorts of tests in code. It works with
# the ``unittest`` module in the Python Standard Library and also offers its
# own shortcuts to simplifying writing and running tests.
#
# See https://docs.pytest.org/ for more information.
[tool:pytest]
addopts = -n auto --cov=pds
# Installation Options
# --------------------
#
# Any custom options needed to install this package go here. Right now it's
# blank.
[install]
# (Blank for now.)
# Flake8
# ------
#
# Flake8 (pronounced "flay-kate") is a Python style guide tool. It checks your
# code against a library of "best practices" for writing Python and lets you
# know when things aren't quite the "best". There are numerous options below
# and you can read more about the tool at https://flake8.pycqa.org/
[flake8]
max-line-length = 120
extend-exclude = versioneer.py,_version.py,docs,tests,setup.py
docstring_convention = google
# Ignoring:
# E203 prevents flake8 from complaining about whitespace around slice
# components. Black formats per PEP8 and flake8 doesn't like some of
# this.
#
# E501 prevents flake8 from complaining line lengths > 79. We will use
# flake8-bugbear's B950 to handle line length lint errors. This trips
# when a line is > max-line-length + 10%.
#
# W503 is ignored for not just because it makes use of
# left-aligned binary operators in multi-line expressions, but because the
# opposite advice is now the recommended practice; see
# • https://rhodesmill.org/brandon/slides/2012-11-pyconca/#laying-down-the-law
# • https://github.com/PyCQA/pycodestyle/pull/502
# • https://www.flake8rules.com/rules/W503.html
# • ET Tufte, _Seeing with Fresh Eyes: Meaning, Space, Data, Truth_, Graphics
# Press 2020, p.14.
extend-ignore = E203, E501, W503
# Selects following test categories:
# D: Docstring errors and warnings
# E, W: PEP8 errors and warnings
# F: PyFlakes codes
# N: PEP8 Naming plugin codes
# B: flake8-bugbear codes
# B***: Specific flake8-bugbear opinionated warnings to trigger
# B902: Invalid first argument used for method. Use self for instance
# methods, and cls for class methods
# B903: Use collections.namedtuple (or typing.NamedTuple) for data classes
# that only set attributes in an __init__ method, and do nothing else.
# B950: Line too long. This is a pragmatic equivalent of pycodestyle's
# E501: it considers "max-line-length" but only triggers when the value
# has been exceeded by more than 10%.
select = D,E,F,N,W,B,B902,B903,B950
# mypy
# ----
#
# ``mypy`` checks your use of type annotations in modern Python code, similar
# to compile-time type checking in statically typed languages. This helps
# detect errors early instead of at run-time where they're much harder to
# debug.
#
# For more information about ``mypy``, see: https://mypy.readthedocs.io/
[mypy]
# The generic ``mypy`` settings are blank for now, but there are more specific
# options below. Note that the section syntax for ``mypy`` includes
# glob-style wildcards to match file patterns.
[mypy-pds.*._version]
# We don't care about issues in versioneer's files
ignore_errors = True
# Versioneer
# ----------
#
# Versioneer handles automatically determining the version number of your
# Python package by examining ``git`` tags and history.
#
# See https://github.com/python-versioneer/python-versioneer for more.
[versioneer]
VCS = git
style = pep440
tag_prefix = v
versionfile_source = src/pds/my_pds_module/_version.py
versionfile_build = pds/my_pds_module/_version.py
parentdir_prefix = pds.my_pds_module-