-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
157 lines (134 loc) · 5.48 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
[project]
# This is the name of your project. The first time you publish this
# package, this name will be registered for you. It will determine how
# users can install this project, e.g.:
#
# $ pip install sampleproject
#
# And where it will live on PyPI: https://pypi.org/project/sampleproject/
#
# There are some restrictions on what makes a valid project name
# specification here:
# https://packaging.python.org/specifications/core-metadata/#name
name = "reddit-topics-aggregator" # required
# Versions should comply with PEP 440:
# https://www.python.org/dev/peps/pep-0440/
#
# For a discussion on single-sourcing the version, see
# https://packaging.python.org/guides/single-sourcing-package-version/
version = "0.2.1" # required
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
# https://packaging.python.org/specifications/core-metadata/#summary
description = "Reddit Topics Aggregator is a tool that uses the Reddit API to gather information from different subreddits to create a summary of topics" # optional
# This is an optional longer description of your project that represents
# the body of text which users will see when they visit PyPI.
#
# Often, this is the same as your README, so you can just read it in from
# that file directly (as we have already done above)
#
# This field corresponds to the "Description" metadata field:
# https://packaging.python.org/specifications/core-metadata/#description-optional
readme = "README.md" # optional
# Specify which Python versions you support. In contrast to the
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
requires-python = ">=3.10"
# Name or names of the individual or organization which originally authored
# the project, and a valid email address corresponding to the name listed.
authors = [
{ name = "Dan Schaefer", email = "[email protected]" },
]
# Name or names of the individual or organization which currently maintains
# the project, and a valid email address corresponding to the name listed.
maintainers = [
{ name = "Dan Schaefer", email = "[email protected]" },
]
# This field lists other packages that your project depends on to run.
# Any package you put here will be installed by pip when your project is
# installed, so they must be valid existing projects.
#
# For an analysis of this field vs pip's requirements files see:
# https://packaging.python.org/discussions/install-requires-vs-requirements/
dependencies = ["click~=8.1.7", "praw"]
# List additional groups of dependencies here (e.g. development
# dependencies). Users will be able to install these using the "extras"
# syntax, for example:
#
# $ pip install reddit_topics_aggregator[dev]
#
# Similar to `dependencies` above, these must be valid existing
# projects.
[project.optional-dependencies]
dev = ["bump2version", "pip-audit", "radon", "ruff", "tox"]
docs = ["sphinx", "furo", "myst_parser", "sphinx-autobuild", "sphinx-click"]
test = ["pytest", "pytest-cov", "pytest.mock", "coverage[toml]"]
# The following would provide a command line executable which executes
# the function `reddit_topics_aggregator` from this package's cli module when invoked.
[project.scripts] # optional
reddit-topics-aggregator = "reddit_topics_aggregator.cli:reddit_topics_aggregator"
# This is configuration specific to the `setuptools` build backend.
# If you are using a different build backend, you will need to change this.
[tool.setuptools]
# If there are data files included in your packages that need to be
# installed, specify them here.
package-data = { "reddit_topics_aggregator" = ["*.dat"] }
[build-system]
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
command_line = "-m pytest --cov --cov-config=pyproject.toml --cov-branch --cov-report term-missing --cov-report html:build/coverage"
# debug = ["config"]
source_pkgs = ["reddit_topics_aggregator"]
[tool.coverage.report]
omit = ["**/setup.py", "**/__init__.py", "**/__main__.py"]
exclude_lines = ["if __name__ == .__main__."]
[tool.coverage.html]
directory = "build/coverage"
[tool.pytest.ini_options]
markers = [
"wip: marks tests as work in progress (deselect with '-m \"not wip\"')"
]
addopts = "-m 'not wip' tests/"
[tool.ruff]
line-length = 80
include = ["src/**/*.py", "tests/**/*.py", "docs/**/*.py"]
[tool.ruff.lint]
extend-select = ["I", "D", "UP", "PIE790", "C90", "N", "B"]
# unnecessary-pass (PIE790)
# I isort
# D pydocstyle
# UP pyupgrade
# C90 mccabe complexity
# N pep8-naming
# B flake8-bugbear
ignore = ["E501", "D1"]
# E501: line length violations
# D1XX: missing docstring
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 5
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"docs/source/conf.py" = ["E402"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py310, py311, p312, audit
[testenv]
deps = pytest
commands = pytest
[testenv:audit]
description = "Run pip-audit to check for security vulnerabilities"
deps = pip-audit
extras = dev
test
docs
commands = pip-audit
"""