omdev 0.0.0.dev289__py3-none-any.whl → 0.0.0.dev291__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/ci/github/api/__init__.py +0 -0
- omdev/ci/github/{client.py → api/clients.py} +190 -207
- omdev/ci/github/api/v1/__init__.py +0 -0
- omdev/ci/github/{api.py → api/v1/api.py} +5 -87
- omdev/ci/github/api/v1/client.py +171 -0
- omdev/ci/github/api/v2/__init__.py +0 -0
- omdev/ci/github/api/v2/api.py +148 -0
- omdev/ci/github/api/v2/azure.py +185 -0
- omdev/ci/github/api/v2/client.py +201 -0
- omdev/ci/github/cache.py +14 -3
- omdev/ci/github/cli.py +1 -1
- omdev/pyproject/pkg.py +5 -2
- omdev/scripts/ci.py +890 -285
- omdev/scripts/pyproject.py +5 -2
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/RECORD +20 -13
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/WHEEL +1 -1
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev289.dist-info → omdev-0.0.0.dev291.dist-info}/top_level.txt +0 -0
omdev/ci/github/cache.py
CHANGED
@@ -11,8 +11,9 @@ from ..cache import DataCache
|
|
11
11
|
from ..cache import DirectoryFileCache
|
12
12
|
from ..cache import FileCache
|
13
13
|
from ..cache import FileCacheDataCache
|
14
|
-
from .
|
15
|
-
from .client import GithubCacheServiceV1Client
|
14
|
+
from .api.clients import GithubCacheClient
|
15
|
+
from .api.v1.client import GithubCacheServiceV1Client
|
16
|
+
from .api.v2.client import GithubCacheServiceV2Client
|
16
17
|
|
17
18
|
|
18
19
|
##
|
@@ -23,11 +24,20 @@ class GithubCache(FileCache, DataCache):
|
|
23
24
|
class Config:
|
24
25
|
pass
|
25
26
|
|
27
|
+
DEFAULT_CLIENT_VERSION: ta.ClassVar[int] = 2
|
28
|
+
|
29
|
+
DEFAULT_CLIENTS_BY_VERSION: ta.ClassVar[ta.Mapping[int, ta.Callable[..., GithubCacheClient]]] = {
|
30
|
+
1: GithubCacheServiceV1Client,
|
31
|
+
2: GithubCacheServiceV2Client,
|
32
|
+
}
|
33
|
+
|
26
34
|
def __init__(
|
27
35
|
self,
|
28
36
|
config: Config = Config(),
|
29
37
|
*,
|
30
38
|
client: ta.Optional[GithubCacheClient] = None,
|
39
|
+
default_client_version: ta.Optional[int] = None,
|
40
|
+
|
31
41
|
version: ta.Optional[CacheVersion] = None,
|
32
42
|
|
33
43
|
local: DirectoryFileCache,
|
@@ -39,7 +49,8 @@ class GithubCache(FileCache, DataCache):
|
|
39
49
|
self._config = config
|
40
50
|
|
41
51
|
if client is None:
|
42
|
-
|
52
|
+
client_cls = self.DEFAULT_CLIENTS_BY_VERSION[default_client_version or self.DEFAULT_CLIENT_VERSION]
|
53
|
+
client = client_cls(
|
43
54
|
cache_version=self._version,
|
44
55
|
)
|
45
56
|
self._client: GithubCacheClient = client
|
omdev/ci/github/cli.py
CHANGED
@@ -10,7 +10,7 @@ from omlish.argparse.cli import argparse_arg
|
|
10
10
|
from omlish.argparse.cli import argparse_cmd
|
11
11
|
from omlish.lite.json import json_dumps_pretty
|
12
12
|
|
13
|
-
from .client import GithubCacheServiceV1Client
|
13
|
+
from .api.v1.client import GithubCacheServiceV1Client
|
14
14
|
from .env import GITHUB_ENV_VARS
|
15
15
|
|
16
16
|
|
omdev/pyproject/pkg.py
CHANGED
@@ -175,8 +175,11 @@ class BasePyprojectPackageGenerator(abc.ABC):
|
|
175
175
|
#
|
176
176
|
|
177
177
|
_STANDARD_FILES: ta.Sequence[str] = [
|
178
|
-
|
179
|
-
|
178
|
+
*[
|
179
|
+
''.join([n, x])
|
180
|
+
for n in ('LICENSE', 'README')
|
181
|
+
for x in ('', '.txt', '.md', '.rst')
|
182
|
+
],
|
180
183
|
]
|
181
184
|
|
182
185
|
def _symlink_standard_files(self) -> None:
|