classcore 1.7__tar.gz → 1.8__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.
- {classcore-1.7 → classcore-1.8}/.gitignore +1 -0
- {classcore-1.7 → classcore-1.8}/PKG-INFO +1 -1
- {classcore-1.7 → classcore-1.8}/pyproject.toml +18 -10
- {classcore-1.7 → classcore-1.8}/sources/classcore/__init__.py +1 -1
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/modules.py +21 -7
- {classcore-1.7 → classcore-1.8}/LICENSE.txt +0 -0
- {classcore-1.7 → classcore-1.8}/README.rst +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/__/__init__.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/__/doctab.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/__/imports.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/__/nomina.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/decorators.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/exceptions.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/factories.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/nomina.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/py.typed +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/__.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/__init__.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/behaviors.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/classes.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/decorators.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/dynadoc.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/standard/nomina.py +0 -0
- {classcore-1.7 → classcore-1.8}/sources/classcore/utilities.py +0 -0
|
@@ -59,7 +59,7 @@ gha-runners = [
|
|
|
59
59
|
]
|
|
60
60
|
[tool.coverage.run]
|
|
61
61
|
branch = true
|
|
62
|
-
command_line = '-m pytest'
|
|
62
|
+
command_line = '-m pytest'
|
|
63
63
|
data_file = '.auxiliary/caches/pytest/coverage.sqlite3'
|
|
64
64
|
parallel = true
|
|
65
65
|
source = [ 'sources' ]
|
|
@@ -120,9 +120,9 @@ PYTHONUNBUFFERED = 'TRUE' # TODO: Only for coverage/pytest.
|
|
|
120
120
|
[tool.hatch.envs.develop.scripts]
|
|
121
121
|
docsgen = [
|
|
122
122
|
"""sphinx-build -E -b linkcheck -d .auxiliary/caches/sphinx \
|
|
123
|
-
|
|
123
|
+
documentation .auxiliary/artifacts/sphinx-linkcheck""",
|
|
124
124
|
"""sphinx-build -a -d .auxiliary/caches/sphinx \
|
|
125
|
-
|
|
125
|
+
documentation .auxiliary/artifacts/sphinx-html""",
|
|
126
126
|
]
|
|
127
127
|
linters = [
|
|
128
128
|
"""ruff check --quiet sources documentation tests""",
|
|
@@ -135,14 +135,19 @@ packagers = [
|
|
|
135
135
|
# --- BEGIN: Injected by Copier ---
|
|
136
136
|
# --- END: Injected by Copier ---
|
|
137
137
|
]
|
|
138
|
+
testers-documentation = [
|
|
139
|
+
"""coverage run -m sphinx.cmd.build \
|
|
140
|
+
-E -b doctest -d .auxiliary/caches/sphinx \
|
|
141
|
+
documentation .auxiliary/artifacts/sphinx-doctest""",
|
|
142
|
+
]
|
|
143
|
+
testers-serotine = [ """coverage run -m pytest -m slow""" ]
|
|
138
144
|
testers-no-reports = [
|
|
139
|
-
'coverage erase',
|
|
140
145
|
'coverage run',
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
documentation .auxiliary/artifacts/sphinx-doctest""",
|
|
146
|
+
'testers-documentation',
|
|
147
|
+
'testers-serotine',
|
|
144
148
|
]
|
|
145
149
|
testers = [
|
|
150
|
+
'coverage erase',
|
|
146
151
|
'testers-no-reports',
|
|
147
152
|
'coverage combine',
|
|
148
153
|
'coverage report --skip-covered',
|
|
@@ -184,8 +189,8 @@ strict = false
|
|
|
184
189
|
|
|
185
190
|
# https://microsoft.github.io/pyright/#/configuration
|
|
186
191
|
[tool.pyright]
|
|
187
|
-
ignore = [ 'documentation', 'tests' ] #
|
|
188
|
-
include = [ 'sources' ]
|
|
192
|
+
ignore = [ '.auxiliary', 'documentation', 'tests' ] # Ignore diagnostics.
|
|
193
|
+
include = [ 'sources', 'tests' ] # Consider for operations.
|
|
189
194
|
reportConstantRedefinition = true
|
|
190
195
|
reportInvalidTypeVarUse = true
|
|
191
196
|
reportMatchNotExhaustive = true
|
|
@@ -217,11 +222,14 @@ stubPath = 'sources/classcore/_typedecls'
|
|
|
217
222
|
# Note: Cannot run doctests from Pytest, because Pytest tries to update '_'
|
|
218
223
|
# attribute on protected modules. Instead, we use Sphinx to run doctests.
|
|
219
224
|
minversion = '8.1'
|
|
220
|
-
addopts =
|
|
225
|
+
addopts = """--capture=no --exitfirst -rfE -m 'not slow'""" # TODO? '--fail-under'
|
|
221
226
|
testpaths = [ 'tests' ]
|
|
222
227
|
python_files = [ 'test_*.py' ]
|
|
223
228
|
python_functions = [ 'test_[0-9][0-9][0-9]_*' ]
|
|
224
229
|
cache_dir = '.auxiliary/caches/pytest'
|
|
230
|
+
markers = [
|
|
231
|
+
"slow: long-running tests",
|
|
232
|
+
]
|
|
225
233
|
|
|
226
234
|
[tool.ruff]
|
|
227
235
|
#builtins = [ 'ic' ]
|
|
@@ -42,6 +42,10 @@ def finalize_module( # noqa: PLR0913
|
|
|
42
42
|
dynadoc_introspection: _nomina.DynadocIntrospectionArgument = (
|
|
43
43
|
_dynadoc.dynadoc_introspection_on_package ),
|
|
44
44
|
dynadoc_table: _nomina.DynadocTableArgument = __.dictproxy_empty,
|
|
45
|
+
excludes: __.typx.Annotated[
|
|
46
|
+
__.typx.Optional[ __.cabc.MutableSet[ __.types.ModuleType ] ],
|
|
47
|
+
__.ddoc.Doc( ''' Modules to exclude from reclassification. ''' ),
|
|
48
|
+
] = None,
|
|
45
49
|
recursive: __.typx.Annotated[
|
|
46
50
|
bool, __.ddoc.Doc( ''' Recursively reclassify package modules? ''' )
|
|
47
51
|
] = False,
|
|
@@ -84,7 +88,7 @@ def finalize_module( # noqa: PLR0913
|
|
|
84
88
|
_reclassify_module(
|
|
85
89
|
module,
|
|
86
90
|
attributes_namer = attributes_namer,
|
|
87
|
-
recursive = recursive,
|
|
91
|
+
excludes = excludes, recursive = recursive,
|
|
88
92
|
replacement_class = replacement_class )
|
|
89
93
|
|
|
90
94
|
|
|
@@ -100,6 +104,10 @@ def reclassify_modules(
|
|
|
100
104
|
__.ddoc.Doc(
|
|
101
105
|
''' Attributes namer function with which to seal class. ''' ),
|
|
102
106
|
] = __.calculate_attrname,
|
|
107
|
+
excludes: __.typx.Annotated[
|
|
108
|
+
__.typx.Optional[ __.cabc.MutableSet[ __.types.ModuleType ] ],
|
|
109
|
+
__.ddoc.Doc( ''' Modules to exclude from reclassification. ''' ),
|
|
110
|
+
] = None,
|
|
103
111
|
recursive: __.typx.Annotated[
|
|
104
112
|
bool, __.ddoc.Doc( ''' Recursively reclassify package modules? ''' )
|
|
105
113
|
] = False,
|
|
@@ -123,11 +131,11 @@ def reclassify_modules(
|
|
|
123
131
|
_reclassify_module(
|
|
124
132
|
attributes,
|
|
125
133
|
attributes_namer = attributes_namer,
|
|
126
|
-
recursive = recursive,
|
|
134
|
+
excludes = excludes, recursive = recursive,
|
|
127
135
|
replacement_class = replacement_class )
|
|
128
136
|
|
|
129
137
|
|
|
130
|
-
def _reclassify_module(
|
|
138
|
+
def _reclassify_module( # noqa: C901,PLR0912
|
|
131
139
|
attributes: __.typx.Annotated[
|
|
132
140
|
__.cabc.Mapping[ str, __.typx.Any ] | __.types.ModuleType | str,
|
|
133
141
|
__.ddoc.Doc(
|
|
@@ -138,6 +146,10 @@ def _reclassify_module(
|
|
|
138
146
|
__.ddoc.Doc(
|
|
139
147
|
''' Attributes namer function with which to seal class. ''' ),
|
|
140
148
|
] = __.calculate_attrname,
|
|
149
|
+
excludes: __.typx.Annotated[
|
|
150
|
+
__.typx.Optional[ __.cabc.MutableSet[ __.types.ModuleType ] ],
|
|
151
|
+
__.ddoc.Doc( ''' Modules to exclude from reclassification. ''' ),
|
|
152
|
+
] = None,
|
|
141
153
|
recursive: __.typx.Annotated[
|
|
142
154
|
bool, __.ddoc.Doc( ''' Recursively reclassify package modules? ''' )
|
|
143
155
|
] = False,
|
|
@@ -164,22 +176,24 @@ def _reclassify_module(
|
|
|
164
176
|
attributes = __.sys.modules[ attributes ]
|
|
165
177
|
if isinstance( attributes, __.types.ModuleType ):
|
|
166
178
|
module = attributes
|
|
167
|
-
|
|
179
|
+
if excludes and module in excludes: return
|
|
180
|
+
attributes = module.__dict__
|
|
168
181
|
else: module = None
|
|
182
|
+
if excludes is None: excludes = set( )
|
|
183
|
+
if module: excludes.add( module )
|
|
169
184
|
package_name = (
|
|
170
185
|
attributes.get( '__package__' ) or attributes.get( '__name__' ) )
|
|
171
186
|
if not package_name: return
|
|
172
187
|
for value in attributes.values( ):
|
|
173
188
|
if not __.inspect.ismodule( value ): continue
|
|
174
189
|
if not value.__name__.startswith( f"{package_name}." ): continue
|
|
190
|
+
if isinstance( value, replacement_class ): continue
|
|
175
191
|
if recursive:
|
|
176
192
|
_reclassify_module(
|
|
177
193
|
value,
|
|
178
194
|
attributes_namer = attributes_namer,
|
|
179
|
-
recursive = True,
|
|
195
|
+
excludes = excludes, recursive = True,
|
|
180
196
|
replacement_class = replacement_class )
|
|
181
|
-
if isinstance( value, replacement_class ): continue
|
|
182
|
-
_seal_module( value, attributes_namer, replacement_class )
|
|
183
197
|
if module and not isinstance( module, replacement_class ):
|
|
184
198
|
_seal_module( module, attributes_namer, replacement_class )
|
|
185
199
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|