omdev 0.0.0.dev424__py3-none-any.whl → 0.0.0.dev426__py3-none-any.whl
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.
- omdev/{.manifests.json → .omlish-manifests.json} +1 -13
- omdev/ci/cache.py +4 -1
- omdev/ci/cli.py +4 -1
- omdev/ci/docker/cacheserved/cache.py +4 -1
- omdev/ci/docker/packing.py +1 -1
- omdev/ci/github/api/clients.py +4 -1
- omdev/ci/github/api/v1/client.py +4 -1
- omdev/ci/github/api/v2/azure.py +4 -1
- omdev/ci/github/api/v2/client.py +4 -1
- omdev/imgur.py +2 -2
- omdev/interp/providers/standalone.py +4 -1
- omdev/manifests/_dumping.py +1 -8
- omdev/manifests/building.py +6 -3
- omdev/packaging/revisions.py +4 -1
- omdev/ptk/markdown/utils.py +1 -1
- omdev/py/attrdocs.py +3 -3
- omdev/py/docstrings/numpydoc.py +4 -4
- omdev/py/tools/mkrelimp.py +1 -1
- omdev/pyproject/pkg.py +5 -2
- omdev/pyproject/reqs.py +4 -1
- omdev/pyproject/venvs.py +4 -1
- omdev/scripts/ci.py +4469 -4325
- omdev/scripts/interp.py +20 -24
- omdev/scripts/pyproject.py +44 -32
- omdev/tools/json/processing.py +1 -1
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/RECORD +31 -36
- omdev/tools/antlr/__init__.py +0 -0
- omdev/tools/antlr/__main__.py +0 -11
- omdev/tools/antlr/cli.py +0 -62
- omdev/tools/antlr/consts.py +0 -7
- omdev/tools/antlr/gen.py +0 -188
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev424.dist-info → omdev-0.0.0.dev426.dist-info}/top_level.txt +0 -0
@@ -73,7 +73,7 @@
|
|
73
73
|
},
|
74
74
|
{
|
75
75
|
"module": ".imgur",
|
76
|
-
"attr": "
|
76
|
+
"attr": "_CLI_MODULE",
|
77
77
|
"file": "omdev/imgur.py",
|
78
78
|
"line": 136,
|
79
79
|
"value": {
|
@@ -328,18 +328,6 @@
|
|
328
328
|
}
|
329
329
|
}
|
330
330
|
},
|
331
|
-
{
|
332
|
-
"module": ".tools.antlr.__main__",
|
333
|
-
"attr": "_CLI_MODULE",
|
334
|
-
"file": "omdev/tools/antlr/__main__.py",
|
335
|
-
"line": 4,
|
336
|
-
"value": {
|
337
|
-
"!.cli.types.CliModule": {
|
338
|
-
"name": "antlr",
|
339
|
-
"module": "omdev.tools.antlr.__main__"
|
340
|
-
}
|
341
|
-
}
|
342
|
-
},
|
343
331
|
{
|
344
332
|
"module": ".tools.cloc",
|
345
333
|
"attr": "_CLI_MODULE",
|
omdev/ci/cache.py
CHANGED
@@ -18,7 +18,7 @@ import urllib.request
|
|
18
18
|
from omlish.lite.abstract import Abstract
|
19
19
|
from omlish.lite.cached import cached_nullary
|
20
20
|
from omlish.lite.check import check
|
21
|
-
from omlish.
|
21
|
+
from omlish.logs.modules import get_module_logger
|
22
22
|
from omlish.os.temp import make_temp_file
|
23
23
|
|
24
24
|
from .consts import CI_CACHE_VERSION
|
@@ -27,6 +27,9 @@ from .consts import CI_CACHE_VERSION
|
|
27
27
|
CacheVersion = ta.NewType('CacheVersion', int)
|
28
28
|
|
29
29
|
|
30
|
+
log = get_module_logger(globals()) # noqa
|
31
|
+
|
32
|
+
|
30
33
|
##
|
31
34
|
|
32
35
|
|
omdev/ci/cli.py
CHANGED
@@ -22,7 +22,7 @@ from omlish.argparse.cli import argparse_arg
|
|
22
22
|
from omlish.argparse.cli import argparse_cmd
|
23
23
|
from omlish.lite.check import check
|
24
24
|
from omlish.lite.inject import inj
|
25
|
-
from omlish.
|
25
|
+
from omlish.logs.modules import get_module_logger
|
26
26
|
from omlish.logs.standard import configure_standard_logging
|
27
27
|
|
28
28
|
from .cache import DirectoryFileCache
|
@@ -35,6 +35,9 @@ from .requirements import build_requirements_hash
|
|
35
35
|
from .shell import ShellCmd
|
36
36
|
|
37
37
|
|
38
|
+
log = get_module_logger(globals()) # noqa
|
39
|
+
|
40
|
+
|
38
41
|
##
|
39
42
|
|
40
43
|
|
@@ -10,11 +10,11 @@ from omlish.asyncs.asyncio.sockets import asyncio_wait_until_can_connect
|
|
10
10
|
from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
|
11
11
|
from omlish.lite.check import check
|
12
12
|
from omlish.lite.json import json_dumps_compact
|
13
|
-
from omlish.lite.logs import log
|
14
13
|
from omlish.lite.marshal import marshal_obj
|
15
14
|
from omlish.lite.marshal import unmarshal_obj
|
16
15
|
from omlish.lite.timeouts import Timeout
|
17
16
|
from omlish.lite.timeouts import TimeoutLike
|
17
|
+
from omlish.logs.modules import get_module_logger
|
18
18
|
|
19
19
|
from ....dataserver.server import DataServer
|
20
20
|
from ....dataserver.targets import DataServerTarget
|
@@ -35,6 +35,9 @@ from .manifests import build_cache_served_docker_image_data_server_routes
|
|
35
35
|
from .manifests import build_cache_served_docker_image_manifest
|
36
36
|
|
37
37
|
|
38
|
+
log = get_module_logger(globals()) # noqa
|
39
|
+
|
40
|
+
|
38
41
|
##
|
39
42
|
|
40
43
|
|
omdev/ci/docker/packing.py
CHANGED
@@ -8,7 +8,7 @@ from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
|
|
8
8
|
from omlish.lite.cached import async_cached_nullary
|
9
9
|
from omlish.lite.cached import cached_nullary
|
10
10
|
from omlish.lite.contextmanagers import ExitStacked
|
11
|
-
from omlish.logs.
|
11
|
+
from omlish.logs.utils import log_timing_context
|
12
12
|
from omlish.os.temp import temp_dir_context
|
13
13
|
|
14
14
|
from ...oci.building import BuiltOciImageIndexRepository
|
omdev/ci/github/api/clients.py
CHANGED
@@ -15,13 +15,16 @@ from omlish.http.urllib import NonRaisingUrllibErrorProcessor
|
|
15
15
|
from omlish.lite.abstract import Abstract
|
16
16
|
from omlish.lite.check import check
|
17
17
|
from omlish.lite.json import json_dumps_compact
|
18
|
-
from omlish.lite.logs import log
|
19
18
|
from omlish.lite.timing import log_timing_context
|
19
|
+
from omlish.logs.modules import get_module_logger
|
20
20
|
|
21
21
|
from ...consts import CI_CACHE_VERSION
|
22
22
|
from ..env import register_github_env_var
|
23
23
|
|
24
24
|
|
25
|
+
log = get_module_logger(globals()) # noqa
|
26
|
+
|
27
|
+
|
25
28
|
##
|
26
29
|
|
27
30
|
|
omdev/ci/github/api/v1/client.py
CHANGED
@@ -6,8 +6,8 @@ import urllib.parse
|
|
6
6
|
import urllib.request
|
7
7
|
|
8
8
|
from omlish.lite.check import check
|
9
|
-
from omlish.lite.logs import log
|
10
9
|
from omlish.lite.timing import log_timing_context
|
10
|
+
from omlish.logs.modules import get_module_logger
|
11
11
|
|
12
12
|
from ...env import register_github_env_var
|
13
13
|
from ..clients import BaseGithubCacheClient
|
@@ -15,6 +15,9 @@ from ..clients import GithubCacheClient
|
|
15
15
|
from .api import GithubCacheServiceV1
|
16
16
|
|
17
17
|
|
18
|
+
log = get_module_logger(globals()) # noqa
|
19
|
+
|
20
|
+
|
18
21
|
##
|
19
22
|
|
20
23
|
|
omdev/ci/github/api/v2/azure.py
CHANGED
@@ -13,8 +13,11 @@ import xml.etree.ElementTree as ET
|
|
13
13
|
|
14
14
|
from omlish.asyncs.asyncio.utils import asyncio_wait_concurrent
|
15
15
|
from omlish.lite.check import check
|
16
|
-
from omlish.lite.logs import log
|
17
16
|
from omlish.lite.timing import log_timing_context
|
17
|
+
from omlish.logs.modules import get_module_logger
|
18
|
+
|
19
|
+
|
20
|
+
log = get_module_logger(globals()) # noqa
|
18
21
|
|
19
22
|
|
20
23
|
##
|
omdev/ci/github/api/v2/client.py
CHANGED
@@ -5,8 +5,8 @@ import typing as ta
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
from omlish.lite.check import check
|
8
|
-
from omlish.lite.logs import log
|
9
8
|
from omlish.lite.timing import log_timing_context
|
9
|
+
from omlish.logs.modules import get_module_logger
|
10
10
|
|
11
11
|
from ...env import register_github_env_var
|
12
12
|
from ..clients import BaseGithubCacheClient
|
@@ -17,6 +17,9 @@ from .api import GithubCacheServiceV2ResponseT
|
|
17
17
|
from .azure import AzureBlockBlobUploader
|
18
18
|
|
19
19
|
|
20
|
+
log = get_module_logger(globals()) # noqa
|
21
|
+
|
22
|
+
|
20
23
|
##
|
21
24
|
|
22
25
|
|
omdev/imgur.py
CHANGED
@@ -130,11 +130,11 @@ def _main() -> None:
|
|
130
130
|
|
131
131
|
print(resp.data.link)
|
132
132
|
|
133
|
-
Cli()(exit=True)
|
133
|
+
Cli()(exit=True) # noqa
|
134
134
|
|
135
135
|
|
136
136
|
# @omlish-manifest
|
137
|
-
|
137
|
+
_CLI_MODULE = CliModule('imgur', __name__)
|
138
138
|
|
139
139
|
|
140
140
|
if __name__ == '__main__':
|
@@ -33,7 +33,10 @@ import urllib.request
|
|
33
33
|
|
34
34
|
from omlish.lite.cached import cached_nullary
|
35
35
|
from omlish.lite.check import check
|
36
|
-
from omlish.
|
36
|
+
from omlish.logs.modules import get_module_logger
|
37
|
+
|
38
|
+
|
39
|
+
log = get_module_logger(globals()) # noqa
|
37
40
|
|
38
41
|
|
39
42
|
##
|
omdev/manifests/_dumping.py
CHANGED
@@ -188,7 +188,7 @@ class _AbstractCachedNullary:
|
|
188
188
|
def __call__(self, *args, **kwargs): # noqa
|
189
189
|
raise TypeError
|
190
190
|
|
191
|
-
def __get__(self, instance, owner): # noqa
|
191
|
+
def __get__(self, instance, owner=None): # noqa
|
192
192
|
bound = instance.__dict__[self._fn.__name__] = self.__class__(self._fn.__get__(instance, owner))
|
193
193
|
return bound
|
194
194
|
|
@@ -963,13 +963,6 @@ def split_keep_delimiter(s, d):
|
|
963
963
|
##
|
964
964
|
|
965
965
|
|
966
|
-
def attr_repr(obj: ta.Any, *attrs: str) -> str:
|
967
|
-
return f'{type(obj).__name__}({", ".join(f"{attr}={getattr(obj, attr)!r}" for attr in attrs)})'
|
968
|
-
|
969
|
-
|
970
|
-
##
|
971
|
-
|
972
|
-
|
973
966
|
FORMAT_NUM_BYTES_SUFFIXES: ta.Sequence[str] = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB']
|
974
967
|
|
975
968
|
|
omdev/manifests/building.py
CHANGED
@@ -39,7 +39,7 @@ from omlish.lite.cached import cached_nullary
|
|
39
39
|
from omlish.lite.check import check
|
40
40
|
from omlish.lite.imports import import_attr
|
41
41
|
from omlish.lite.json import json_dumps_pretty
|
42
|
-
from omlish.
|
42
|
+
from omlish.logs.modules import get_module_logger
|
43
43
|
from omlish.manifests.base import ModAttrManifest
|
44
44
|
from omlish.manifests.globals import GlobalManifestLoader
|
45
45
|
from omlish.manifests.types import Manifest
|
@@ -53,6 +53,9 @@ T = ta.TypeVar('T')
|
|
53
53
|
ManifestDumperTarget = ta.Union['InlineManifestDumperTarget', 'AttrManifestDumperTarget'] # ta.TypeAlias
|
54
54
|
|
55
55
|
|
56
|
+
log = get_module_logger(globals()) # noqa
|
57
|
+
|
58
|
+
|
56
59
|
##
|
57
60
|
|
58
61
|
|
@@ -407,7 +410,7 @@ class ManifestBuilder:
|
|
407
410
|
])))
|
408
411
|
|
409
412
|
if write:
|
410
|
-
with open(os.path.join(pkg_dir, '.manifests.json'), 'w') as f: # noqa
|
413
|
+
with open(os.path.join(pkg_dir, '.omlish-manifests.json'), 'w') as f: # noqa
|
411
414
|
f.write(json_dumps_pretty([dc.asdict(m) for m in manifests]))
|
412
415
|
f.write('\n')
|
413
416
|
|
@@ -425,7 +428,7 @@ def check_package_manifests(
|
|
425
428
|
if not os.path.isdir(pkg_dir) or not os.path.isfile(os.path.join(pkg_dir, '__init__.py')):
|
426
429
|
raise Exception(pkg_dir)
|
427
430
|
|
428
|
-
manifests_file = os.path.join(pkg_dir, '.manifests.json')
|
431
|
+
manifests_file = os.path.join(pkg_dir, '.omlish-manifests.json')
|
429
432
|
if not os.path.isfile(manifests_file):
|
430
433
|
raise Exception(f'No manifests file: {manifests_file}')
|
431
434
|
|
omdev/packaging/revisions.py
CHANGED
@@ -14,13 +14,16 @@ import zipfile
|
|
14
14
|
|
15
15
|
from omlish.lite.cached import cached_nullary
|
16
16
|
from omlish.lite.check import check
|
17
|
-
from omlish.
|
17
|
+
from omlish.logs.modules import get_module_logger
|
18
18
|
from omlish.logs.standard import configure_standard_logging
|
19
19
|
|
20
20
|
from ..git.revisions import get_git_revision
|
21
21
|
from .wheelfile import WheelFile
|
22
22
|
|
23
23
|
|
24
|
+
log = get_module_logger(globals()) # noqa
|
25
|
+
|
26
|
+
|
24
27
|
##
|
25
28
|
|
26
29
|
|
omdev/ptk/markdown/utils.py
CHANGED
@@ -40,7 +40,7 @@ def max_line_width(ft: ptk.StyleAndTextTuples) -> int:
|
|
40
40
|
return max(ptk.fragment_list_width(line) for line in ptk.split_lines(ft))
|
41
41
|
|
42
42
|
|
43
|
-
def fragment_list_to_words(fragments: ptk.StyleAndTextTuples) -> ta.
|
43
|
+
def fragment_list_to_words(fragments: ptk.StyleAndTextTuples) -> ta.Iterator[ptk.OneStyleAndTextTuple]:
|
44
44
|
"""Split formatted text into word fragments."""
|
45
45
|
|
46
46
|
for style, string, *mouse_handler in fragments:
|
omdev/py/attrdocs.py
CHANGED
@@ -24,12 +24,12 @@ class AttrDoc:
|
|
24
24
|
trailing_comment: str | None = None
|
25
25
|
preceding_comment: str | None = None
|
26
26
|
|
27
|
-
__repr__ = lang.
|
27
|
+
__repr__ = lang.attr_ops(
|
28
28
|
'docstring',
|
29
29
|
'trailing_comment',
|
30
30
|
'preceding_comment',
|
31
|
-
|
32
|
-
)
|
31
|
+
repr_filter=bool,
|
32
|
+
).repr
|
33
33
|
|
34
34
|
|
35
35
|
_EMPTY_ATTR_DOC = AttrDoc()
|
omdev/py/docstrings/numpydoc.py
CHANGED
@@ -74,7 +74,7 @@ class Section:
|
|
74
74
|
dashes = '-' * len(self.title)
|
75
75
|
return rf'^({self.title})\s*?\n{dashes}\s*$'
|
76
76
|
|
77
|
-
def parse(self, text: str) -> ta.
|
77
|
+
def parse(self, text: str) -> ta.Iterator[DocstringMeta]:
|
78
78
|
"""
|
79
79
|
Parse ``DocstringMeta`` objects from the body of this section.
|
80
80
|
|
@@ -100,7 +100,7 @@ class _KVSection(Section, abc.ABC):
|
|
100
100
|
def _parse_item(self, key: str, value: str) -> DocstringMeta:
|
101
101
|
raise NotImplementedError
|
102
102
|
|
103
|
-
def parse(self, text: str) -> ta.
|
103
|
+
def parse(self, text: str) -> ta.Iterator[DocstringMeta]:
|
104
104
|
for match, next_match in _pairwise(KV_PAT.finditer(text)):
|
105
105
|
start = match.end()
|
106
106
|
end = next_match.start() if next_match is not None else None
|
@@ -227,7 +227,7 @@ class YieldsSection(ReturnsSection):
|
|
227
227
|
class DeprecationSection(_SphinxSection):
|
228
228
|
"""Parser for numpydoc "deprecation warning" sections."""
|
229
229
|
|
230
|
-
def parse(self, text: str) -> ta.
|
230
|
+
def parse(self, text: str) -> ta.Iterator[DocstringDeprecated]:
|
231
231
|
version, desc, *_ = [*text.split(sep='\n', maxsplit=1), None, None]
|
232
232
|
|
233
233
|
if desc is not None:
|
@@ -254,7 +254,7 @@ class ExamplesSection(Section):
|
|
254
254
|
[ 6586976, 22740995]])
|
255
255
|
"""
|
256
256
|
|
257
|
-
def parse(self, text: str) -> ta.
|
257
|
+
def parse(self, text: str) -> ta.Iterator[DocstringMeta]:
|
258
258
|
"""
|
259
259
|
Parse ``DocstringExample`` objects from the body of this section.
|
260
260
|
|
omdev/py/tools/mkrelimp.py
CHANGED
omdev/pyproject/pkg.py
CHANGED
@@ -38,7 +38,7 @@ import typing as ta
|
|
38
38
|
from omlish.formats.toml.writer import TomlWriter
|
39
39
|
from omlish.lite.abstract import Abstract
|
40
40
|
from omlish.lite.cached import cached_nullary
|
41
|
-
from omlish.
|
41
|
+
from omlish.logs.modules import get_module_logger
|
42
42
|
from omlish.subprocesses.sync import subprocesses
|
43
43
|
|
44
44
|
from ..cexts.magic import CextMagic
|
@@ -46,6 +46,9 @@ from ..magic.find import find_magic_files
|
|
46
46
|
from ..packaging.revisions import GitRevisionAdder
|
47
47
|
|
48
48
|
|
49
|
+
log = get_module_logger(globals()) # noqa
|
50
|
+
|
51
|
+
|
49
52
|
##
|
50
53
|
|
51
54
|
|
@@ -334,7 +337,7 @@ class PyprojectPackageGenerator(BasePyprojectPackageGenerator):
|
|
334
337
|
# '*.c',
|
335
338
|
# '*.cc',
|
336
339
|
# '*.h',
|
337
|
-
# '.manifests.json',
|
340
|
+
# '.omlish-manifests.json',
|
338
341
|
# 'LICENSE',
|
339
342
|
# ],
|
340
343
|
# }
|
omdev/pyproject/reqs.py
CHANGED
omdev/pyproject/venvs.py
CHANGED
@@ -5,7 +5,7 @@ import typing as ta
|
|
5
5
|
|
6
6
|
from omlish.lite.cached import async_cached_nullary
|
7
7
|
from omlish.lite.cached import cached_nullary
|
8
|
-
from omlish.
|
8
|
+
from omlish.logs.modules import get_module_logger
|
9
9
|
|
10
10
|
from ..interp.venvs import InterpVenv
|
11
11
|
from ..interp.venvs import InterpVenvRequirementsProcessor
|
@@ -13,6 +13,9 @@ from .configs import VenvConfig
|
|
13
13
|
from .reqs import RequirementsRewriter
|
14
14
|
|
15
15
|
|
16
|
+
log = get_module_logger(globals()) # noqa
|
17
|
+
|
18
|
+
|
16
19
|
##
|
17
20
|
|
18
21
|
|