omdev 0.0.0.dev416__py3-none-any.whl → 0.0.0.dev500__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.
Potentially problematic release.
This version of omdev might be problematic. Click here for more details.
- omdev/{.manifests.json → .omlish-manifests.json} +23 -47
- omdev/README.md +51 -0
- omdev/__about__.py +12 -8
- omdev/amalg/cli/main.py +1 -2
- omdev/amalg/gen/gen.py +49 -6
- omdev/amalg/gen/imports.py +1 -1
- omdev/amalg/gen/manifests.py +1 -1
- omdev/amalg/gen/resources.py +1 -1
- omdev/amalg/gen/srcfiles.py +26 -3
- omdev/amalg/gen/strip.py +1 -1
- omdev/amalg/gen/types.py +1 -1
- omdev/amalg/gen/typing.py +1 -1
- omdev/amalg/info.py +32 -0
- omdev/cache/compute/storage.py +3 -1
- omdev/cache/data/actions.py +1 -1
- omdev/cache/data/cache.py +2 -2
- omdev/cache/data/specs.py +1 -1
- omdev/cexts/_boilerplate.cc +2 -3
- omdev/cexts/_distutils/build_ext.py +5 -2
- omdev/cexts/_distutils/compilers/ccompiler.py +5 -2
- omdev/cexts/_distutils/compilers/options.py +3 -0
- omdev/cexts/_distutils/compilers/unixccompiler.py +6 -2
- omdev/cexts/_distutils/dir_util.py +6 -2
- omdev/cexts/_distutils/errors.py +3 -0
- omdev/cexts/_distutils/extension.py +3 -0
- omdev/cexts/_distutils/file_util.py +6 -2
- omdev/cexts/_distutils/modified.py +3 -0
- omdev/cexts/_distutils/spawn.py +6 -2
- omdev/cexts/_distutils/sysconfig.py +3 -0
- omdev/cexts/_distutils/util.py +6 -2
- omdev/cexts/_distutils/version.py +3 -0
- omdev/cexts/cmake.py +5 -3
- omdev/cexts/scan.py +1 -2
- omdev/ci/cache.py +7 -3
- omdev/ci/cli.py +6 -4
- omdev/ci/docker/buildcaching.py +3 -1
- omdev/ci/docker/cache.py +2 -1
- omdev/ci/docker/cacheserved/cache.py +4 -1
- omdev/ci/docker/cacheserved/manifests.py +2 -2
- omdev/ci/docker/dataserver.py +2 -2
- omdev/ci/docker/imagepulling.py +2 -1
- omdev/ci/docker/packing.py +1 -1
- omdev/ci/docker/repositories.py +2 -1
- omdev/ci/github/api/clients.py +8 -4
- omdev/ci/github/api/v1/client.py +4 -1
- omdev/ci/github/api/v2/api.py +2 -0
- omdev/ci/github/api/v2/azure.py +4 -1
- omdev/ci/github/api/v2/client.py +4 -1
- omdev/cli/clicli.py +37 -7
- omdev/clipboard/clipboard.py +1 -1
- omdev/cmake.py +2 -1
- omdev/cmdlog/cli.py +1 -2
- omdev/dataclasses/_dumping.py +1960 -0
- omdev/dataclasses/_template.py +22 -0
- omdev/dataclasses/cli.py +7 -2
- omdev/dataclasses/codegen.py +342 -62
- omdev/dataclasses/dumping.py +200 -0
- omdev/dataserver/handlers.py +3 -2
- omdev/dataserver/targets.py +2 -2
- omdev/imgur.py +2 -2
- omdev/interp/cli.py +1 -1
- omdev/interp/inspect.py +2 -1
- omdev/interp/providers/base.py +3 -2
- omdev/interp/providers/standalone.py +4 -1
- omdev/interp/providers/system.py +2 -2
- omdev/interp/pyenv/install.py +2 -1
- omdev/interp/pyenv/provider.py +2 -2
- omdev/interp/types.py +3 -2
- omdev/interp/uv/provider.py +40 -2
- omdev/interp/uv/uv.py +2 -2
- omdev/interp/venvs.py +3 -2
- omdev/irc/messages/base.py +50 -0
- omdev/irc/messages/formats.py +92 -0
- omdev/irc/messages/messages.py +775 -0
- omdev/irc/messages/parsing.py +99 -0
- omdev/irc/numerics/formats.py +97 -0
- omdev/irc/numerics/numerics.py +865 -0
- omdev/irc/numerics/types.py +59 -0
- omdev/irc/protocol/LICENSE +11 -0
- omdev/irc/protocol/__init__.py +61 -0
- omdev/irc/protocol/consts.py +6 -0
- omdev/irc/protocol/errors.py +30 -0
- omdev/irc/protocol/message.py +21 -0
- omdev/irc/protocol/nuh.py +55 -0
- omdev/irc/protocol/parsing.py +158 -0
- omdev/irc/protocol/rendering.py +153 -0
- omdev/irc/protocol/tags.py +102 -0
- omdev/irc/protocol/utils.py +30 -0
- omdev/manifests/_dumping.py +529 -136
- omdev/manifests/building.py +6 -3
- omdev/manifests/main.py +1 -1
- omdev/markdown/__init__.py +0 -0
- omdev/markdown/incparse.py +116 -0
- omdev/markdown/tokens.py +51 -0
- omdev/oci/data.py +2 -2
- omdev/oci/datarefs.py +2 -2
- omdev/oci/media.py +2 -2
- omdev/oci/repositories.py +3 -2
- omdev/packaging/marshal.py +9 -9
- omdev/packaging/requires.py +6 -6
- omdev/packaging/revisions.py +5 -2
- omdev/packaging/specifiers.py +41 -42
- omdev/packaging/versions.py +10 -10
- omdev/packaging/wheelfile.py +4 -2
- omdev/precheck/blanklines.py +66 -0
- omdev/precheck/caches.py +1 -1
- omdev/precheck/imports.py +14 -1
- omdev/precheck/lite.py +2 -2
- omdev/precheck/main.py +5 -5
- omdev/precheck/unicode.py +39 -15
- omdev/py/asts/__init__.py +0 -0
- omdev/py/asts/parents.py +28 -0
- omdev/py/asts/toplevel.py +123 -0
- omdev/py/asts/visitors.py +18 -0
- omdev/py/attrdocs.py +6 -7
- omdev/py/bracepy.py +12 -4
- omdev/py/docstrings/numpydoc.py +4 -4
- omdev/py/reprs.py +32 -0
- omdev/py/scripts/execstat.py +31 -26
- omdev/py/srcheaders.py +1 -1
- omdev/py/tokens/__init__.py +0 -0
- omdev/{tokens → py/tokens}/utils.py +2 -1
- omdev/py/tools/importscan.py +2 -2
- omdev/py/tools/mkrelimp.py +3 -4
- omdev/py/tools/pipdepup.py +686 -0
- omdev/pyproject/cli.py +1 -1
- omdev/pyproject/pkg.py +197 -48
- omdev/pyproject/reqs.py +36 -10
- omdev/pyproject/tools/__init__.py +0 -0
- omdev/pyproject/tools/aboutdeps.py +60 -0
- omdev/pyproject/venvs.py +12 -2
- omdev/rs/__init__.py +0 -0
- omdev/scripts/ci.py +9551 -6982
- omdev/scripts/interp.py +1323 -892
- omdev/scripts/lib/__init__.py +0 -0
- omdev/scripts/lib/inject.py +2086 -0
- omdev/scripts/lib/logs.py +2175 -0
- omdev/scripts/lib/marshal.py +1731 -0
- omdev/scripts/pyproject.py +4979 -1874
- omdev/tools/docker.py +19 -7
- omdev/tools/git/cli.py +56 -16
- omdev/tools/git/messages.py +2 -2
- omdev/tools/json/cli.py +6 -6
- omdev/tools/json/formats.py +2 -0
- omdev/tools/json/parsing.py +5 -5
- omdev/tools/json/processing.py +6 -3
- omdev/tools/json/rendering.py +2 -2
- omdev/tools/jsonview/cli.py +49 -65
- omdev/tools/jsonview/resources/jsonview.html.j2 +43 -0
- omdev/tools/pawk/README.md +195 -0
- omdev/tools/pawk/pawk.py +2 -2
- omdev/tools/pip.py +8 -0
- omdev/tui/__init__.py +0 -0
- omdev/tui/apps/__init__.py +0 -0
- omdev/tui/apps/edit/__init__.py +0 -0
- omdev/tui/apps/edit/main.py +167 -0
- omdev/tui/apps/irc/__init__.py +0 -0
- omdev/tui/apps/irc/__main__.py +4 -0
- omdev/tui/apps/irc/app.py +286 -0
- omdev/tui/apps/irc/client.py +187 -0
- omdev/tui/apps/irc/commands.py +175 -0
- omdev/tui/apps/irc/main.py +26 -0
- omdev/tui/apps/markdown/__init__.py +0 -0
- omdev/tui/apps/markdown/__main__.py +11 -0
- omdev/{ptk → tui/apps}/markdown/cli.py +5 -7
- omdev/tui/rich/__init__.py +46 -0
- omdev/tui/rich/console2.py +20 -0
- omdev/tui/rich/markdown2.py +186 -0
- omdev/tui/textual/__init__.py +265 -0
- omdev/tui/textual/app2.py +16 -0
- omdev/tui/textual/autocomplete/LICENSE +21 -0
- omdev/tui/textual/autocomplete/__init__.py +33 -0
- omdev/tui/textual/autocomplete/matching.py +226 -0
- omdev/tui/textual/autocomplete/paths.py +202 -0
- omdev/tui/textual/autocomplete/widget.py +612 -0
- omdev/tui/textual/debug/__init__.py +10 -0
- omdev/tui/textual/debug/dominfo.py +151 -0
- omdev/tui/textual/debug/screen.py +24 -0
- omdev/tui/textual/devtools.py +187 -0
- omdev/tui/textual/drivers2.py +55 -0
- omdev/tui/textual/logging2.py +20 -0
- omdev/tui/textual/types.py +45 -0
- {omdev-0.0.0.dev416.dist-info → omdev-0.0.0.dev500.dist-info}/METADATA +18 -12
- omdev-0.0.0.dev500.dist-info/RECORD +386 -0
- omdev/ptk/__init__.py +0 -103
- omdev/ptk/apps/ncdu.py +0 -167
- omdev/ptk/confirm.py +0 -60
- omdev/ptk/markdown/LICENSE +0 -22
- omdev/ptk/markdown/__init__.py +0 -10
- omdev/ptk/markdown/__main__.py +0 -11
- omdev/ptk/markdown/border.py +0 -94
- omdev/ptk/markdown/markdown.py +0 -390
- omdev/ptk/markdown/parser.py +0 -42
- omdev/ptk/markdown/styles.py +0 -29
- omdev/ptk/markdown/tags.py +0 -299
- omdev/ptk/markdown/utils.py +0 -366
- omdev/pyproject/cexts.py +0 -110
- 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.dev416.dist-info/RECORD +0 -332
- /omdev/{ptk/apps → irc}/__init__.py +0 -0
- /omdev/{tokens → irc/messages}/__init__.py +0 -0
- /omdev/{tools/antlr → irc/numerics}/__init__.py +0 -0
- /omdev/{tokens → py/tokens}/all.py +0 -0
- /omdev/{tokens → py/tokens}/tokenizert.py +0 -0
- {omdev-0.0.0.dev416.dist-info → omdev-0.0.0.dev500.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev416.dist-info → omdev-0.0.0.dev500.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev416.dist-info → omdev-0.0.0.dev500.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev416.dist-info → omdev-0.0.0.dev500.dist-info}/top_level.txt +0 -0
|
@@ -14,13 +14,14 @@ from __future__ import annotations
|
|
|
14
14
|
|
|
15
15
|
import importlib
|
|
16
16
|
import itertools
|
|
17
|
-
import logging
|
|
18
17
|
import os
|
|
19
18
|
import re
|
|
20
19
|
import shlex
|
|
21
20
|
import sys
|
|
22
21
|
import typing as ta
|
|
23
22
|
|
|
23
|
+
from omlish.logs import all as logs
|
|
24
|
+
|
|
24
25
|
from .. import sysconfig
|
|
25
26
|
from ..errors import CompileError
|
|
26
27
|
from ..errors import DistutilsExecError
|
|
@@ -32,7 +33,10 @@ from .options import gen_lib_options
|
|
|
32
33
|
from .options import gen_preprocess_options
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
log =
|
|
36
|
+
log = logs.get_module_logger(globals())
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
##
|
|
36
40
|
|
|
37
41
|
|
|
38
42
|
def bypass_compiler_fixup(cmd, args):
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"""Utility functions for manipulating directories and directory trees."""
|
|
2
2
|
import errno
|
|
3
|
-
import logging
|
|
4
3
|
import os
|
|
5
4
|
|
|
5
|
+
from omlish.logs import all as logs
|
|
6
|
+
|
|
6
7
|
from .errors import DistutilsFileError
|
|
7
8
|
from .errors import DistutilsInternalError
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
log =
|
|
11
|
+
log = logs.get_module_logger(globals())
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
##
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
# cache for by mkpath() -- in addition to cheapening redundant calls, eliminates redundant "creating /foo/bar/baz"
|
omdev/cexts/_distutils/errors.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"""Utility functions for operating on single files."""
|
|
2
2
|
import contextlib
|
|
3
|
-
import logging
|
|
4
3
|
import os
|
|
5
4
|
|
|
5
|
+
from omlish.logs import all as logs
|
|
6
|
+
|
|
6
7
|
from .errors import DistutilsFileError
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
log =
|
|
10
|
+
log = logs.get_module_logger(globals())
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
##
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
# for generating verbose output in 'copy_file()'
|
omdev/cexts/_distutils/spawn.py
CHANGED
|
@@ -4,15 +4,19 @@ specific functions for launching another program in a sub-process.
|
|
|
4
4
|
Also provides the 'find_executable()' to search the path for a given
|
|
5
5
|
executable name.
|
|
6
6
|
"""
|
|
7
|
-
import logging
|
|
8
7
|
import os
|
|
9
8
|
import subprocess
|
|
10
9
|
import sys
|
|
11
10
|
|
|
11
|
+
from omlish.logs import all as logs
|
|
12
|
+
|
|
12
13
|
from .errors import DistutilsExecError
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
log =
|
|
16
|
+
log = logs.get_module_logger(globals())
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
##
|
|
16
20
|
|
|
17
21
|
|
|
18
22
|
def spawn(cmd, search_path=1, verbose=0, dry_run=False, env=None, debug=False): # noqa: C901
|
omdev/cexts/_distutils/util.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules."""
|
|
2
2
|
import functools
|
|
3
|
-
import logging
|
|
4
3
|
import os
|
|
5
4
|
import re
|
|
6
5
|
import string
|
|
@@ -8,10 +7,15 @@ import sys
|
|
|
8
7
|
import sysconfig
|
|
9
8
|
import typing as ta
|
|
10
9
|
|
|
10
|
+
from omlish.logs import all as logs
|
|
11
|
+
|
|
11
12
|
from .errors import DistutilsPlatformError
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
log =
|
|
15
|
+
log = logs.get_module_logger(globals())
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
##
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
def pass_none(func):
|
omdev/cexts/cmake.py
CHANGED
|
@@ -33,7 +33,6 @@ Done:
|
|
|
33
33
|
import argparse
|
|
34
34
|
import dataclasses as dc
|
|
35
35
|
import io
|
|
36
|
-
import logging
|
|
37
36
|
import os.path
|
|
38
37
|
import shutil
|
|
39
38
|
import sys
|
|
@@ -50,7 +49,7 @@ from ..cli import CliModule
|
|
|
50
49
|
from .magic import CextMagic
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
log =
|
|
52
|
+
log = logs.get_module_logger(globals())
|
|
54
53
|
|
|
55
54
|
|
|
56
55
|
##
|
|
@@ -267,7 +266,10 @@ class CmakeProjectGen:
|
|
|
267
266
|
'-g',
|
|
268
267
|
'-c',
|
|
269
268
|
],
|
|
270
|
-
[
|
|
269
|
+
[
|
|
270
|
+
'$<$<COMPILE_LANGUAGE:C>:-std=c11>',
|
|
271
|
+
'$<$<COMPILE_LANGUAGE:CXX>:-std=c++20>',
|
|
272
|
+
],
|
|
271
273
|
),
|
|
272
274
|
))
|
|
273
275
|
|
omdev/cexts/scan.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
import logging
|
|
3
2
|
import os.path
|
|
4
3
|
import typing as ta
|
|
5
4
|
|
|
@@ -8,7 +7,7 @@ from omlish.logs import all as logs
|
|
|
8
7
|
from .magic import CextMagic
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
log =
|
|
10
|
+
log = logs.get_module_logger(globals())
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
##
|
omdev/ci/cache.py
CHANGED
|
@@ -15,9 +15,10 @@ import time
|
|
|
15
15
|
import typing as ta
|
|
16
16
|
import urllib.request
|
|
17
17
|
|
|
18
|
+
from omlish.lite.abstract import Abstract
|
|
18
19
|
from omlish.lite.cached import cached_nullary
|
|
19
20
|
from omlish.lite.check import check
|
|
20
|
-
from omlish.
|
|
21
|
+
from omlish.logs.modules import get_module_logger
|
|
21
22
|
from omlish.os.temp import make_temp_file
|
|
22
23
|
|
|
23
24
|
from .consts import CI_CACHE_VERSION
|
|
@@ -26,10 +27,13 @@ from .consts import CI_CACHE_VERSION
|
|
|
26
27
|
CacheVersion = ta.NewType('CacheVersion', int)
|
|
27
28
|
|
|
28
29
|
|
|
30
|
+
log = get_module_logger(globals()) # noqa
|
|
31
|
+
|
|
32
|
+
|
|
29
33
|
##
|
|
30
34
|
|
|
31
35
|
|
|
32
|
-
class FileCache(
|
|
36
|
+
class FileCache(Abstract):
|
|
33
37
|
DEFAULT_CACHE_VERSION: ta.ClassVar[CacheVersion] = CacheVersion(CI_CACHE_VERSION)
|
|
34
38
|
|
|
35
39
|
def __init__(
|
|
@@ -229,7 +233,7 @@ class DirectoryFileCache(FileCache):
|
|
|
229
233
|
|
|
230
234
|
class DataCache:
|
|
231
235
|
@dc.dataclass(frozen=True)
|
|
232
|
-
class Data(
|
|
236
|
+
class Data(Abstract):
|
|
233
237
|
pass
|
|
234
238
|
|
|
235
239
|
@dc.dataclass(frozen=True)
|
omdev/ci/cli.py
CHANGED
|
@@ -14,7 +14,6 @@ import argparse
|
|
|
14
14
|
import asyncio
|
|
15
15
|
import itertools
|
|
16
16
|
import os.path
|
|
17
|
-
import sys
|
|
18
17
|
import typing as ta
|
|
19
18
|
|
|
20
19
|
from omlish.argparse.cli import ArgparseCli
|
|
@@ -22,8 +21,8 @@ from omlish.argparse.cli import argparse_arg
|
|
|
22
21
|
from omlish.argparse.cli import argparse_cmd
|
|
23
22
|
from omlish.lite.check import check
|
|
24
23
|
from omlish.lite.inject import inj
|
|
25
|
-
from omlish.
|
|
26
|
-
from omlish.logs.standard import configure_standard_logging
|
|
24
|
+
from omlish.logs.modules import get_module_logger
|
|
25
|
+
from omlish.logs.std.standard import configure_standard_logging
|
|
27
26
|
|
|
28
27
|
from .cache import DirectoryFileCache
|
|
29
28
|
from .ci import Ci
|
|
@@ -35,6 +34,9 @@ from .requirements import build_requirements_hash
|
|
|
35
34
|
from .shell import ShellCmd
|
|
36
35
|
|
|
37
36
|
|
|
37
|
+
log = get_module_logger(globals()) # noqa
|
|
38
|
+
|
|
39
|
+
|
|
38
40
|
##
|
|
39
41
|
|
|
40
42
|
|
|
@@ -257,7 +259,7 @@ async def _async_main() -> ta.Optional[int]:
|
|
|
257
259
|
def _main() -> None:
|
|
258
260
|
configure_standard_logging('DEBUG')
|
|
259
261
|
|
|
260
|
-
|
|
262
|
+
raise SystemExit(rc if isinstance(rc := asyncio.run(_async_main()), int) else 0)
|
|
261
263
|
|
|
262
264
|
|
|
263
265
|
if __name__ == '__main__':
|
omdev/ci/docker/buildcaching.py
CHANGED
|
@@ -3,6 +3,8 @@ import abc
|
|
|
3
3
|
import dataclasses as dc
|
|
4
4
|
import typing as ta
|
|
5
5
|
|
|
6
|
+
from omlish.lite.abstract import Abstract
|
|
7
|
+
|
|
6
8
|
from .cache import DockerCache
|
|
7
9
|
from .cache import DockerCacheKey
|
|
8
10
|
from .cmds import is_docker_image_present
|
|
@@ -12,7 +14,7 @@ from .cmds import tag_docker_image
|
|
|
12
14
|
##
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
class DockerBuildCaching(
|
|
17
|
+
class DockerBuildCaching(Abstract):
|
|
16
18
|
@abc.abstractmethod
|
|
17
19
|
def cached_build_docker_image(
|
|
18
20
|
self,
|
omdev/ci/docker/cache.py
CHANGED
|
@@ -3,6 +3,7 @@ import abc
|
|
|
3
3
|
import dataclasses as dc
|
|
4
4
|
import typing as ta
|
|
5
5
|
|
|
6
|
+
from omlish.lite.abstract import Abstract
|
|
6
7
|
from omlish.lite.check import check
|
|
7
8
|
from omlish.os.temp import temp_file_context
|
|
8
9
|
|
|
@@ -35,7 +36,7 @@ class DockerCacheKey:
|
|
|
35
36
|
##
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
class DockerCache(
|
|
39
|
+
class DockerCache(Abstract):
|
|
39
40
|
@abc.abstractmethod
|
|
40
41
|
def load_cache_docker_image(self, key: DockerCacheKey) -> ta.Awaitable[ta.Optional[str]]:
|
|
41
42
|
raise NotImplementedError
|
|
@@ -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
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# ruff: noqa: UP006 UP007 UP045
|
|
2
|
-
import abc
|
|
3
2
|
import dataclasses as dc
|
|
4
3
|
import os.path
|
|
5
4
|
import typing as ta
|
|
6
5
|
|
|
6
|
+
from omlish.lite.abstract import Abstract
|
|
7
7
|
from omlish.lite.check import check
|
|
8
8
|
|
|
9
9
|
from ....dataserver.routes import DataServerRoute
|
|
@@ -25,7 +25,7 @@ class CacheServedDockerImageManifest:
|
|
|
25
25
|
content_length: int
|
|
26
26
|
|
|
27
27
|
@dc.dataclass(frozen=True)
|
|
28
|
-
class Target(
|
|
28
|
+
class Target(Abstract):
|
|
29
29
|
pass
|
|
30
30
|
|
|
31
31
|
@dc.dataclass(frozen=True)
|
omdev/ci/docker/dataserver.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# ruff: noqa: UP006 UP007 UP043 UP045
|
|
2
2
|
import asyncio
|
|
3
3
|
import contextlib
|
|
4
|
-
import logging
|
|
5
4
|
import ssl
|
|
6
5
|
import sys
|
|
7
6
|
import threading
|
|
@@ -14,6 +13,7 @@ from omlish.http.handlers import LoggingHttpHandler
|
|
|
14
13
|
from omlish.lite.cached import cached_nullary
|
|
15
14
|
from omlish.lite.check import check
|
|
16
15
|
from omlish.lite.contextmanagers import AsyncExitStacked
|
|
16
|
+
from omlish.logs.protocols import LoggerLike
|
|
17
17
|
from omlish.secrets.tempssl import generate_temp_localhost_ssl_cert
|
|
18
18
|
from omlish.sockets.server.server import SocketServer
|
|
19
19
|
|
|
@@ -145,7 +145,7 @@ class DockerDataServer(AsyncExitStacked):
|
|
|
145
145
|
port: int,
|
|
146
146
|
data_server: DataServer,
|
|
147
147
|
*,
|
|
148
|
-
handler_log: ta.Optional[
|
|
148
|
+
handler_log: ta.Optional[LoggerLike] = None,
|
|
149
149
|
stop_event: ta.Optional[asyncio.Event] = None,
|
|
150
150
|
) -> None:
|
|
151
151
|
super().__init__()
|
omdev/ci/docker/imagepulling.py
CHANGED
|
@@ -3,6 +3,7 @@ import abc
|
|
|
3
3
|
import dataclasses as dc
|
|
4
4
|
import typing as ta
|
|
5
5
|
|
|
6
|
+
from omlish.lite.abstract import Abstract
|
|
6
7
|
from omlish.lite.timing import log_timing_context
|
|
7
8
|
from omlish.text.mangle import StringMangler
|
|
8
9
|
|
|
@@ -16,7 +17,7 @@ from .cmds import pull_docker_image
|
|
|
16
17
|
##
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
class DockerImagePulling(
|
|
20
|
+
class DockerImagePulling(Abstract):
|
|
20
21
|
@abc.abstractmethod
|
|
21
22
|
def pull_docker_image(self, image: str) -> ta.Awaitable[None]:
|
|
22
23
|
raise NotImplementedError
|
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/docker/repositories.py
CHANGED
|
@@ -5,6 +5,7 @@ import shlex
|
|
|
5
5
|
import typing as ta
|
|
6
6
|
|
|
7
7
|
from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
|
|
8
|
+
from omlish.lite.abstract import Abstract
|
|
8
9
|
from omlish.lite.timing import log_timing_context
|
|
9
10
|
from omlish.os.temp import temp_dir_context
|
|
10
11
|
|
|
@@ -15,7 +16,7 @@ from ...oci.repositories import OciRepository
|
|
|
15
16
|
##
|
|
16
17
|
|
|
17
18
|
|
|
18
|
-
class DockerImageRepositoryOpener(
|
|
19
|
+
class DockerImageRepositoryOpener(Abstract):
|
|
19
20
|
@abc.abstractmethod
|
|
20
21
|
def open_docker_image_repository(self, image: str) -> ta.AsyncContextManager[OciRepository]:
|
|
21
22
|
raise NotImplementedError
|
omdev/ci/github/api/clients.py
CHANGED
|
@@ -12,21 +12,25 @@ import urllib.request
|
|
|
12
12
|
|
|
13
13
|
from omlish.asyncs.asyncio.utils import asyncio_wait_concurrent
|
|
14
14
|
from omlish.http.urllib import NonRaisingUrllibErrorProcessor
|
|
15
|
+
from omlish.lite.abstract import Abstract
|
|
15
16
|
from omlish.lite.check import check
|
|
16
17
|
from omlish.lite.json import json_dumps_compact
|
|
17
|
-
from omlish.lite.logs import log
|
|
18
18
|
from omlish.lite.timing import log_timing_context
|
|
19
|
+
from omlish.logs.modules import get_module_logger
|
|
19
20
|
|
|
20
21
|
from ...consts import CI_CACHE_VERSION
|
|
21
22
|
from ..env import register_github_env_var
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
log = get_module_logger(globals()) # noqa
|
|
26
|
+
|
|
27
|
+
|
|
24
28
|
##
|
|
25
29
|
|
|
26
30
|
|
|
27
|
-
class GithubCacheClient(
|
|
31
|
+
class GithubCacheClient(Abstract):
|
|
28
32
|
@dc.dataclass(frozen=True)
|
|
29
|
-
class Entry(
|
|
33
|
+
class Entry(Abstract):
|
|
30
34
|
pass
|
|
31
35
|
|
|
32
36
|
@abc.abstractmethod
|
|
@@ -48,7 +52,7 @@ class GithubCacheClient(abc.ABC):
|
|
|
48
52
|
##
|
|
49
53
|
|
|
50
54
|
|
|
51
|
-
class BaseGithubCacheClient(GithubCacheClient,
|
|
55
|
+
class BaseGithubCacheClient(GithubCacheClient, Abstract):
|
|
52
56
|
AUTH_TOKEN_ENV_VAR = register_github_env_var('ACTIONS_RUNTIME_TOKEN') # noqa
|
|
53
57
|
|
|
54
58
|
KEY_SUFFIX_ENV_VAR = register_github_env_var('GITHUB_RUN_ID')
|
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/api.py
CHANGED
|
@@ -90,6 +90,7 @@ class GithubCacheServiceV2:
|
|
|
90
90
|
class CreateCacheEntryResponse:
|
|
91
91
|
ok: bool
|
|
92
92
|
signed_upload_url: str
|
|
93
|
+
message: ta.Optional[str] = None
|
|
93
94
|
|
|
94
95
|
CREATE_CACHE_ENTRY_METHOD: Method[
|
|
95
96
|
CreateCacheEntryRequest,
|
|
@@ -113,6 +114,7 @@ class GithubCacheServiceV2:
|
|
|
113
114
|
class FinalizeCacheEntryUploadResponse:
|
|
114
115
|
ok: bool
|
|
115
116
|
entry_id: str
|
|
117
|
+
message: ta.Optional[str] = None
|
|
116
118
|
|
|
117
119
|
FINALIZE_CACHE_ENTRY_METHOD: Method[
|
|
118
120
|
FinalizeCacheEntryUploadRequest,
|
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/cli/clicli.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import dataclasses as dc
|
|
1
2
|
import inspect
|
|
2
3
|
import os
|
|
3
4
|
import re
|
|
4
5
|
import shlex
|
|
5
6
|
import subprocess
|
|
6
7
|
import sys
|
|
8
|
+
import time
|
|
7
9
|
import typing as ta
|
|
8
10
|
import urllib.parse
|
|
9
11
|
import urllib.request
|
|
@@ -13,6 +15,7 @@ from omlish import lang
|
|
|
13
15
|
from omlish.argparse import all as ap
|
|
14
16
|
from omlish.os.temp import temp_dir_context
|
|
15
17
|
|
|
18
|
+
from ..packaging.versions import Version
|
|
16
19
|
from ..pip import get_root_dists
|
|
17
20
|
from ..pip import lookup_latest_package_version
|
|
18
21
|
from . import install
|
|
@@ -87,22 +90,49 @@ class CliCli(ap.Cli):
|
|
|
87
90
|
|
|
88
91
|
#
|
|
89
92
|
|
|
93
|
+
@dc.dataclass()
|
|
94
|
+
class ReinstallWouldNotUpgradeError(Exception):
|
|
95
|
+
current_version: str
|
|
96
|
+
target_version: str
|
|
97
|
+
|
|
98
|
+
def __str__(self) -> str:
|
|
99
|
+
return f'Current version {self.current_version} is not older than target version {self.target_version} '
|
|
100
|
+
|
|
90
101
|
@ap.cmd(
|
|
91
102
|
ap.arg('--url', default=DEFAULT_REINSTALL_URL),
|
|
92
103
|
ap.arg('--local', action='store_true'),
|
|
93
104
|
ap.arg('--no-deps', action='store_true'),
|
|
94
105
|
ap.arg('--no-uv', action='store_true'),
|
|
95
106
|
ap.arg('--dry-run', action='store_true'),
|
|
107
|
+
ap.arg('--must-upgrade', action='store_true'),
|
|
108
|
+
ap.arg('--must-upgrade-loop', action='store_true'),
|
|
96
109
|
ap.arg('--version'),
|
|
97
110
|
ap.arg('extra_deps', nargs='*'),
|
|
98
111
|
)
|
|
99
112
|
def reinstall(self) -> None:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
current_version = __about__.__version__
|
|
114
|
+
|
|
115
|
+
while True:
|
|
116
|
+
latest_version = _parse_latest_version_str(lookup_latest_package_version(__package__.split('.')[0]))
|
|
117
|
+
|
|
118
|
+
if self.args.version is not None:
|
|
119
|
+
target_version: str = self.args.version
|
|
120
|
+
else:
|
|
121
|
+
target_version = latest_version
|
|
122
|
+
|
|
123
|
+
if self.args.must_upgrade or self.args.must_upgrade_loop:
|
|
124
|
+
current_vo = Version(current_version)
|
|
125
|
+
target_vo = Version(target_version)
|
|
126
|
+
if not (target_vo > current_vo):
|
|
127
|
+
ex = CliCli.ReinstallWouldNotUpgradeError(current_version, target_version)
|
|
128
|
+
if self.args.must_upgrade_loop:
|
|
129
|
+
print(ex)
|
|
130
|
+
time.sleep(1)
|
|
131
|
+
continue
|
|
132
|
+
else:
|
|
133
|
+
raise ex
|
|
134
|
+
|
|
135
|
+
break
|
|
106
136
|
|
|
107
137
|
#
|
|
108
138
|
|
|
@@ -186,7 +216,7 @@ class CliCli(ap.Cli):
|
|
|
186
216
|
|
|
187
217
|
#
|
|
188
218
|
|
|
189
|
-
print(f'Current version: {
|
|
219
|
+
print(f'Current version: {current_version}')
|
|
190
220
|
print(f'Latest version: {latest_version}')
|
|
191
221
|
print(f'Target version: {target_version}')
|
|
192
222
|
print()
|
omdev/clipboard/clipboard.py
CHANGED
omdev/cmake.py
CHANGED
|
@@ -2,6 +2,7 @@ import abc
|
|
|
2
2
|
import typing as ta
|
|
3
3
|
|
|
4
4
|
from omlish import dataclasses as dc
|
|
5
|
+
from omlish import lang
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
##
|
|
@@ -21,7 +22,7 @@ class Var:
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
@dc.dataclass(frozen=True)
|
|
24
|
-
class Target(
|
|
25
|
+
class Target(lang.Abstract):
|
|
25
26
|
name: str
|
|
26
27
|
src_files: ta.Sequence[str]
|
|
27
28
|
|
omdev/cmdlog/cli.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import os.path
|
|
3
3
|
import subprocess
|
|
4
|
-
import sys
|
|
5
4
|
import typing as ta
|
|
6
5
|
|
|
7
6
|
from omlish.formats import json
|
|
@@ -60,7 +59,7 @@ def _main() -> None:
|
|
|
60
59
|
entry_dcts = [json.loads(sl) for l in log_lines if (sl := l.strip())]
|
|
61
60
|
print(json.dumps_compact(entry_dcts))
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
raise SystemExit(rc)
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
if __name__ == '__main__':
|