liblaf-cherries 0.0.4__py3-none-any.whl → 0.0.5__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.
- liblaf/cherries/_version.py +21 -0
- liblaf/cherries/_version.pyi +4 -0
- liblaf/cherries/git/__init__.pyi +4 -3
- liblaf/cherries/git/_grapes.py +3 -0
- liblaf/cherries/plugin/_logging.py +3 -25
- {liblaf_cherries-0.0.4.dist-info → liblaf_cherries-0.0.5.dist-info}/METADATA +6 -5
- {liblaf_cherries-0.0.4.dist-info → liblaf_cherries-0.0.5.dist-info}/RECORD +9 -7
- liblaf/cherries/git/_repo.py +0 -33
- {liblaf_cherries-0.0.4.dist-info → liblaf_cherries-0.0.5.dist-info}/WHEEL +0 -0
- {liblaf_cherries-0.0.4.dist-info → liblaf_cherries-0.0.5.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# file generated by setuptools-scm
|
2
|
+
# don't change, don't track in version control
|
3
|
+
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
5
|
+
|
6
|
+
TYPE_CHECKING = False
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from typing import Tuple
|
9
|
+
from typing import Union
|
10
|
+
|
11
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
12
|
+
else:
|
13
|
+
VERSION_TUPLE = object
|
14
|
+
|
15
|
+
version: str
|
16
|
+
__version__: str
|
17
|
+
__version_tuple__: VERSION_TUPLE
|
18
|
+
version_tuple: VERSION_TUPLE
|
19
|
+
|
20
|
+
__version__ = version = '0.0.5'
|
21
|
+
__version_tuple__ = version_tuple = (0, 0, 5)
|
liblaf/cherries/git/__init__.pyi
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
from . import github
|
2
2
|
from ._commit import DEFAULT_COMMIT_MESSAGE, commit
|
3
3
|
from ._entrypoint import entrypoint
|
4
|
-
from .
|
4
|
+
from ._grapes import GitInfo, info, root, root_safe
|
5
5
|
from .github import permalink, user_repo
|
6
6
|
|
7
7
|
__all__ = [
|
8
8
|
"DEFAULT_COMMIT_MESSAGE",
|
9
|
+
"GitInfo",
|
9
10
|
"commit",
|
10
11
|
"entrypoint",
|
11
12
|
"github",
|
12
|
-
"
|
13
|
+
"info",
|
13
14
|
"permalink",
|
14
|
-
"repo",
|
15
15
|
"root",
|
16
|
+
"root_safe",
|
16
17
|
"user_repo",
|
17
18
|
]
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import loguru
|
2
2
|
import pydantic_settings as ps
|
3
3
|
from loguru import logger
|
4
|
-
from rich.logging import RichHandler
|
5
4
|
|
6
5
|
# TODO: fix PLR0402
|
7
6
|
# make pyright happy
|
@@ -25,30 +24,9 @@ class PluginLogging(cherries.Plugin):
|
|
25
24
|
def _pre_start(self) -> None:
|
26
25
|
grapes.init_logging(
|
27
26
|
handlers=[
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
omit_repeated_times=False,
|
32
|
-
markup=True,
|
33
|
-
log_time_format="[%Y-%m-%d %H:%M:%S]",
|
34
|
-
),
|
35
|
-
"format": "{message}",
|
36
|
-
"filter": DEFAULT_FILTER,
|
37
|
-
"enqueue": True,
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"sink": "run.log",
|
41
|
-
"filter": DEFAULT_FILE_FILTER,
|
42
|
-
"enqueue": True,
|
43
|
-
"mode": "w",
|
44
|
-
},
|
45
|
-
{
|
46
|
-
"sink": "run.log.jsonl",
|
47
|
-
"filter": DEFAULT_FILE_FILTER,
|
48
|
-
"serialize": True,
|
49
|
-
"enqueue": True,
|
50
|
-
"mode": "w",
|
51
|
-
},
|
27
|
+
grapes.logging.console_handler(),
|
28
|
+
grapes.logging.file_handler(),
|
29
|
+
grapes.logging.jsonl_handler(),
|
52
30
|
]
|
53
31
|
)
|
54
32
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: liblaf-cherries
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: Add your description here
|
5
5
|
Project-URL: Changelog, https://github.com/liblaf/cherries/blob/main/CHANGELOG.md
|
6
6
|
Project-URL: Homepage, https://github.com/liblaf/cherries
|
@@ -11,14 +11,15 @@ Author-email: liblaf <30631553+liblaf@users.noreply.github.com>
|
|
11
11
|
License-Expression: MIT
|
12
12
|
License-File: LICENSE
|
13
13
|
Requires-Python: >=3.12
|
14
|
-
Requires-Dist: comet-ml<4,>=3.
|
14
|
+
Requires-Dist: comet-ml<4,>=3.49.4
|
15
15
|
Requires-Dist: gitpython<4,>=3.1.44
|
16
|
+
Requires-Dist: giturlparse<0.13,>=0.12.0
|
16
17
|
Requires-Dist: lazy-loader<0.5,>=0.4
|
17
|
-
Requires-Dist: liblaf-grapes<0.
|
18
|
+
Requires-Dist: liblaf-grapes<0.2,>=0.1.7
|
18
19
|
Requires-Dist: loguru<0.8,>=0.7.3
|
19
20
|
Requires-Dist: neptune<2,>=1.13.0
|
20
|
-
Requires-Dist: pydantic-settings<3,>=2.
|
21
|
-
Requires-Dist: pydantic<3,>=2.10.
|
21
|
+
Requires-Dist: pydantic-settings<3,>=2.8.1
|
22
|
+
Requires-Dist: pydantic<3,>=2.10.6
|
22
23
|
Description-Content-Type: text/markdown
|
23
24
|
|
24
25
|
# 🍒 Cherries
|
@@ -5,11 +5,13 @@ liblaf/cherries/_env.py,sha256=RK9NMHIok-AkCLMqW44cXLl0d_daLjpEcjhreSP1vm0,92
|
|
5
5
|
liblaf/cherries/_experiment.py,sha256=E6r5DyojfY75lKsIDxYpyaCgXFXMJTaUIglIk9Xs-Sw,3181
|
6
6
|
liblaf/cherries/_main.py,sha256=R8vWc9e94MViqCzMiG257--QtSoOU50lmR59oIRc6nw,1237
|
7
7
|
liblaf/cherries/_start.py,sha256=iGAhDm8sF_JCaWPWdMIFL0d5nODFU8IcBPdNihhiSp4,685
|
8
|
+
liblaf/cherries/_version.py,sha256=WcvKdm4etz9_Q5VW_LRgfCR0icS2PEtbz-C1JY6enCc,511
|
9
|
+
liblaf/cherries/_version.pyi,sha256=Pnv4Bxw13LHeuVkPLPsTtnp4N4jOGcAfFJw05uMMgBY,108
|
8
10
|
liblaf/cherries/git/__init__.py,sha256=OHb6Xou2v6u42swTgjRfzej4CIlRg4OmgOIQXUiRjKA,97
|
9
|
-
liblaf/cherries/git/__init__.pyi,sha256=
|
11
|
+
liblaf/cherries/git/__init__.pyi,sha256=kHd7B4_atL4929so2AnrBcCJNgGg-i-HEi4PeGh3csk,383
|
10
12
|
liblaf/cherries/git/_commit.py,sha256=jnAtCKljNnzhXK90cj3adAYkPvcnLnOrHWA8YWhtZF4,482
|
11
13
|
liblaf/cherries/git/_entrypoint.py,sha256=My_TmLqpGX4NJV4qjQvmHtnwhxX_B2ilfuYvpj2ftaM,262
|
12
|
-
liblaf/cherries/git/
|
14
|
+
liblaf/cherries/git/_grapes.py,sha256=f9RRn2ci-fC5FqkbPJoIjNcJpUMwo2qBeu7CMre_t1o,113
|
13
15
|
liblaf/cherries/git/github/__init__.py,sha256=OHb6Xou2v6u42swTgjRfzej4CIlRg4OmgOIQXUiRjKA,97
|
14
16
|
liblaf/cherries/git/github/__init__.pyi,sha256=jspOamBde7EtGOqsIzWg75jFToVHRhG4hfiEw1MDz80,96
|
15
17
|
liblaf/cherries/git/github/_link.py,sha256=f_AcdKMhukUZ2fgBtC0usBrwnpAHaLYo9EhkZYesZuQ,693
|
@@ -24,11 +26,11 @@ liblaf/cherries/plugin/__init__.pyi,sha256=3wmkKoe27SI3q5zbyejf3KmaBRUhAu-OEefJA
|
|
24
26
|
liblaf/cherries/plugin/_abc.py,sha256=kMDFzDAEDifpxWbnQhp4M4sr24-D55x-B6MPIZW_1jA,848
|
25
27
|
liblaf/cherries/plugin/_default.py,sha256=H7_vym_uxxba41xR2ERBeBt0kBX4s4tjzjifyKjXxS0,215
|
26
28
|
liblaf/cherries/plugin/_git.py,sha256=Gyv8Uc2AnPpZul23oGm6Dba2YOaiFx6WAytrQ8ylSsk,866
|
27
|
-
liblaf/cherries/plugin/_logging.py,sha256=
|
29
|
+
liblaf/cherries/plugin/_logging.py,sha256=yTp2IgwmTgWs6fkiFp6GyKz8IOTJZrHn_61VRZ_3eEY,1004
|
28
30
|
liblaf/cherries/plugin/_restic.py,sha256=4ArmgD42ZUotkVdCwdMvlmJF0Z8PuKe8EukzRoWyQK8,1926
|
29
31
|
liblaf/cherries/utils/__init__.py,sha256=OHb6Xou2v6u42swTgjRfzej4CIlRg4OmgOIQXUiRjKA,97
|
30
32
|
liblaf/cherries/utils/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
|
-
liblaf_cherries-0.0.
|
32
|
-
liblaf_cherries-0.0.
|
33
|
-
liblaf_cherries-0.0.
|
34
|
-
liblaf_cherries-0.0.
|
33
|
+
liblaf_cherries-0.0.5.dist-info/METADATA,sha256=bVKXy2CyRAp01YYCQOmRSc42JlzvCjhXmnsNIYLMbo8,964
|
34
|
+
liblaf_cherries-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
35
|
+
liblaf_cherries-0.0.5.dist-info/licenses/LICENSE,sha256=Ph4NzyU3lGVDeYv-mf8aRmImH8v9rVL9F362FV4G6Ow,1063
|
36
|
+
liblaf_cherries-0.0.5.dist-info/RECORD,,
|
liblaf/cherries/git/_repo.py
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
import re
|
2
|
-
from pathlib import Path
|
3
|
-
|
4
|
-
import git
|
5
|
-
|
6
|
-
GITHUB_URL_PATTERNS: list[str] = [
|
7
|
-
r"https://github\.com/(?P<user>[^/]+)/(?P<repo>[^/]+)(?:\.git)?"
|
8
|
-
]
|
9
|
-
|
10
|
-
|
11
|
-
def repo(*, search_parent_directories: bool = True) -> git.Repo:
|
12
|
-
return git.Repo(search_parent_directories=search_parent_directories)
|
13
|
-
|
14
|
-
|
15
|
-
def root() -> Path:
|
16
|
-
repo = git.Repo(search_parent_directories=True)
|
17
|
-
return Path(repo.working_dir)
|
18
|
-
|
19
|
-
|
20
|
-
def github_user_repo(
|
21
|
-
repo: git.Repo | None = None,
|
22
|
-
) -> tuple[str, str] | tuple[None, None]:
|
23
|
-
if repo is None:
|
24
|
-
repo = git.Repo(search_parent_directories=True)
|
25
|
-
remote: git.Remote = repo.remote()
|
26
|
-
for pattern in GITHUB_URL_PATTERNS:
|
27
|
-
match: re.Match[str] | None = re.match(pattern, remote.url)
|
28
|
-
if not match:
|
29
|
-
continue
|
30
|
-
user: str = match.group("user")
|
31
|
-
repo_name: str = match.group("repo")
|
32
|
-
return user, repo_name
|
33
|
-
return None, None
|
File without changes
|
File without changes
|