omdev 0.0.0.dev61__tar.gz → 0.0.0.dev63__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.
Potentially problematic release.
This version of omdev might be problematic. Click here for more details.
- {omdev-0.0.0.dev61/omdev.egg-info → omdev-0.0.0.dev63}/PKG-INFO +2 -2
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/.manifests.json +1 -1
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/main.py +25 -13
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/pyproject.py +21 -20
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/dockertools.py +54 -1
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/pyproject.toml +2 -2
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/LICENSE +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/README.rst +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/amalg/amalg.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/antlr/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/antlr/_antlr/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/antlr/consts.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/antlr/gen.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/bracepy.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/cache.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/manifests.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/classdot.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/findimports.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/findmagic.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/git.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/cli.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/providers.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/pyenv.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/standalone.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/system.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/manifests/load.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/manifests/types.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/mypy/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/packaging/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/precheck.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/cli.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/revisions.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/execrss.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/exectime.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/scripts/interp.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/secrets.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tokens.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/toml/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/toml/parser.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/toml/writer.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/gittools.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/importscan.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/nbtools.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/piptools.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/proftools.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/rst.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev/wheelfile.py +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev.egg-info/SOURCES.txt +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev61 → omdev-0.0.0.dev63}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev63
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: ~=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omlish==0.0.0.dev63
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
18
18
|
Requires-Dist: cffi~=1.17; extra == "all"
|
|
@@ -41,6 +41,7 @@ _CLI_FUNCS: ta.Sequence[CliFunc] = [
|
|
|
41
41
|
def _build_arg_parser() -> argparse.ArgumentParser:
|
|
42
42
|
parser = argparse.ArgumentParser()
|
|
43
43
|
parser.add_argument('--cli-pkg-root', action='append')
|
|
44
|
+
parser.add_argument('--cli-debug', action='store_true')
|
|
44
45
|
parser.add_argument('cmd', nargs='?')
|
|
45
46
|
parser.add_argument('args', nargs=argparse.REMAINDER)
|
|
46
47
|
return parser
|
|
@@ -132,23 +133,34 @@ def _select_cmd(args: ta.Any, cmds: ta.Mapping[str, CliCmd]) -> CliCmd | int:
|
|
|
132
133
|
def _main() -> ta.Any:
|
|
133
134
|
parser = _build_arg_parser()
|
|
134
135
|
args = parser.parse_args()
|
|
135
|
-
cmds = _build_cmd_dct(args)
|
|
136
|
-
sel = _select_cmd(args, cmds)
|
|
137
136
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
def inner():
|
|
138
|
+
cmds = _build_cmd_dct(args)
|
|
139
|
+
sel = _select_cmd(args, cmds)
|
|
141
140
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return 0
|
|
141
|
+
match sel:
|
|
142
|
+
case int():
|
|
143
|
+
return sel
|
|
146
144
|
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
case CliModule() as cm:
|
|
146
|
+
sys.argv = [args.cmd, *(args.args or ())]
|
|
147
|
+
runpy._run_module_as_main(cm.mod_name) # type: ignore # noqa
|
|
148
|
+
return 0
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
case CliFunc() as cf:
|
|
151
|
+
return cf.fn(*(args.args or ()))
|
|
152
|
+
|
|
153
|
+
case _:
|
|
154
|
+
raise TypeError(sel)
|
|
155
|
+
|
|
156
|
+
if args.cli_debug:
|
|
157
|
+
from omlish.diag.debug import debugging_on_exception
|
|
158
|
+
|
|
159
|
+
with debugging_on_exception():
|
|
160
|
+
return inner()
|
|
161
|
+
|
|
162
|
+
else:
|
|
163
|
+
return inner()
|
|
152
164
|
|
|
153
165
|
|
|
154
166
|
if __name__ == '__main__':
|
|
@@ -3033,29 +3033,30 @@ def register_opj_marshaler(ty: ta.Any, m: ObjMarshaler) -> None:
|
|
|
3033
3033
|
|
|
3034
3034
|
|
|
3035
3035
|
def _make_obj_marshaler(ty: ta.Any) -> ObjMarshaler:
|
|
3036
|
-
if isinstance(ty, type)
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3036
|
+
if isinstance(ty, type):
|
|
3037
|
+
if abc.ABC in ty.__bases__:
|
|
3038
|
+
impls = [ # type: ignore
|
|
3039
|
+
PolymorphicObjMarshaler.Impl(
|
|
3040
|
+
ity,
|
|
3041
|
+
ity.__qualname__,
|
|
3042
|
+
get_obj_marshaler(ity),
|
|
3043
|
+
)
|
|
3044
|
+
for ity in deep_subclasses(ty)
|
|
3045
|
+
if abc.ABC not in ity.__bases__
|
|
3046
|
+
]
|
|
3047
|
+
return PolymorphicObjMarshaler(
|
|
3048
|
+
{i.ty: i for i in impls},
|
|
3049
|
+
{i.tag: i for i in impls},
|
|
3042
3050
|
)
|
|
3043
|
-
for ity in deep_subclasses(ty)
|
|
3044
|
-
if abc.ABC not in ity.__bases__
|
|
3045
|
-
]
|
|
3046
|
-
return PolymorphicObjMarshaler(
|
|
3047
|
-
{i.ty: i for i in impls},
|
|
3048
|
-
{i.tag: i for i in impls},
|
|
3049
|
-
)
|
|
3050
3051
|
|
|
3051
|
-
|
|
3052
|
-
|
|
3052
|
+
if issubclass(ty, enum.Enum):
|
|
3053
|
+
return EnumObjMarshaler(ty)
|
|
3053
3054
|
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3055
|
+
if dc.is_dataclass(ty):
|
|
3056
|
+
return DataclassObjMarshaler(
|
|
3057
|
+
ty,
|
|
3058
|
+
{f.name: get_obj_marshaler(f.type) for f in dc.fields(ty)},
|
|
3059
|
+
)
|
|
3059
3060
|
|
|
3060
3061
|
if is_generic_alias(ty):
|
|
3061
3062
|
try:
|
|
@@ -10,8 +10,11 @@ import typing as ta
|
|
|
10
10
|
|
|
11
11
|
from omlish import argparse as ap
|
|
12
12
|
from omlish import check
|
|
13
|
+
from omlish import docker as dck
|
|
13
14
|
from omlish import lang
|
|
14
15
|
from omlish import logs
|
|
16
|
+
from omlish import marshal as msh
|
|
17
|
+
from omlish.formats import json
|
|
15
18
|
from omlish.formats import yaml
|
|
16
19
|
|
|
17
20
|
from ..cli import CliModule
|
|
@@ -179,6 +182,56 @@ class Cli(ap.Cli):
|
|
|
179
182
|
with open(yml_file, 'w') as f:
|
|
180
183
|
f.write(new_src)
|
|
181
184
|
|
|
185
|
+
@ap.command(
|
|
186
|
+
ap.arg('repo'),
|
|
187
|
+
ap.arg('tags', nargs='*'),
|
|
188
|
+
)
|
|
189
|
+
def repo_info(self) -> int:
|
|
190
|
+
if (info := dck.get_hub_repo_info(self.args.repo, tags=self.args.tags or None)) is None:
|
|
191
|
+
return 1
|
|
192
|
+
print(json.dumps_pretty(msh.marshal(info)))
|
|
193
|
+
return 0
|
|
194
|
+
|
|
195
|
+
@ap.command(
|
|
196
|
+
ap.arg('image'),
|
|
197
|
+
)
|
|
198
|
+
def repo_latest_image(self) -> int:
|
|
199
|
+
if ':' in self.args.image:
|
|
200
|
+
repo, _, base = self.args.image.partition(':')
|
|
201
|
+
else:
|
|
202
|
+
repo, base = self.args.image, None
|
|
203
|
+
if (info := dck.get_hub_repo_info(repo)) is None:
|
|
204
|
+
return 1
|
|
205
|
+
print(dck.select_latest_tag(info.tags, base=base))
|
|
206
|
+
return 0
|
|
207
|
+
|
|
208
|
+
@ap.command(
|
|
209
|
+
ap.arg('-f', '--file'),
|
|
210
|
+
)
|
|
211
|
+
def compose_image_updates(self) -> None:
|
|
212
|
+
if self.args.file:
|
|
213
|
+
yml_file = self.args.file
|
|
214
|
+
else:
|
|
215
|
+
yml_file = os.path.join('docker', 'compose.yml')
|
|
216
|
+
|
|
217
|
+
with open(yml_file) as f:
|
|
218
|
+
yml_src = f.read()
|
|
219
|
+
|
|
220
|
+
cfg_dct = yaml.safe_load(yml_src)
|
|
221
|
+
for svc_name, svc_dct in cfg_dct.get('services', {}).items():
|
|
222
|
+
if not (img := svc_dct.get('image')):
|
|
223
|
+
continue
|
|
224
|
+
|
|
225
|
+
repo, _, base = img.partition(':')
|
|
226
|
+
if (info := dck.get_hub_repo_info(repo)) is None:
|
|
227
|
+
continue
|
|
228
|
+
|
|
229
|
+
lt = dck.select_latest_tag(info.tags, base=base)
|
|
230
|
+
if f'{repo}:{lt}' == img:
|
|
231
|
+
continue
|
|
232
|
+
|
|
233
|
+
print(f'{svc_name}: {lt}')
|
|
234
|
+
|
|
182
235
|
|
|
183
236
|
# @omlish-manifest
|
|
184
237
|
_CLI_MODULE = CliModule('docker', __name__)
|
|
@@ -186,4 +239,4 @@ _CLI_MODULE = CliModule('docker', __name__)
|
|
|
186
239
|
|
|
187
240
|
if __name__ == '__main__':
|
|
188
241
|
logs.configure_standard_logging('INFO')
|
|
189
|
-
Cli()()
|
|
242
|
+
Cli().call_and_exit()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev63
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: ~=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omlish==0.0.0.dev63
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
18
18
|
Requires-Dist: cffi~=1.17; extra == "all"
|
|
@@ -12,7 +12,7 @@ authors = [
|
|
|
12
12
|
urls = {source = 'https://github.com/wrmsr/omlish'}
|
|
13
13
|
license = {text = 'BSD-3-Clause'}
|
|
14
14
|
requires-python = '~=3.12'
|
|
15
|
-
version = '0.0.0.
|
|
15
|
+
version = '0.0.0.dev63'
|
|
16
16
|
classifiers = [
|
|
17
17
|
'License :: OSI Approved :: BSD License',
|
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
|
22
22
|
]
|
|
23
23
|
description = 'omdev'
|
|
24
24
|
dependencies = [
|
|
25
|
-
'omlish == 0.0.0.
|
|
25
|
+
'omlish == 0.0.0.dev63',
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.optional-dependencies]
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|