webchanges 3.30.0__tar.gz → 3.31.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {webchanges-3.30.0/webchanges.egg-info → webchanges-3.31.1}/PKG-INFO +24 -56
- {webchanges-3.30.0 → webchanges-3.31.1}/README.rst +22 -54
- {webchanges-3.30.0 → webchanges-3.31.1}/pyproject.toml +221 -95
- webchanges-3.31.1/requirements.txt +12 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/__init__.py +3 -5
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/_vendored/headers.py +82 -77
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/_vendored/packaging_version.py +55 -51
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/cli.py +75 -18
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/command.py +320 -188
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/config.py +1 -1
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/differs.py +647 -354
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/filters.py +98 -82
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/handler.py +43 -35
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/jobs.py +247 -195
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/mailer.py +9 -8
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/main.py +1 -1
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/reporters.py +262 -84
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/storage.py +89 -83
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/storage_minidb.py +1 -1
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/util.py +51 -20
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/worker.py +3 -4
- {webchanges-3.30.0 → webchanges-3.31.1/webchanges.egg-info}/PKG-INFO +24 -56
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges.egg-info/requires.txt +1 -1
- webchanges-3.30.0/requirements.txt +0 -12
- {webchanges-3.30.0 → webchanges-3.31.1}/LICENSE +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/MANIFEST.in +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/setup.cfg +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/__main__.py +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/_vendored/__init__.py +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges/py.typed +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges.egg-info/SOURCES.txt +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges.egg-info/dependency_links.txt +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges.egg-info/entry_points.txt +0 -0
- {webchanges-3.30.0 → webchanges-3.31.1}/webchanges.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webchanges
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.31.1
|
|
4
4
|
Summary: Web Changes Delivered. AI-Summarized. Totally Anonymous.
|
|
5
5
|
Author-email: Mike Borsetti <mike+webchanges@borsetti.com>
|
|
6
6
|
Maintainer-email: Mike Borsetti <mike+webchanges@borsetti.com>
|
|
@@ -108,7 +108,7 @@ Requires-Dist: cssselect
|
|
|
108
108
|
Requires-Dist: h2
|
|
109
109
|
Requires-Dist: html2text
|
|
110
110
|
Requires-Dist: httpx
|
|
111
|
-
Requires-Dist: lxml
|
|
111
|
+
Requires-Dist: lxml
|
|
112
112
|
Requires-Dist: markdown2
|
|
113
113
|
Requires-Dist: msgpack
|
|
114
114
|
Requires-Dist: platformdirs
|
|
@@ -196,9 +196,15 @@ For Generative AI summaries (BETA), you need a free `API Key from Google Cloud A
|
|
|
196
196
|
|
|
197
197
|
Installation
|
|
198
198
|
============
|
|
199
|
-
|pypi_version| |format| |status|
|
|
199
|
+
|pypi_version| |format| |status|
|
|
200
200
|
|
|
201
|
-
Install **webchanges** with:
|
|
201
|
+
Install **webchanges** with ``uv`` (recommended):
|
|
202
|
+
|
|
203
|
+
.. code-block:: bash
|
|
204
|
+
|
|
205
|
+
uv pip install webchanges
|
|
206
|
+
|
|
207
|
+
or with ``pip``:
|
|
202
208
|
|
|
203
209
|
.. code-block:: bash
|
|
204
210
|
|
|
@@ -261,7 +267,7 @@ Schedule
|
|
|
261
267
|
|
|
262
268
|
Code
|
|
263
269
|
====
|
|
264
|
-
|coveralls| |issues| |code_style|
|
|
270
|
+
|coveralls| |snyk| |issues| |code_style|
|
|
265
271
|
|
|
266
272
|
The code, issues tracker, and discussions are hosted on `GitHub <https://github.com/mborsetti/webchanges>`__.
|
|
267
273
|
|
|
@@ -287,55 +293,14 @@ licensed under a `BSD 3-Clause License
|
|
|
287
293
|
<https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
|
|
288
294
|
|
|
289
295
|
|
|
290
|
-
Compatibility
|
|
291
|
-
|
|
296
|
+
Compatibility **urlwatch**
|
|
297
|
+
===========================
|
|
292
298
|
|
|
293
299
|
This project is based on code from `urlwatch 2.21
|
|
294
300
|
<https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
|
|
295
301
|
|
|
296
|
-
|
|
297
|
-
configuration files
|
|
298
|
-
improvements, including:
|
|
299
|
-
|
|
300
|
-
* :underline:`AI-Powered Summaries`: Summary of changes in plain text using generative AI, useful for long documents
|
|
301
|
-
(e.g. legal);
|
|
302
|
-
* :underline:`Image Change Detection`: Monitor changes to images and receive notifications with an image highlighting
|
|
303
|
-
the differences;
|
|
304
|
-
* :underline:`Structured Data Monitoring`: Track changes in JSON or XML data on an element-by-element basis;
|
|
305
|
-
* :underline:`Improved Documentation`: We've revamped the `documentation <https://webchanges.readthedocs.io/>`__ to make
|
|
306
|
-
implementation easier;
|
|
307
|
-
* :underline:`Enhanced HTML Reports`: HTML reports are now much clearer and include:
|
|
308
|
-
|
|
309
|
-
* Clickable links!
|
|
310
|
-
* Retention of most original formatting (**bolding / headers**, *italics*, :underline:`underlining`, lists with
|
|
311
|
-
bullets (•), and indentation;
|
|
312
|
-
* :additions:`added` and :deletions:`deleted` lines clearly highlighted with color and strikethrough;
|
|
313
|
-
* Wrapping of long lines (instead of truncation);
|
|
314
|
-
* Improved compatibility with a wider range of HTML email clients, including those that override stylesheets (e.g.,
|
|
315
|
-
Gmail);
|
|
316
|
-
* General legibility improvements.
|
|
317
|
-
|
|
318
|
-
* :underline:`New Filtering Options`: New filters, like `additions_only
|
|
319
|
-
<https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__, which allows you to focus on
|
|
320
|
-
added content without the distraction of deletions;
|
|
321
|
-
* :underline:`New Command Line Arguments`: New command-line arguments such as ``--errors``, which helps you identify
|
|
322
|
-
jobs that are no longer functioning correctly;
|
|
323
|
-
* :underline:`Increased Reliability and Stability`: Testing coverage has increased by approximately 30 percentage
|
|
324
|
-
points;
|
|
325
|
-
* :underline:`Additional Enhancements`: Numerous other additions, refinements, and bug fixes have been implemented.
|
|
326
|
-
For more information, see `here <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__.
|
|
327
|
-
|
|
328
|
-
Example enhancements to HTML reporting:
|
|
329
|
-
|
|
330
|
-
.. image:: https://raw.githubusercontent.com/mborsetti/webchanges/main/docs/html_diff_filters_example_1.png
|
|
331
|
-
:width: 504
|
|
332
|
-
|
|
333
|
-
|
|
|
334
|
-
|
|
335
|
-
.. image:: https://raw.githubusercontent.com/mborsetti/webchanges/main/docs/html_diff_filters_example_3.png
|
|
336
|
-
:width: 504
|
|
337
|
-
|
|
338
|
-
|
|
302
|
+
For upgrading from **urlwatch** to **webchanges** (using the same job and
|
|
303
|
+
configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__).
|
|
339
304
|
|
|
340
305
|
|
|
341
306
|
.. |support| image:: https://img.shields.io/pypi/pyversions/webchanges.svg
|
|
@@ -371,12 +336,15 @@ Example enhancements to HTML reporting:
|
|
|
371
336
|
.. |coveralls| image:: https://img.shields.io/coverallsCoverage/github/mborsetti/webchanges.svg
|
|
372
337
|
:target: https://coveralls.io/github/mborsetti/webchanges?branch=main
|
|
373
338
|
:alt: Code coverage by Coveralls
|
|
374
|
-
.. |code_style| image:: https://img.shields.io/badge/code%20style-
|
|
375
|
-
:target: https://github.com/
|
|
376
|
-
:alt: Code style
|
|
339
|
+
.. |code_style| image:: https://img.shields.io/badge/code%20style-ruff-000000.svg
|
|
340
|
+
:target: https://github.com/astral-sh/ruff
|
|
341
|
+
:alt: Code style ruff
|
|
377
342
|
.. |status| image:: https://img.shields.io/pypi/status/webchanges.svg
|
|
378
343
|
:target: https://pypi.org/project/webchanges/
|
|
379
344
|
:alt: Package stability
|
|
380
|
-
.. |security| image:: https://img.shields.io/badge/security-bandit-green.svg
|
|
381
|
-
|
|
382
|
-
|
|
345
|
+
.. .. |security| image:: https://img.shields.io/badge/security-bandit-green.svg
|
|
346
|
+
.. :target: https://github.com/PyCQA/bandit
|
|
347
|
+
.. :alt: Security Status
|
|
348
|
+
.. |snyk| image:: https://snyk.io/advisor/python/holidays/badge.svg
|
|
349
|
+
:target: https://snyk.io/advisor/python/holidays
|
|
350
|
+
:alt: Snyk Package Health Score
|
|
@@ -29,9 +29,15 @@ For Generative AI summaries (BETA), you need a free `API Key from Google Cloud A
|
|
|
29
29
|
|
|
30
30
|
Installation
|
|
31
31
|
============
|
|
32
|
-
|pypi_version| |format| |status|
|
|
32
|
+
|pypi_version| |format| |status|
|
|
33
33
|
|
|
34
|
-
Install **webchanges** with:
|
|
34
|
+
Install **webchanges** with ``uv`` (recommended):
|
|
35
|
+
|
|
36
|
+
.. code-block:: bash
|
|
37
|
+
|
|
38
|
+
uv pip install webchanges
|
|
39
|
+
|
|
40
|
+
or with ``pip``:
|
|
35
41
|
|
|
36
42
|
.. code-block:: bash
|
|
37
43
|
|
|
@@ -94,7 +100,7 @@ Schedule
|
|
|
94
100
|
|
|
95
101
|
Code
|
|
96
102
|
====
|
|
97
|
-
|coveralls| |issues| |code_style|
|
|
103
|
+
|coveralls| |snyk| |issues| |code_style|
|
|
98
104
|
|
|
99
105
|
The code, issues tracker, and discussions are hosted on `GitHub <https://github.com/mborsetti/webchanges>`__.
|
|
100
106
|
|
|
@@ -120,55 +126,14 @@ licensed under a `BSD 3-Clause License
|
|
|
120
126
|
<https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
|
|
121
127
|
|
|
122
128
|
|
|
123
|
-
Compatibility
|
|
124
|
-
|
|
129
|
+
Compatibility **urlwatch**
|
|
130
|
+
===========================
|
|
125
131
|
|
|
126
132
|
This project is based on code from `urlwatch 2.21
|
|
127
133
|
<https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
|
|
128
134
|
|
|
129
|
-
|
|
130
|
-
configuration files
|
|
131
|
-
improvements, including:
|
|
132
|
-
|
|
133
|
-
* :underline:`AI-Powered Summaries`: Summary of changes in plain text using generative AI, useful for long documents
|
|
134
|
-
(e.g. legal);
|
|
135
|
-
* :underline:`Image Change Detection`: Monitor changes to images and receive notifications with an image highlighting
|
|
136
|
-
the differences;
|
|
137
|
-
* :underline:`Structured Data Monitoring`: Track changes in JSON or XML data on an element-by-element basis;
|
|
138
|
-
* :underline:`Improved Documentation`: We've revamped the `documentation <https://webchanges.readthedocs.io/>`__ to make
|
|
139
|
-
implementation easier;
|
|
140
|
-
* :underline:`Enhanced HTML Reports`: HTML reports are now much clearer and include:
|
|
141
|
-
|
|
142
|
-
* Clickable links!
|
|
143
|
-
* Retention of most original formatting (**bolding / headers**, *italics*, :underline:`underlining`, lists with
|
|
144
|
-
bullets (•), and indentation;
|
|
145
|
-
* :additions:`added` and :deletions:`deleted` lines clearly highlighted with color and strikethrough;
|
|
146
|
-
* Wrapping of long lines (instead of truncation);
|
|
147
|
-
* Improved compatibility with a wider range of HTML email clients, including those that override stylesheets (e.g.,
|
|
148
|
-
Gmail);
|
|
149
|
-
* General legibility improvements.
|
|
150
|
-
|
|
151
|
-
* :underline:`New Filtering Options`: New filters, like `additions_only
|
|
152
|
-
<https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__, which allows you to focus on
|
|
153
|
-
added content without the distraction of deletions;
|
|
154
|
-
* :underline:`New Command Line Arguments`: New command-line arguments such as ``--errors``, which helps you identify
|
|
155
|
-
jobs that are no longer functioning correctly;
|
|
156
|
-
* :underline:`Increased Reliability and Stability`: Testing coverage has increased by approximately 30 percentage
|
|
157
|
-
points;
|
|
158
|
-
* :underline:`Additional Enhancements`: Numerous other additions, refinements, and bug fixes have been implemented.
|
|
159
|
-
For more information, see `here <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__.
|
|
160
|
-
|
|
161
|
-
Example enhancements to HTML reporting:
|
|
162
|
-
|
|
163
|
-
.. image:: https://raw.githubusercontent.com/mborsetti/webchanges/main/docs/html_diff_filters_example_1.png
|
|
164
|
-
:width: 504
|
|
165
|
-
|
|
166
|
-
|
|
|
167
|
-
|
|
168
|
-
.. image:: https://raw.githubusercontent.com/mborsetti/webchanges/main/docs/html_diff_filters_example_3.png
|
|
169
|
-
:width: 504
|
|
170
|
-
|
|
171
|
-
|
|
135
|
+
For upgrading from **urlwatch** to **webchanges** (using the same job and
|
|
136
|
+
configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__).
|
|
172
137
|
|
|
173
138
|
|
|
174
139
|
.. |support| image:: https://img.shields.io/pypi/pyversions/webchanges.svg
|
|
@@ -204,12 +169,15 @@ Example enhancements to HTML reporting:
|
|
|
204
169
|
.. |coveralls| image:: https://img.shields.io/coverallsCoverage/github/mborsetti/webchanges.svg
|
|
205
170
|
:target: https://coveralls.io/github/mborsetti/webchanges?branch=main
|
|
206
171
|
:alt: Code coverage by Coveralls
|
|
207
|
-
.. |code_style| image:: https://img.shields.io/badge/code%20style-
|
|
208
|
-
:target: https://github.com/
|
|
209
|
-
:alt: Code style
|
|
172
|
+
.. |code_style| image:: https://img.shields.io/badge/code%20style-ruff-000000.svg
|
|
173
|
+
:target: https://github.com/astral-sh/ruff
|
|
174
|
+
:alt: Code style ruff
|
|
210
175
|
.. |status| image:: https://img.shields.io/pypi/status/webchanges.svg
|
|
211
176
|
:target: https://pypi.org/project/webchanges/
|
|
212
177
|
:alt: Package stability
|
|
213
|
-
.. |security| image:: https://img.shields.io/badge/security-bandit-green.svg
|
|
214
|
-
|
|
215
|
-
|
|
178
|
+
.. .. |security| image:: https://img.shields.io/badge/security-bandit-green.svg
|
|
179
|
+
.. :target: https://github.com/PyCQA/bandit
|
|
180
|
+
.. :alt: Security Status
|
|
181
|
+
.. |snyk| image:: https://snyk.io/advisor/python/holidays/badge.svg
|
|
182
|
+
:target: https://snyk.io/advisor/python/holidays
|
|
183
|
+
:alt: Snyk Package Health Score
|
|
@@ -111,11 +111,102 @@ dependencies = {file = 'requirements.txt'}
|
|
|
111
111
|
'webchanges' = ['py.typed']
|
|
112
112
|
|
|
113
113
|
|
|
114
|
+
# -------------------------- bandit --------------------------
|
|
115
|
+
[tool.bandit]
|
|
116
|
+
# Find common security issues in Python code.
|
|
117
|
+
# Runs as part of pre-commit.
|
|
118
|
+
# Config file documentation at https://bandit.readthedocs.io/en/latest/config.html
|
|
119
|
+
|
|
120
|
+
targets = ['webchanges', 'tests']
|
|
121
|
+
skips = [
|
|
122
|
+
'B101', # Use of assert detected.
|
|
123
|
+
'B404', # Consider possible security implications associated with subprocess module.
|
|
124
|
+
'B602', # subprocess call with shell=True identified, security issue.
|
|
125
|
+
'B603' # subprocess call - check for execution of untrusted input.
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# -------------------------- black --------------------------
|
|
130
|
+
[tool.black]
|
|
131
|
+
# Uncompromising code formatting
|
|
132
|
+
# Runs as part of pre-commit
|
|
133
|
+
# Config file documentation
|
|
134
|
+
# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
|
|
135
|
+
|
|
136
|
+
# What's in here overrides the command-line options shown by running $ black --help.
|
|
137
|
+
line-length = 120
|
|
138
|
+
target-version = ['py310']
|
|
139
|
+
skip-string-normalization = true
|
|
140
|
+
extend-exclude = '/(\.idea|\.pytest_cache|\__pycache__|\venv.*|\webchanges.egg-info)/'
|
|
141
|
+
color = true
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# -------------------------- coverage --------------------------
|
|
145
|
+
[tool.coverage.run]
|
|
146
|
+
# Runs in Github Actions (see .github/workflows/ci-cd.yaml) and in tox (see tox.ini).
|
|
147
|
+
# Config file documentation at https://coverage.readthedocs.io/en/latest/config.html
|
|
148
|
+
|
|
149
|
+
branch = true
|
|
150
|
+
concurrency = ['multiprocessing']
|
|
151
|
+
source = ['./']
|
|
152
|
+
omit = [
|
|
153
|
+
'.*/*',
|
|
154
|
+
'build/*',
|
|
155
|
+
'dist/*',
|
|
156
|
+
'docs/*',
|
|
157
|
+
'htmlcov/*',
|
|
158
|
+
'pip/*',
|
|
159
|
+
'tests/*',
|
|
160
|
+
'webchanges/_vendored/*',
|
|
161
|
+
'webchanges.egg-info/*',
|
|
162
|
+
]
|
|
163
|
+
relative_files = true
|
|
164
|
+
command_line = '-m pytest -vv'
|
|
165
|
+
plugins = ['coverage_conditional_plugin']
|
|
166
|
+
|
|
167
|
+
[tool.coverage.coverage_conditional_plugin.rules]
|
|
168
|
+
# Requires pip install coverage-conditional-plugin
|
|
169
|
+
# Here we specify our pragma rules:
|
|
170
|
+
has-b4 = "is_installed('bs4')"
|
|
171
|
+
has-jq = "is_installed('jq')"
|
|
172
|
+
has-pdftotext = "is_installed('pdftotext')"
|
|
173
|
+
has-pytesseract = "is_installed('pytesseract')"
|
|
174
|
+
|
|
175
|
+
[tool.coverage.report]
|
|
176
|
+
# Regexes for lines to exclude from consideration
|
|
177
|
+
exclude_lines = [
|
|
178
|
+
# Don't complain about missing debug-only code:
|
|
179
|
+
'def __repr__',
|
|
180
|
+
'if self\.debug:',
|
|
181
|
+
|
|
182
|
+
# Have to re-enable the standard pragma
|
|
183
|
+
'pragma: no cover',
|
|
184
|
+
|
|
185
|
+
# Don't complain if tests don't hit defensive assertion code:
|
|
186
|
+
'raise AssertionError',
|
|
187
|
+
'raise NotImplementedError',
|
|
188
|
+
|
|
189
|
+
# Don't complain if non-runnable code isn't run:
|
|
190
|
+
'if 0:',
|
|
191
|
+
'if __name__ == .__main__.:',
|
|
192
|
+
|
|
193
|
+
# Don't complain if module is not importable (handled by code):
|
|
194
|
+
'except ImportError:',
|
|
195
|
+
|
|
196
|
+
# Don't cover IDE code:
|
|
197
|
+
'if TYPE_CHECKING:'
|
|
198
|
+
]
|
|
199
|
+
# Exclude entire files if they have a custom # pragma: exclude file remark
|
|
200
|
+
# exclude_also = '(?s)\A.*# pragma: exclude file.*\Z'
|
|
201
|
+
# ignore_errors = true
|
|
202
|
+
|
|
203
|
+
|
|
114
204
|
# -------------------------- isort --------------------------
|
|
205
|
+
[tool.isort]
|
|
115
206
|
# isort your imports, so you don't have to.
|
|
116
207
|
# Runs as part of pre-commit.
|
|
117
208
|
# Config file documentation https://pycqa.github.io/isort/docs/configuration/options.html
|
|
118
|
-
|
|
209
|
+
|
|
119
210
|
profile = 'black'
|
|
120
211
|
# multi_line_output = 3
|
|
121
212
|
# use_parentheses = True
|
|
@@ -147,25 +238,11 @@ remove_redundant_aliases = true
|
|
|
147
238
|
color_output = true
|
|
148
239
|
|
|
149
240
|
|
|
150
|
-
# -------------------------- black --------------------------
|
|
151
|
-
# Uncompromising code formatting
|
|
152
|
-
# Runs as part of pre-commit
|
|
153
|
-
# Config file documentation
|
|
154
|
-
# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
|
|
155
|
-
[tool.black]
|
|
156
|
-
# What's in here overrides the command-line options shown by running $ black --help.
|
|
157
|
-
line_length = 120
|
|
158
|
-
target_version = ['py310']
|
|
159
|
-
skip_string_normalization = true
|
|
160
|
-
extend_exclude = '/(\.idea|\.pytest_cache|\__pycache__|\venv.*|\webchanges.egg-info)/'
|
|
161
|
-
color = true
|
|
162
|
-
|
|
163
|
-
|
|
164
241
|
# -------------------------- mypy --------------------------
|
|
242
|
+
[tool.mypy]
|
|
165
243
|
# Static Typing for Python
|
|
166
244
|
# Runs as part of pre-commit
|
|
167
245
|
# Config file documentation at https://mypy.readthedocs.io/en/stable/config_file.html
|
|
168
|
-
[tool.mypy]
|
|
169
246
|
|
|
170
247
|
# Disables import discovery of namespace packages (see PEP 420)
|
|
171
248
|
namespace_packages = false
|
|
@@ -216,106 +293,155 @@ warn_unused_configs = true
|
|
|
216
293
|
|
|
217
294
|
|
|
218
295
|
# -------------------------- rstcheck --------------------------
|
|
296
|
+
[tool.rstcheck]
|
|
219
297
|
# Checks syntax of reStructuredText and code blocks nested within it.
|
|
220
298
|
# Runs as part of pre-commit.
|
|
221
299
|
# Config file documentation at https://rstcheck.readthedocs.io/en/latest/usage/config/
|
|
222
|
-
[tool.rstcheck]
|
|
223
300
|
|
|
224
301
|
report_level = 'WARNING'
|
|
225
302
|
# The below is needed when comments in *.rst files turn it into invalid python code
|
|
226
303
|
# ignore_language = 'python'
|
|
227
304
|
|
|
228
305
|
|
|
229
|
-
# -------------------------- bandit --------------------------
|
|
230
|
-
[tool.bandit]
|
|
231
|
-
# Find common security issues in Python code.
|
|
232
|
-
# Runs as part of pre-commit.
|
|
233
|
-
# Config file documentation at https://bandit.readthedocs.io/en/latest/config.html
|
|
234
|
-
|
|
235
|
-
targets = ['webchanges', 'tests']
|
|
236
|
-
skips = [
|
|
237
|
-
'B101', # Use of assert detected.
|
|
238
|
-
'B404', # Consider possible security implications associated with subprocess module.
|
|
239
|
-
'B602', # subprocess call with shell=True identified, security issue.
|
|
240
|
-
'B603' # subprocess call - check for execution of untrusted input.
|
|
241
|
-
]
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
# -------------------------- coverage --------------------------
|
|
245
|
-
# Runs in Github Actions (see .github/workflows/ci-cd.yaml) and in tox (see tox.ini).
|
|
246
|
-
# Config file documentation at https://coverage.readthedocs.io/en/latest/config.html
|
|
247
|
-
[tool.coverage.run]
|
|
248
|
-
branch = true
|
|
249
|
-
concurrency = ['multiprocessing']
|
|
250
|
-
source = ['./']
|
|
251
|
-
omit = [
|
|
252
|
-
'.*/*',
|
|
253
|
-
'build/*',
|
|
254
|
-
'dist/*',
|
|
255
|
-
'docs/*',
|
|
256
|
-
'htmlcov/*',
|
|
257
|
-
'pip/*',
|
|
258
|
-
'tests/*',
|
|
259
|
-
'webchanges/_vendored/*',
|
|
260
|
-
'webchanges.egg-info/*',
|
|
261
|
-
]
|
|
262
|
-
relative_files = true
|
|
263
|
-
command_line = '-m pytest -vv'
|
|
264
|
-
plugins = ['coverage_conditional_plugin']
|
|
265
|
-
|
|
266
|
-
[tool.coverage.coverage_conditional_plugin.rules]
|
|
267
|
-
# Requires pip install coverage-conditional-plugin
|
|
268
|
-
# Here we specify our pragma rules:
|
|
269
|
-
has-b4 = "is_installed('bs4')"
|
|
270
|
-
has-jq = "is_installed('jq')"
|
|
271
|
-
has-pdftotext = "is_installed('pdftotext')"
|
|
272
|
-
has-pytesseract = "is_installed('pytesseract')"
|
|
273
|
-
|
|
274
|
-
[tool.coverage.report]
|
|
275
|
-
# Regexes for lines to exclude from consideration
|
|
276
|
-
exclude_lines = [
|
|
277
|
-
# Don't complain about missing debug-only code:
|
|
278
|
-
'def __repr__',
|
|
279
|
-
'if self\.debug:',
|
|
280
|
-
|
|
281
|
-
# Have to re-enable the standard pragma
|
|
282
|
-
'pragma: no cover',
|
|
283
|
-
|
|
284
|
-
# Don't complain if tests don't hit defensive assertion code:
|
|
285
|
-
'raise AssertionError',
|
|
286
|
-
'raise NotImplementedError',
|
|
287
|
-
|
|
288
|
-
# Don't complain if non-runnable code isn't run:
|
|
289
|
-
'if 0:',
|
|
290
|
-
'if __name__ == .__main__.:',
|
|
291
|
-
|
|
292
|
-
# Don't complain if module is not importable (handled by code):
|
|
293
|
-
'except ImportError:',
|
|
294
|
-
|
|
295
|
-
# Don't cover IDE code:
|
|
296
|
-
'if TYPE_CHECKING:'
|
|
297
|
-
]
|
|
298
|
-
# Exclude entire files if they have a custom # pragma: exclude file remark
|
|
299
|
-
# exclude_also = '(?s)\A.*# pragma: exclude file.*\Z'
|
|
300
|
-
# ignore_errors = true
|
|
301
|
-
|
|
302
|
-
|
|
303
306
|
# -------------------------- pytest --------------------------
|
|
307
|
+
[tool.pytest.ini_options]
|
|
304
308
|
# Testing framework
|
|
305
309
|
# Config file documentation at https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref
|
|
306
|
-
|
|
310
|
+
|
|
307
311
|
log_auto_indent = true
|
|
308
312
|
# Enable log display during test run (aka "live logging" https://docs.pytest.org/en/stable/logging.html#live-logs)
|
|
309
313
|
log_cli = true
|
|
310
314
|
minversion = '8.3.3'
|
|
311
315
|
testpaths = ['tests']
|
|
312
316
|
|
|
313
|
-
# the below is for pytest-asyncio (required due to Playwright)
|
|
314
|
-
asyncio_mode = 'auto'
|
|
315
|
-
asyncio_default_fixture_loop_scope = 'function'
|
|
317
|
+
# the below is for pytest-asyncio (used to be required due to Playwright)
|
|
318
|
+
# asyncio_mode = 'auto'
|
|
319
|
+
# asyncio_default_fixture_loop_scope = 'function'
|
|
316
320
|
|
|
317
321
|
# Adds pytest-cov functionality (see https://pytest-cov.readthedocs.io/en/latest/config.html)
|
|
318
322
|
# Note: --cov moved to .github/workflows/ci-cd.yaml and tox.ini due to interference with PyCharm breakpoints (see
|
|
319
323
|
# https://github.com/pytest-dev/pytest-cov/issues/131) and to enable running tox --parallel
|
|
320
324
|
# Instead of below, now runs with $ coverage run --parallel-mode
|
|
321
325
|
# addopts = --cov=./ --cov-report=term --cov-report=html
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
# -------------------------- ruff --------------------------
|
|
329
|
+
[tool.ruff]
|
|
330
|
+
# Config file documentation at https://docs.astral.sh/ruff/configuration/
|
|
331
|
+
|
|
332
|
+
# Exclude a variety of commonly ignored directories.
|
|
333
|
+
exclude = [
|
|
334
|
+
".bzr",
|
|
335
|
+
".direnv",
|
|
336
|
+
".eggs",
|
|
337
|
+
".git",
|
|
338
|
+
".git-rewrite",
|
|
339
|
+
".hg",
|
|
340
|
+
".ipynb_checkpoints",
|
|
341
|
+
".mypy_cache",
|
|
342
|
+
".nox",
|
|
343
|
+
".pants.d",
|
|
344
|
+
".pyenv",
|
|
345
|
+
".pytest_cache",
|
|
346
|
+
".pytype",
|
|
347
|
+
".ruff_cache",
|
|
348
|
+
".svn",
|
|
349
|
+
".tox",
|
|
350
|
+
".venv",
|
|
351
|
+
".vscode",
|
|
352
|
+
"__pypackages__",
|
|
353
|
+
"_build",
|
|
354
|
+
"buck-out",
|
|
355
|
+
"build",
|
|
356
|
+
"dist",
|
|
357
|
+
"node_modules",
|
|
358
|
+
"site-packages",
|
|
359
|
+
"venv",
|
|
360
|
+
|
|
361
|
+
"webchanges/storage_minidb.py",
|
|
362
|
+
"webchanges/_vendored",
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
# By default, Ruff will discover files matching *.py, *.pyi, *.ipynb, or pyproject.toml.
|
|
366
|
+
# Include additional files
|
|
367
|
+
# include = []
|
|
368
|
+
|
|
369
|
+
# Set the maximum line length.
|
|
370
|
+
line-length = 120
|
|
371
|
+
indent-width = 4
|
|
372
|
+
|
|
373
|
+
# Target Python version
|
|
374
|
+
# target-version = "py311" # Commented out to infer from [project] requires-python
|
|
375
|
+
|
|
376
|
+
[tool.ruff.lint]
|
|
377
|
+
# By default, Ruff enables Flake8's F rules, along with a subset of the E rules
|
|
378
|
+
# Enable rules not enabled by default, and ignore specific rules.
|
|
379
|
+
select = [
|
|
380
|
+
# flake8-builtins
|
|
381
|
+
"B",
|
|
382
|
+
# flake8-bandit
|
|
383
|
+
"S",
|
|
384
|
+
# flake8-datetimez
|
|
385
|
+
"DTZ",
|
|
386
|
+
# isort
|
|
387
|
+
"I",
|
|
388
|
+
# McCabe complexity
|
|
389
|
+
# "C901",
|
|
390
|
+
# pepe8-naming
|
|
391
|
+
"N",
|
|
392
|
+
# Pyflakes
|
|
393
|
+
"F",
|
|
394
|
+
# pycodestyle errors and warnings
|
|
395
|
+
"E", "W",
|
|
396
|
+
# Ruff-specific rules
|
|
397
|
+
"RUF",
|
|
398
|
+
]
|
|
399
|
+
ignore = [
|
|
400
|
+
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
|
|
401
|
+
]
|
|
402
|
+
|
|
403
|
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
404
|
+
fixable = ["ALL"]
|
|
405
|
+
unfixable = []
|
|
406
|
+
|
|
407
|
+
# Allow unused variables when underscore-prefixed.
|
|
408
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
409
|
+
|
|
410
|
+
[tool.ruff.format]
|
|
411
|
+
# Enable the formatter, which is a drop-in replacement for Black.
|
|
412
|
+
# No extra configuration is needed for basic formatting.
|
|
413
|
+
|
|
414
|
+
# Exclude files for formatting only
|
|
415
|
+
exclude = []
|
|
416
|
+
|
|
417
|
+
# Use single quotes for strings.
|
|
418
|
+
quote-style = "single"
|
|
419
|
+
|
|
420
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
421
|
+
indent-style = "space"
|
|
422
|
+
|
|
423
|
+
# Like Black, respect magic trailing commas.
|
|
424
|
+
skip-magic-trailing-comma = false
|
|
425
|
+
|
|
426
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
427
|
+
line-ending = "auto"
|
|
428
|
+
|
|
429
|
+
# Enable auto-formatting of code examples in docstrings. Markdown,
|
|
430
|
+
# reStructuredText code/literal blocks and doctests are all supported.
|
|
431
|
+
#
|
|
432
|
+
# This is currently disabled by default, but it is planned for this
|
|
433
|
+
# to be opt-out in the future.
|
|
434
|
+
docstring-code-format = true
|
|
435
|
+
|
|
436
|
+
# Set the line length limit used when formatting code snippets in
|
|
437
|
+
# docstrings.
|
|
438
|
+
#
|
|
439
|
+
# This only has an effect when the `docstring-code-format` setting is
|
|
440
|
+
# enabled.
|
|
441
|
+
docstring-code-line-length = "dynamic"
|
|
442
|
+
|
|
443
|
+
[tool.ruff.lint.per-file-ignores]
|
|
444
|
+
"tests/*" = [
|
|
445
|
+
# Use of `assert` detected
|
|
446
|
+
"S101"
|
|
447
|
+
]
|
|
@@ -15,18 +15,16 @@ from __future__ import annotations
|
|
|
15
15
|
__min_python_version__ = (3, 10) # minimum version of Python required to run; supported until fall 2025
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
__project_name__ = __package__
|
|
18
|
+
__project_name__ = str(__package__)
|
|
19
19
|
# Version numbering is PEP440-compliant https://www.python.org/dev/peps/pep-0440/
|
|
20
20
|
# Release numbering largely follows Semantic Versioning https://semver.org/spec/v2.0.0.html#semantic-versioning-200
|
|
21
21
|
# * MAJOR version when you make incompatible API changes,
|
|
22
22
|
# * MINOR version when you add functionality in a backwards compatible manner, and
|
|
23
23
|
# * MICRO or PATCH version when you make backwards compatible bug fixes. We no longer use '0'
|
|
24
24
|
# If unsure on increments, use pkg_resources.parse_version to parse
|
|
25
|
-
__version__ = '3.
|
|
25
|
+
__version__ = '3.31.1'
|
|
26
26
|
__description__ = (
|
|
27
|
-
'Check web (or command output) for changes since last run and notify.\n'
|
|
28
|
-
'\n'
|
|
29
|
-
'Anonymously alerts you of web changes.'
|
|
27
|
+
'Check web (or command output) for changes since last run and notify.\n\nAnonymously alerts you of web changes.'
|
|
30
28
|
)
|
|
31
29
|
__author__ = 'Mike Borsetti <mike@borsetti.com>'
|
|
32
30
|
__copyright__ = 'Copyright 2020- Mike Borsetti'
|