frigid 3.0__tar.gz → 4.0__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.
- frigid-4.0/.gitignore +7 -0
- {frigid-3.0 → frigid-4.0}/PKG-INFO +42 -24
- {frigid-3.0 → frigid-4.0}/README.rst +38 -22
- frigid-4.0/pyproject.toml +318 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/__/__init__.py +12 -4
- {frigid-3.0 → frigid-4.0}/sources/frigid/__/dictionaries.py +22 -22
- frigid-4.0/sources/frigid/__/doctab.py +93 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/__/exceptions.py +7 -8
- frigid-4.0/sources/frigid/__/imports.py +42 -0
- frigid-4.0/sources/frigid/__/nomina.py +88 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/__init__.py +13 -6
- frigid-4.0/sources/frigid/classes.py +345 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/dictionaries.py +27 -41
- {frigid-3.0 → frigid-4.0}/sources/frigid/exceptions.py +21 -25
- frigid-4.0/sources/frigid/modules.py +80 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/namespaces.py +14 -17
- {frigid-3.0 → frigid-4.0}/sources/frigid/sequences.py +2 -7
- frigid-3.0/.gitignore +0 -4
- frigid-3.0/pyproject.toml +0 -516
- frigid-3.0/sources/frigid/__/docstrings.py +0 -49
- frigid-3.0/sources/frigid/__/doctab.py +0 -77
- frigid-3.0/sources/frigid/__/immutables.py +0 -266
- frigid-3.0/sources/frigid/__/imports.py +0 -68
- frigid-3.0/sources/frigid/classes.py +0 -373
- frigid-3.0/sources/frigid/modules.py +0 -97
- frigid-3.0/sources/frigid/objects.py +0 -190
- frigid-3.0/sources/frigid/qaliases.py +0 -68
- {frigid-3.0 → frigid-4.0}/LICENSE.txt +0 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/_typedecls/__builtins__.pyi +0 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/installers.py +0 -0
- {frigid-3.0 → frigid-4.0}/sources/frigid/py.typed +0 -0
frigid-4.0/.gitignore
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frigid
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0
|
|
4
4
|
Summary: Immutable data structures.
|
|
5
5
|
Project-URL: Homepage, https://github.com/emcd/python-frigid
|
|
6
6
|
Project-URL: Documentation, https://emcd.github.io/python-frigid
|
|
@@ -23,7 +23,9 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
|
23
23
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
24
24
|
Classifier: Topic :: Software Development
|
|
25
25
|
Requires-Python: >=3.10
|
|
26
|
-
Requires-Dist: absence
|
|
26
|
+
Requires-Dist: absence~=1.1
|
|
27
|
+
Requires-Dist: classcore~=1.2
|
|
28
|
+
Requires-Dist: dynadoc~=1.2
|
|
27
29
|
Requires-Dist: typing-extensions
|
|
28
30
|
Description-Content-Type: text/x-rst
|
|
29
31
|
|
|
@@ -47,7 +49,7 @@ Description-Content-Type: text/x-rst
|
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
*******************************************************************************
|
|
50
|
-
|
|
52
|
+
frigid
|
|
51
53
|
*******************************************************************************
|
|
52
54
|
|
|
53
55
|
.. image:: https://img.shields.io/pypi/v/frigid
|
|
@@ -137,11 +139,11 @@ forms of initialization.)
|
|
|
137
139
|
>>> ns.cherries = 42 # ❌ Attempted assignment raises error.
|
|
138
140
|
Traceback (most recent call last):
|
|
139
141
|
...
|
|
140
|
-
frigid.exceptions.
|
|
142
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'cherries'.
|
|
141
143
|
>>> del ns.apples # ❌ Attempted deletion raises error.
|
|
142
144
|
Traceback (most recent call last):
|
|
143
145
|
...
|
|
144
|
-
frigid.exceptions.
|
|
146
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'apples'.
|
|
145
147
|
>>> ns
|
|
146
148
|
frigid.namespaces.Namespace( apples = 12, bananas = 6 )
|
|
147
149
|
|
|
@@ -159,11 +161,11 @@ initialization.)
|
|
|
159
161
|
>>> dct['cherries'] = 42 # ❌ Attempted assignment raises error.
|
|
160
162
|
Traceback (most recent call last):
|
|
161
163
|
...
|
|
162
|
-
frigid.exceptions.
|
|
164
|
+
frigid.exceptions.EntryImmutability: Cannot assign entry for 'cherries'.
|
|
163
165
|
>>> del dct['bananas'] # ❌ Attempted removal raises error.
|
|
164
166
|
Traceback (most recent call last):
|
|
165
167
|
...
|
|
166
|
-
frigid.exceptions.
|
|
168
|
+
frigid.exceptions.EntryImmutability: Cannot delete entry for 'bananas'.
|
|
167
169
|
>>> dct
|
|
168
170
|
frigid.dictionaries.Dictionary( {'apples': 12, 'bananas': 6} )
|
|
169
171
|
|
|
@@ -171,10 +173,11 @@ frigid.dictionaries.Dictionary( {'apples': 12, 'bananas': 6} )
|
|
|
171
173
|
Immutable Objects 🧱
|
|
172
174
|
-------------------------------------------------------------------------------
|
|
173
175
|
|
|
174
|
-
The ``
|
|
176
|
+
The ``with_standard_behaviors`` decorator can be applied to any class to make
|
|
177
|
+
its instances fully immutable after initialization.
|
|
175
178
|
|
|
176
|
-
>>> from frigid import
|
|
177
|
-
>>> @
|
|
179
|
+
>>> from frigid import with_standard_behaviors
|
|
180
|
+
>>> @with_standard_behaviors( )
|
|
178
181
|
... class Config:
|
|
179
182
|
... def __init__( self, debug = False ):
|
|
180
183
|
... self.debug = debug
|
|
@@ -183,11 +186,11 @@ The ``immutable`` decorator can be applied to any class to make its instances fu
|
|
|
183
186
|
>>> config.verbose = True # ❌ Attempted addition raises error
|
|
184
187
|
Traceback (most recent call last):
|
|
185
188
|
...
|
|
186
|
-
frigid.exceptions.
|
|
189
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'verbose'.
|
|
187
190
|
>>> config.debug = False # ❌ Attempted reassignment raises error
|
|
188
191
|
Traceback (most recent call last):
|
|
189
192
|
...
|
|
190
|
-
frigid.exceptions.
|
|
193
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'debug'.
|
|
191
194
|
|
|
192
195
|
|
|
193
196
|
Use Cases 🎯
|
|
@@ -220,14 +223,6 @@ Use Cases 🎯
|
|
|
220
223
|
:alt: pre-commit
|
|
221
224
|
:target: https://github.com/pre-commit/pre-commit
|
|
222
225
|
|
|
223
|
-
.. image:: https://img.shields.io/badge/security-bandit-yellow.svg
|
|
224
|
-
:alt: Bandit
|
|
225
|
-
:target: https://github.com/PyCQA/bandit
|
|
226
|
-
|
|
227
|
-
.. image:: https://img.shields.io/badge/linting-pylint-yellowgreen
|
|
228
|
-
:alt: Pylint
|
|
229
|
-
:target: https://github.com/pylint-dev/pylint
|
|
230
|
-
|
|
231
226
|
.. image:: https://microsoft.github.io/pyright/img/pyright_badge.svg
|
|
232
227
|
:alt: Pyright
|
|
233
228
|
:target: https://microsoft.github.io/pyright
|
|
@@ -236,10 +231,6 @@ Use Cases 🎯
|
|
|
236
231
|
:alt: Ruff
|
|
237
232
|
:target: https://github.com/astral-sh/ruff
|
|
238
233
|
|
|
239
|
-
.. image:: https://img.shields.io/badge/hypothesis-tested-brightgreen.svg
|
|
240
|
-
:alt: Hypothesis
|
|
241
|
-
:target: https://hypothesis.readthedocs.io/en/latest/
|
|
242
|
-
|
|
243
234
|
.. image:: https://img.shields.io/pypi/implementation/frigid
|
|
244
235
|
:alt: PyPI - Implementation
|
|
245
236
|
:target: https://pypi.org/project/frigid/
|
|
@@ -247,3 +238,30 @@ Use Cases 🎯
|
|
|
247
238
|
.. image:: https://img.shields.io/pypi/wheel/frigid
|
|
248
239
|
:alt: PyPI - Wheel
|
|
249
240
|
:target: https://pypi.org/project/frigid/
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
Other Projects by This Author 🌟
|
|
244
|
+
===============================================================================
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
* `python-absence <https://github.com/emcd/python-absence>`_ (`absence <https://pypi.org/project/absence/>`_ on PyPI)
|
|
248
|
+
|
|
249
|
+
🕳️ A Python library package which provides a **sentinel for absent values** - a falsey, immutable singleton that represents the absence of a value in contexts where ``None`` or ``False`` may be valid values.
|
|
250
|
+
* `python-accretive <https://github.com/emcd/python-accretive>`_ (`accretive <https://pypi.org/project/accretive/>`_ on PyPI)
|
|
251
|
+
|
|
252
|
+
🌌 A Python library package which provides **accretive data structures** - collections which can grow but never shrink.
|
|
253
|
+
* `python-classcore <https://github.com/emcd/python-classcore>`_ (`classcore <https://pypi.org/project/classcore/>`_ on PyPI)
|
|
254
|
+
|
|
255
|
+
🏭 A Python library package which provides **foundational class factories and decorators** for providing classes with attributes immutability and concealment and other custom behaviors.
|
|
256
|
+
* `python-dynadoc <https://github.com/emcd/python-dynadoc>`_ (`dynadoc <https://pypi.org/project/dynadoc/>`_ on PyPI)
|
|
257
|
+
|
|
258
|
+
📝 A Python library package which bridges the gap between **rich annotations** and **automatic documentation generation** with configurable renderers and support for reusable fragments.
|
|
259
|
+
* `python-falsifier <https://github.com/emcd/python-falsifier>`_ (`falsifier <https://pypi.org/project/falsifier/>`_ on PyPI)
|
|
260
|
+
|
|
261
|
+
🎭 A very simple Python library package which provides a **base class for falsey objects** - objects that evaluate to ``False`` in boolean contexts.
|
|
262
|
+
* `python-icecream-truck <https://github.com/emcd/python-icecream-truck>`_ (`icecream-truck <https://pypi.org/project/icecream-truck/>`_ on PyPI)
|
|
263
|
+
|
|
264
|
+
🍦 **Flavorful Debugging** - A Python library which enhances the powerful and well-known ``icecream`` package with flavored traces, configuration hierarchies, customized outputs, ready-made recipes, and more.
|
|
265
|
+
* `python-mimeogram <https://github.com/emcd/python-mimeogram>`_ (`mimeogram <https://pypi.org/project/mimeogram/>`_ on PyPI)
|
|
266
|
+
|
|
267
|
+
📨 A command-line tool for **exchanging collections of files with Large Language Models** - bundle multiple files into a single clipboard-ready document while preserving directory structure and metadata... good for code reviews, project sharing, and LLM interactions.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
*******************************************************************************
|
|
21
|
-
|
|
21
|
+
frigid
|
|
22
22
|
*******************************************************************************
|
|
23
23
|
|
|
24
24
|
.. image:: https://img.shields.io/pypi/v/frigid
|
|
@@ -108,11 +108,11 @@ forms of initialization.)
|
|
|
108
108
|
>>> ns.cherries = 42 # ❌ Attempted assignment raises error.
|
|
109
109
|
Traceback (most recent call last):
|
|
110
110
|
...
|
|
111
|
-
frigid.exceptions.
|
|
111
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'cherries'.
|
|
112
112
|
>>> del ns.apples # ❌ Attempted deletion raises error.
|
|
113
113
|
Traceback (most recent call last):
|
|
114
114
|
...
|
|
115
|
-
frigid.exceptions.
|
|
115
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'apples'.
|
|
116
116
|
>>> ns
|
|
117
117
|
frigid.namespaces.Namespace( apples = 12, bananas = 6 )
|
|
118
118
|
|
|
@@ -130,11 +130,11 @@ initialization.)
|
|
|
130
130
|
>>> dct['cherries'] = 42 # ❌ Attempted assignment raises error.
|
|
131
131
|
Traceback (most recent call last):
|
|
132
132
|
...
|
|
133
|
-
frigid.exceptions.
|
|
133
|
+
frigid.exceptions.EntryImmutability: Cannot assign entry for 'cherries'.
|
|
134
134
|
>>> del dct['bananas'] # ❌ Attempted removal raises error.
|
|
135
135
|
Traceback (most recent call last):
|
|
136
136
|
...
|
|
137
|
-
frigid.exceptions.
|
|
137
|
+
frigid.exceptions.EntryImmutability: Cannot delete entry for 'bananas'.
|
|
138
138
|
>>> dct
|
|
139
139
|
frigid.dictionaries.Dictionary( {'apples': 12, 'bananas': 6} )
|
|
140
140
|
|
|
@@ -142,10 +142,11 @@ frigid.dictionaries.Dictionary( {'apples': 12, 'bananas': 6} )
|
|
|
142
142
|
Immutable Objects 🧱
|
|
143
143
|
-------------------------------------------------------------------------------
|
|
144
144
|
|
|
145
|
-
The ``
|
|
145
|
+
The ``with_standard_behaviors`` decorator can be applied to any class to make
|
|
146
|
+
its instances fully immutable after initialization.
|
|
146
147
|
|
|
147
|
-
>>> from frigid import
|
|
148
|
-
>>> @
|
|
148
|
+
>>> from frigid import with_standard_behaviors
|
|
149
|
+
>>> @with_standard_behaviors( )
|
|
149
150
|
... class Config:
|
|
150
151
|
... def __init__( self, debug = False ):
|
|
151
152
|
... self.debug = debug
|
|
@@ -154,11 +155,11 @@ The ``immutable`` decorator can be applied to any class to make its instances fu
|
|
|
154
155
|
>>> config.verbose = True # ❌ Attempted addition raises error
|
|
155
156
|
Traceback (most recent call last):
|
|
156
157
|
...
|
|
157
|
-
frigid.exceptions.
|
|
158
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'verbose'.
|
|
158
159
|
>>> config.debug = False # ❌ Attempted reassignment raises error
|
|
159
160
|
Traceback (most recent call last):
|
|
160
161
|
...
|
|
161
|
-
frigid.exceptions.
|
|
162
|
+
frigid.exceptions.AttributeImmutability: Could not assign or delete attribute 'debug'.
|
|
162
163
|
|
|
163
164
|
|
|
164
165
|
Use Cases 🎯
|
|
@@ -191,14 +192,6 @@ Use Cases 🎯
|
|
|
191
192
|
:alt: pre-commit
|
|
192
193
|
:target: https://github.com/pre-commit/pre-commit
|
|
193
194
|
|
|
194
|
-
.. image:: https://img.shields.io/badge/security-bandit-yellow.svg
|
|
195
|
-
:alt: Bandit
|
|
196
|
-
:target: https://github.com/PyCQA/bandit
|
|
197
|
-
|
|
198
|
-
.. image:: https://img.shields.io/badge/linting-pylint-yellowgreen
|
|
199
|
-
:alt: Pylint
|
|
200
|
-
:target: https://github.com/pylint-dev/pylint
|
|
201
|
-
|
|
202
195
|
.. image:: https://microsoft.github.io/pyright/img/pyright_badge.svg
|
|
203
196
|
:alt: Pyright
|
|
204
197
|
:target: https://microsoft.github.io/pyright
|
|
@@ -207,10 +200,6 @@ Use Cases 🎯
|
|
|
207
200
|
:alt: Ruff
|
|
208
201
|
:target: https://github.com/astral-sh/ruff
|
|
209
202
|
|
|
210
|
-
.. image:: https://img.shields.io/badge/hypothesis-tested-brightgreen.svg
|
|
211
|
-
:alt: Hypothesis
|
|
212
|
-
:target: https://hypothesis.readthedocs.io/en/latest/
|
|
213
|
-
|
|
214
203
|
.. image:: https://img.shields.io/pypi/implementation/frigid
|
|
215
204
|
:alt: PyPI - Implementation
|
|
216
205
|
:target: https://pypi.org/project/frigid/
|
|
@@ -218,3 +207,30 @@ Use Cases 🎯
|
|
|
218
207
|
.. image:: https://img.shields.io/pypi/wheel/frigid
|
|
219
208
|
:alt: PyPI - Wheel
|
|
220
209
|
:target: https://pypi.org/project/frigid/
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
Other Projects by This Author 🌟
|
|
213
|
+
===============================================================================
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
* `python-absence <https://github.com/emcd/python-absence>`_ (`absence <https://pypi.org/project/absence/>`_ on PyPI)
|
|
217
|
+
|
|
218
|
+
🕳️ A Python library package which provides a **sentinel for absent values** - a falsey, immutable singleton that represents the absence of a value in contexts where ``None`` or ``False`` may be valid values.
|
|
219
|
+
* `python-accretive <https://github.com/emcd/python-accretive>`_ (`accretive <https://pypi.org/project/accretive/>`_ on PyPI)
|
|
220
|
+
|
|
221
|
+
🌌 A Python library package which provides **accretive data structures** - collections which can grow but never shrink.
|
|
222
|
+
* `python-classcore <https://github.com/emcd/python-classcore>`_ (`classcore <https://pypi.org/project/classcore/>`_ on PyPI)
|
|
223
|
+
|
|
224
|
+
🏭 A Python library package which provides **foundational class factories and decorators** for providing classes with attributes immutability and concealment and other custom behaviors.
|
|
225
|
+
* `python-dynadoc <https://github.com/emcd/python-dynadoc>`_ (`dynadoc <https://pypi.org/project/dynadoc/>`_ on PyPI)
|
|
226
|
+
|
|
227
|
+
📝 A Python library package which bridges the gap between **rich annotations** and **automatic documentation generation** with configurable renderers and support for reusable fragments.
|
|
228
|
+
* `python-falsifier <https://github.com/emcd/python-falsifier>`_ (`falsifier <https://pypi.org/project/falsifier/>`_ on PyPI)
|
|
229
|
+
|
|
230
|
+
🎭 A very simple Python library package which provides a **base class for falsey objects** - objects that evaluate to ``False`` in boolean contexts.
|
|
231
|
+
* `python-icecream-truck <https://github.com/emcd/python-icecream-truck>`_ (`icecream-truck <https://pypi.org/project/icecream-truck/>`_ on PyPI)
|
|
232
|
+
|
|
233
|
+
🍦 **Flavorful Debugging** - A Python library which enhances the powerful and well-known ``icecream`` package with flavored traces, configuration hierarchies, customized outputs, ready-made recipes, and more.
|
|
234
|
+
* `python-mimeogram <https://github.com/emcd/python-mimeogram>`_ (`mimeogram <https://pypi.org/project/mimeogram/>`_ on PyPI)
|
|
235
|
+
|
|
236
|
+
📨 A command-line tool for **exchanging collections of files with Large Language Models** - bundle multiple files into a single clipboard-ready document while preserving directory structure and metadata... good for code reviews, project sharing, and LLM interactions.
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# vim: set filetype=toml fileencoding=utf-8:
|
|
2
|
+
# -*- mode: toml ; coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
[build-system]
|
|
5
|
+
requires = [
|
|
6
|
+
'hatchling',
|
|
7
|
+
]
|
|
8
|
+
build-backend = 'hatchling.build'
|
|
9
|
+
|
|
10
|
+
[project]
|
|
11
|
+
name = 'frigid'
|
|
12
|
+
description = 'Immutable data structures.'
|
|
13
|
+
dynamic = [ 'version' ]
|
|
14
|
+
license = 'Apache-2.0'
|
|
15
|
+
readme = { 'file' = 'README.rst', 'content-type' = 'text/x-rst' }
|
|
16
|
+
requires-python = '>= 3.10'
|
|
17
|
+
dependencies = [
|
|
18
|
+
'absence~=1.1',
|
|
19
|
+
'classcore~=1.2',
|
|
20
|
+
'dynadoc~=1.2',
|
|
21
|
+
'typing-extensions',
|
|
22
|
+
# --- BEGIN: Injected by Copier ---
|
|
23
|
+
# --- END: Injected by Copier ---
|
|
24
|
+
]
|
|
25
|
+
classifiers = [ # https://pypi.org/classifiers
|
|
26
|
+
'Development Status :: 5 - Production/Stable',
|
|
27
|
+
'Intended Audience :: Developers',
|
|
28
|
+
'License :: OSI Approved :: Apache Software License',
|
|
29
|
+
'Programming Language :: Python :: 3 :: Only',
|
|
30
|
+
# --- BEGIN: Injected by Copier ---
|
|
31
|
+
'Programming Language :: Python :: 3.10',
|
|
32
|
+
'Programming Language :: Python :: 3.11',
|
|
33
|
+
'Programming Language :: Python :: 3.12',
|
|
34
|
+
'Programming Language :: Python :: 3.13',
|
|
35
|
+
'Programming Language :: Python :: Implementation :: CPython',
|
|
36
|
+
'Programming Language :: Python :: Implementation :: PyPy',
|
|
37
|
+
# --- END: Injected by Copier ---
|
|
38
|
+
'Topic :: Software Development',
|
|
39
|
+
]
|
|
40
|
+
keywords = ['api', 'dictionary', 'namespace', 'immutable', 'immutability']
|
|
41
|
+
[[project.authors]]
|
|
42
|
+
name = 'Eric McDonald'
|
|
43
|
+
email = 'emcd@users.noreply.github.com'
|
|
44
|
+
[project.urls]
|
|
45
|
+
'Homepage' = 'https://github.com/emcd/python-frigid'
|
|
46
|
+
'Documentation' = 'https://emcd.github.io/python-frigid'
|
|
47
|
+
'Download' = 'https://pypi.org/project/frigid/#files'
|
|
48
|
+
'Source Code' = 'https://github.com/emcd/python-frigid'
|
|
49
|
+
'Issue Tracker' = 'https://github.com/emcd/python-frigid/issues'
|
|
50
|
+
|
|
51
|
+
[tool.SELF]
|
|
52
|
+
year-of-origin = 2024
|
|
53
|
+
|
|
54
|
+
# https://coverage.readthedocs.io/en/latest/config.html
|
|
55
|
+
[tool.coverage.paths]
|
|
56
|
+
gha-runners = [
|
|
57
|
+
'/home/runner/work/python-frigid/python-frigid/',
|
|
58
|
+
'/Users/runner/work/python-frigid/python-frigid/',
|
|
59
|
+
'C:\a\python-frigid\python-frigid\',
|
|
60
|
+
'D:\a\python-frigid\python-frigid\',
|
|
61
|
+
]
|
|
62
|
+
[tool.coverage.run]
|
|
63
|
+
branch = true
|
|
64
|
+
command_line = '-m pytest' # TODO? '--fail-under'
|
|
65
|
+
data_file = '.auxiliary/caches/pytest/coverage.sqlite3'
|
|
66
|
+
parallel = true
|
|
67
|
+
source = [ 'sources' ]
|
|
68
|
+
[tool.coverage.html]
|
|
69
|
+
directory = '.auxiliary/artifacts/coverage-pytest'
|
|
70
|
+
[tool.coverage.xml]
|
|
71
|
+
output = '.auxiliary/artifacts/coverage-pytest/coverage.xml'
|
|
72
|
+
|
|
73
|
+
# https://hatch.pypa.io/latest/config/metadata/
|
|
74
|
+
[tool.hatch.build]
|
|
75
|
+
directory = '.auxiliary/artifacts/hatch-build'
|
|
76
|
+
[tool.hatch.build.targets.sdist]
|
|
77
|
+
only-include = [
|
|
78
|
+
'sources/frigid',
|
|
79
|
+
# --- BEGIN: Injected by Copier ---
|
|
80
|
+
# --- END: Injected by Copier ---
|
|
81
|
+
]
|
|
82
|
+
strict-naming = false
|
|
83
|
+
[tool.hatch.build.targets.wheel]
|
|
84
|
+
only-include = [
|
|
85
|
+
'sources/frigid',
|
|
86
|
+
# --- BEGIN: Injected by Copier ---
|
|
87
|
+
# --- END: Injected by Copier ---
|
|
88
|
+
]
|
|
89
|
+
strict-naming = false
|
|
90
|
+
[tool.hatch.build.targets.wheel.sources]
|
|
91
|
+
'sources/frigid' = 'frigid'
|
|
92
|
+
# --- BEGIN: Injected by Copier ---
|
|
93
|
+
# --- END: Injected by Copier ---
|
|
94
|
+
[tool.hatch.envs.default]
|
|
95
|
+
python = '3.10'
|
|
96
|
+
[tool.hatch.envs.develop]
|
|
97
|
+
description = ''' Development environment. '''
|
|
98
|
+
dependencies = [
|
|
99
|
+
'Jinja2',
|
|
100
|
+
'coverage[toml]',
|
|
101
|
+
'furo',
|
|
102
|
+
'packaging',
|
|
103
|
+
'pre-commit',
|
|
104
|
+
'pyright',
|
|
105
|
+
'pytest',
|
|
106
|
+
'ruff',
|
|
107
|
+
'sphinx',
|
|
108
|
+
'sphinx-copybutton',
|
|
109
|
+
'sphinx-inline-tabs',
|
|
110
|
+
'towncrier',
|
|
111
|
+
# --- BEGIN: Injected by Copier ---
|
|
112
|
+
# --- END: Injected by Copier ---
|
|
113
|
+
]
|
|
114
|
+
post-install-commands = [
|
|
115
|
+
# --- BEGIN: Injected by Copier ---
|
|
116
|
+
# --- END: Injected by Copier ---
|
|
117
|
+
]
|
|
118
|
+
[tool.hatch.envs.develop.env-vars]
|
|
119
|
+
PYTHONUNBUFFERED = 'TRUE' # TODO: Only for coverage/pytest.
|
|
120
|
+
# --- BEGIN: Injected by Copier ---
|
|
121
|
+
# --- END: Injected by Copier ---
|
|
122
|
+
[tool.hatch.envs.develop.scripts]
|
|
123
|
+
docsgen = [
|
|
124
|
+
"""sphinx-build -E -b linkcheck -d .auxiliary/caches/sphinx \
|
|
125
|
+
documentation .auxiliary/artifacts/sphinx-linkcheck""",
|
|
126
|
+
"""sphinx-build -a -d .auxiliary/caches/sphinx \
|
|
127
|
+
documentation .auxiliary/artifacts/sphinx-html""",
|
|
128
|
+
]
|
|
129
|
+
linters = [
|
|
130
|
+
"""ruff check --quiet sources documentation tests""",
|
|
131
|
+
# --- BEGIN: Injected by Copier ---
|
|
132
|
+
# --- END: Injected by Copier ---
|
|
133
|
+
"""pyright sources""",
|
|
134
|
+
]
|
|
135
|
+
packagers = [
|
|
136
|
+
"""hatch build""",
|
|
137
|
+
# --- BEGIN: Injected by Copier ---
|
|
138
|
+
# --- END: Injected by Copier ---
|
|
139
|
+
]
|
|
140
|
+
testers-no-reports = [
|
|
141
|
+
'coverage erase',
|
|
142
|
+
'coverage run',
|
|
143
|
+
"""coverage run -m sphinx.cmd.build \
|
|
144
|
+
-E -b doctest -d .auxiliary/caches/sphinx \
|
|
145
|
+
documentation .auxiliary/artifacts/sphinx-doctest""",
|
|
146
|
+
]
|
|
147
|
+
testers = [
|
|
148
|
+
'testers-no-reports',
|
|
149
|
+
'coverage combine',
|
|
150
|
+
'coverage report --skip-covered',
|
|
151
|
+
'coverage html',
|
|
152
|
+
'coverage xml',
|
|
153
|
+
]
|
|
154
|
+
make-all = [
|
|
155
|
+
'linters',
|
|
156
|
+
'testers',
|
|
157
|
+
'packagers',
|
|
158
|
+
'docsgen',
|
|
159
|
+
]
|
|
160
|
+
[tool.hatch.envs.qa]
|
|
161
|
+
description = ''' Quality assurance environment. '''
|
|
162
|
+
template = 'develop'
|
|
163
|
+
[[tool.hatch.envs.qa.matrix]]
|
|
164
|
+
python = [
|
|
165
|
+
'3.10',
|
|
166
|
+
'3.11',
|
|
167
|
+
'3.12',
|
|
168
|
+
'3.13',
|
|
169
|
+
'pypy3.10',
|
|
170
|
+
]
|
|
171
|
+
[tool.hatch.version]
|
|
172
|
+
path = 'sources/frigid/__init__.py'
|
|
173
|
+
|
|
174
|
+
# https://mypy.readthedocs.io/en/stable/config_file.html
|
|
175
|
+
[tool.mypy]
|
|
176
|
+
# Note: Due to repeated painful experiences with Mypy, we use Pyright instead.
|
|
177
|
+
# Pyright properly handles TypeVars, etc...
|
|
178
|
+
cache_dir = '.auxiliary/caches/mypy'
|
|
179
|
+
exclude = [ '.*' ] # Ignore everything
|
|
180
|
+
ignore_errors = true
|
|
181
|
+
follow_imports = 'skip'
|
|
182
|
+
pretty = true
|
|
183
|
+
strict = false
|
|
184
|
+
|
|
185
|
+
# https://microsoft.github.io/pyright/#/configuration
|
|
186
|
+
[tool.pyright]
|
|
187
|
+
ignore = [ 'documentation', 'tests' ] # Stronger hint for language server.
|
|
188
|
+
include = [ 'sources' ]
|
|
189
|
+
reportConstantRedefinition = true
|
|
190
|
+
reportInvalidTypeVarUse = true
|
|
191
|
+
reportMatchNotExhaustive = true
|
|
192
|
+
reportMissingImports = true
|
|
193
|
+
reportMissingTypeStubs = true
|
|
194
|
+
reportMissingTypeArgument = true
|
|
195
|
+
reportPossiblyUnboundVariable = false # Covered by other linters.
|
|
196
|
+
reportPrivateImportUsage = false # Covered by other linters.
|
|
197
|
+
reportPrivateUsage = false # Covered by other linters.
|
|
198
|
+
reportSelfClsParameterName = false # Too opinionated.
|
|
199
|
+
reportUnknownArgumentType = true
|
|
200
|
+
reportUnknownLambdaType = true
|
|
201
|
+
reportUnknownMemberType = true
|
|
202
|
+
reportUnknownParameterType = true
|
|
203
|
+
reportUnknownVariableType = true
|
|
204
|
+
reportUnnecessaryCast = true
|
|
205
|
+
reportUnnecessaryComparison = true
|
|
206
|
+
reportUntypedBaseClass = true
|
|
207
|
+
reportUntypedClassDecorator = true
|
|
208
|
+
reportUntypedFunctionDecorator = true
|
|
209
|
+
reportUntypedNamedTuple = true
|
|
210
|
+
reportUnusedExpression = true
|
|
211
|
+
reportUnusedImport = false # Covered by other linters.
|
|
212
|
+
reportUnusedVariable = false # Covered by other linters.
|
|
213
|
+
#strict = [ 'sources' ]
|
|
214
|
+
stubPath = 'sources/frigid/_typedecls'
|
|
215
|
+
|
|
216
|
+
[tool.pytest.ini_options]
|
|
217
|
+
# Note: Cannot run doctests from Pytest, because Pytest tries to update '_'
|
|
218
|
+
# attribute on protected modules. Instead, we use Sphinx to run doctests.
|
|
219
|
+
minversion = '8.1'
|
|
220
|
+
addopts = '--capture=no --exitfirst -rfE'
|
|
221
|
+
testpaths = [ 'tests' ]
|
|
222
|
+
python_files = [ 'test_*.py' ]
|
|
223
|
+
python_functions = [ 'test_[0-9][0-9][0-9]_*' ]
|
|
224
|
+
cache_dir = '.auxiliary/caches/pytest'
|
|
225
|
+
filterwarnings = [ 'ignore::DeprecationWarning' ]
|
|
226
|
+
|
|
227
|
+
[tool.ruff]
|
|
228
|
+
#builtins = [ 'ic' ]
|
|
229
|
+
cache-dir = '.auxiliary/caches/ruff'
|
|
230
|
+
indent-width = 4
|
|
231
|
+
line-length = 79
|
|
232
|
+
[tool.ruff.lint]
|
|
233
|
+
dummy-variable-rgx = '^_$'
|
|
234
|
+
ignore = [
|
|
235
|
+
'E701', # multiple-statements-on-one-line-colon
|
|
236
|
+
'PLC0415', # import-outside-top-level
|
|
237
|
+
'SIM300', # yoda-condition: scarred by assignment expressions, I am
|
|
238
|
+
]
|
|
239
|
+
select = [ # default: E4, E7, E9, F
|
|
240
|
+
'A', # Flake8 builtins rules
|
|
241
|
+
'B006', # mutable-argument-default
|
|
242
|
+
'B008', # function-call-in-default-argument
|
|
243
|
+
'B011', # assert-false
|
|
244
|
+
'B023', # function-uses-loop-variable
|
|
245
|
+
'B904', # raise-without-from-inside-except
|
|
246
|
+
'B909', # PREVIEW: loop-iterator-mutation
|
|
247
|
+
'C90', # McCabe complexity rules
|
|
248
|
+
'E101', # mixed-spaces-and-tabs
|
|
249
|
+
'E111', # PREVIEW: indentation-with-invalid-multiple
|
|
250
|
+
'E112', # PREVIEW: no-indented-block
|
|
251
|
+
'E4', # Pycodestyle import rules
|
|
252
|
+
'E501', # line-too-long
|
|
253
|
+
'E7', # Pycodestyle general rules
|
|
254
|
+
'E9', # Pycodestyle runtime errors
|
|
255
|
+
'F', # Pyflakes rules
|
|
256
|
+
'PERF', # Perflint rules
|
|
257
|
+
'PLC', # Pylint convention rules
|
|
258
|
+
'PLE', # Pylint error rules
|
|
259
|
+
'PLR', # Pylint refactor rules
|
|
260
|
+
'PLW', # Pylint warning rules
|
|
261
|
+
'RET', # Flake8 return rules
|
|
262
|
+
'RUF', # Ruff rules
|
|
263
|
+
'S', # Flake8 Bandit rules
|
|
264
|
+
'SIM', # Flake8 simplify rules
|
|
265
|
+
'SLF', # Flake8 self rules
|
|
266
|
+
'TRY', # Tryceratops rules
|
|
267
|
+
]
|
|
268
|
+
[tool.ruff.lint.mccabe]
|
|
269
|
+
max-complexity = 12
|
|
270
|
+
[tool.ruff.lint.per-file-ignores]
|
|
271
|
+
'__init__.py' = [
|
|
272
|
+
'F401', # unused-import
|
|
273
|
+
'F403', # undefined-local-with-import-star
|
|
274
|
+
'F405', # undefined-local-with-import-star-usage
|
|
275
|
+
]
|
|
276
|
+
'tests/**/*.py' = [
|
|
277
|
+
'PLR0124', # comparison-with-itself
|
|
278
|
+
'PLR0913', # too-many-arguments
|
|
279
|
+
'PLR0915', # too-many-statements
|
|
280
|
+
'PLR1704', # redefined-argument-from-local
|
|
281
|
+
'PLR2004', # magic-value-comparison
|
|
282
|
+
'PLW0129', # assert-on-string-literal
|
|
283
|
+
'PLW0603', # global-statement
|
|
284
|
+
'PLW0642', # self-assignment
|
|
285
|
+
'S101', # assert
|
|
286
|
+
'SLF001', # private-member-accessed
|
|
287
|
+
'TRY', # Tryceratops rules
|
|
288
|
+
]
|
|
289
|
+
[tool.ruff.lint.pylint]
|
|
290
|
+
max-locals = 10
|
|
291
|
+
max-public-methods = 10
|
|
292
|
+
max-statements = 30
|
|
293
|
+
|
|
294
|
+
[tool.towncrier]
|
|
295
|
+
directory = '.auxiliary/data/towncrier'
|
|
296
|
+
filename = 'documentation/changelog.rst'
|
|
297
|
+
package = 'frigid'
|
|
298
|
+
package_dir = 'sources'
|
|
299
|
+
[[tool.towncrier.type]]
|
|
300
|
+
# features and other improvements
|
|
301
|
+
directory = 'enhance'
|
|
302
|
+
name = 'Enhancements'
|
|
303
|
+
showcontent = true
|
|
304
|
+
[[tool.towncrier.type]]
|
|
305
|
+
# deprecations and other notices
|
|
306
|
+
directory = 'notify'
|
|
307
|
+
name = 'Notices'
|
|
308
|
+
showcontent = true
|
|
309
|
+
[[tool.towncrier.type]]
|
|
310
|
+
# removals of feature or platform support
|
|
311
|
+
directory = 'remove'
|
|
312
|
+
name = 'Removals'
|
|
313
|
+
showcontent = true
|
|
314
|
+
[[tool.towncrier.type]]
|
|
315
|
+
# bug fixes
|
|
316
|
+
directory = 'repair'
|
|
317
|
+
name = 'Repairs'
|
|
318
|
+
showcontent = true
|
|
@@ -21,11 +21,19 @@
|
|
|
21
21
|
''' Common constants, imports, and utilities. '''
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
# Expose everything from internal modules.
|
|
25
|
-
from .docstrings import * # Managed by Copier.
|
|
26
24
|
from .dictionaries import *
|
|
27
|
-
from .
|
|
25
|
+
from .doctab import *
|
|
28
26
|
from .imports import *
|
|
27
|
+
from .nomina import *
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
dynadoc_introspection_limiter = (
|
|
31
|
+
ccstd.dynadoc.produce_dynadoc_introspection_limiter(
|
|
32
|
+
attributes_namer = calculate_attrname ) )
|
|
33
|
+
dynadoc_introspection_control_on_class = (
|
|
34
|
+
ccstd.dynadoc.produce_dynadoc_introspection_control(
|
|
35
|
+
limiters = ( dynadoc_introspection_limiter, ) ) )
|
|
36
|
+
dynadoc_introspection_control_on_package = (
|
|
37
|
+
ccstd.dynadoc.produce_dynadoc_introspection_control(
|
|
38
|
+
limiters = ( dynadoc_introspection_limiter, ),
|
|
39
|
+
targets = ddoc.IntrospectionTargetsOmni ) )
|