-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.cfg
175 lines (156 loc) · 7.95 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
# Copyright © 2021 California Institute of Technology ("Caltech").
# ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# • Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# • Redistributions must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
# • Neither the name of Caltech nor its operating division, the Jet Propulsion
# Laboratory, nor the names of its contributors may be used to endorse or
# promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
[metadata]
name = pds.deeparchive
version = file: src/pds2/aipgen/VERSION.txt
author = PDS
author_email = [email protected]
description = PDS Deep Archive software for generating OAIS AIPs and SIPs for PDS4 Archives
long_description = file: README.md
long_description_content_type = text/markdown
license = apache-2.0
keywords = PDS, CCSDS, OAIS, AIP, SIP, metadata, submission, archive, package
url = https://github.com/NASA-PDS/deep-archive
download_url = https://github.com/NASA-PDS/deep-archive/releases/
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Science/Research
License :: Other/Proprietary License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 3 :: Only
Topic :: Scientific/Engineering
[options]
install_requires =
setuptools
lxml == 4.9.0 # Must be 4.9.0 for Windows compatibility with prebuilt https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
zope.component ~= 5.0.1
zope.interface ~= 5.4.0
requests ~= 2.31.0
# It's a bummer we can't use the "pds" namespace and have to use "pds2".
# See https://github.com/NASA-PDS/pds-api-client/issues/7 for why.
# 2024-02-22: Actually since dumping pds.api-client for Python Requests,
# we could move back to "pds"!
namespace_packages = pds2
zip_safe = True
include_package_data = True
packages = find_namespace:
python_requires = >= 3.9
package_dir =
= src
[options.packages.find]
where = src
exclude = test
[options.package_data]
* = *.txt
[options.data_files]
# None
[options.entry_points]
console_scripts =
sipgen = pds2.aipgen.sip:main
aipgen = pds2.aipgen.aip:main
pds-deep-archive = pds2.aipgen.main:main
pds-deep-registry-archive = pds2.aipgen.registry:main
[options.extras_require]
dev =
docutils <= 0.16 # In 0.17 bullet lists aren't rendered at all with sphinx-rtd-theme
sphinx == 4.2.0 # Documentation generation
sphinx-rtd-theme == 0.5.0 # Documentation theme
sphinx-argparse == 0.2.5 # I don't think we even use this
mypy-zope == 1.0.5 # Type stubs for zope.interface
types-pkg_resources == 0.1.3 # Type stubs for package introspection API
lxml-stubs == 0.5.1 # Type stubs for lxml, duh
flake8 == 3.9.2 # Unquestioning adherence to coding stylees
flake8-bugbear == 21.9.1 # Ditto
flake8-docstrings == 1.6.0 # And check the docstrings too
pep8-naming == 0.12.1 # And even your function and variable names
mypy ~= 1.10.0 # Do your type annotations actually work?
pydocstyle == 6.1.1 # Do your docstrings look like everyone else's?
coverage == 5.5 # Does all your code get exercised?
pytest == 6.2.5 # Testing
pytest-cov == 5.0.0 # pytest + coverage = pytest-cov
pytest-watch == 4.2.0 # Automatic testing every time you save a file
pytest-xdist == 2.4.0 # You got multiple cores, right?
pre-commit == 2.15.0 # Auto-run checks on every commit
tox ~= 4.11.0 # A way to automate and standardize testing in Python
types-requests ~= 2.31.0.20240218
# 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 = 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%.
#
# E503 ignores line breaks before binary operators because the opposite advice is soon to become the best
# practice; see https://www.flake8rules.com/rules/W503.html
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
# Differences from pds-python-template-repo:
#
# - Tox support removed. See https://tox.readthedocs.io/en/latest/example/pytest.html#known-issues-and-limitations
# for details, but tox cannot run `pytest`. Note that `pytest` is supported, but the Roundup Action will run
# `python setup.py test` if it cannot find `tox` at current moment.
# - While Tox support may be gone, you can still run these by hand:
# - `mypy src`
# - `flake8 src`
# - Or even `pytest`
# - Black support removed. Black goes too far and reformats the test data (symlink in src/pds2/aipgen/tests)
# which causes the tests to fail because the purpose fo the Deep Achive is to generate message digests of
# PDS labels and associated files. If you reformat the test data, the hashes are useless. While Black could
# exclude XML files (`exclude_types: [xml]`), there's no way to exclude `.tab` and `.TAB` files as well.
# Note that Black was run on the Python source files once to make them the characterless and pathos-free
# format preferred by PDS. Black: thanks, I hate it.
# - Pre-commit hooks adjusted accordingly.