liblaf-cherries 0.0.4__py3-none-any.whl → 0.0.6__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.
@@ -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.6'
21
+ __version_tuple__ = version_tuple = (0, 0, 6)
@@ -0,0 +1,4 @@
1
+ __version__: str
2
+ __version_tuple__: tuple[int | str, ...]
3
+ version_tuple: tuple[int | str, ...]
4
+ version: str
@@ -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 ._repo import github_user_repo, repo, root
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
- "github_user_repo",
13
+ "info",
13
14
  "permalink",
14
- "repo",
15
15
  "root",
16
+ "root_safe",
16
17
  "user_repo",
17
18
  ]
@@ -0,0 +1,3 @@
1
+ from liblaf.grapes.git import GitInfo, info, root, root_safe
2
+
3
+ __all__ = ["GitInfo", "info", "root", "root_safe"]
@@ -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
- "sink": RichHandler(
30
- console=grapes.logging.logging_console(),
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.4
3
+ Version: 0.0.6
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
@@ -10,15 +10,18 @@ Project-URL: Source Code, https://github.com/liblaf/cherries
10
10
  Author-email: liblaf <30631553+liblaf@users.noreply.github.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: License :: OSI Approved :: MIT License
13
15
  Requires-Python: >=3.12
14
- Requires-Dist: comet-ml<4,>=3.47.6
16
+ Requires-Dist: comet-ml<4,>=3.49.4
15
17
  Requires-Dist: gitpython<4,>=3.1.44
18
+ Requires-Dist: giturlparse<0.13,>=0.12.0
16
19
  Requires-Dist: lazy-loader<0.5,>=0.4
17
- Requires-Dist: liblaf-grapes<0.1.3,>=0.1.2
20
+ Requires-Dist: liblaf-grapes<0.2,>=0.1.7
18
21
  Requires-Dist: loguru<0.8,>=0.7.3
19
22
  Requires-Dist: neptune<2,>=1.13.0
20
- Requires-Dist: pydantic-settings<3,>=2.7.1
21
- Requires-Dist: pydantic<3,>=2.10.5
23
+ Requires-Dist: pydantic-settings<3,>=2.8.1
24
+ Requires-Dist: pydantic<3,>=2.10.6
22
25
  Description-Content-Type: text/markdown
23
26
 
24
27
  # 🍒 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=juzdq-mLyQD1MXj2IU1nbwqAl0oOYH7zZ9BDjNsqyB0,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=p52L1d1kuiwyc9tBz648Bm76C9DJLbgleE8EKRJM4Lg,371
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/_repo.py,sha256=bE8apxawGie8KuEjQCDAVRSGTP7Qt6jDDtoXMhfWy4w,907
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=wLIDlVk9_A-lbI64obEzyIFjLgIRR-rmjNvmli3T3O4,1779
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.4.dist-info/METADATA,sha256=YXrpZvdN1jnEpH08G1ZPqGYwVBw14P5L3HJCH_LSVlc,925
32
- liblaf_cherries-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
- liblaf_cherries-0.0.4.dist-info/licenses/LICENSE,sha256=Ph4NzyU3lGVDeYv-mf8aRmImH8v9rVL9F362FV4G6Ow,1063
34
- liblaf_cherries-0.0.4.dist-info/RECORD,,
33
+ liblaf_cherries-0.0.6.dist-info/METADATA,sha256=DCLQCNgc7TOOROoYjG7EkAMcouItygpeTsEDvqk1czM,1058
34
+ liblaf_cherries-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ liblaf_cherries-0.0.6.dist-info/licenses/LICENSE,sha256=Ph4NzyU3lGVDeYv-mf8aRmImH8v9rVL9F362FV4G6Ow,1063
36
+ liblaf_cherries-0.0.6.dist-info/RECORD,,
@@ -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