Skip to content

Commit 77c3b2a

Browse files
deeenesclaude
andcommitted
Migrate to Hatchling/uv, rename PyPI package to cachedir
- Replace Poetry build system with Hatchling - Replace pypath-common dependency with pkg-infra>=0.1.0 - Update all imports from pypath_common to pkg_infra.utils - PyPI name: cachedir (import name unchanged: cache_manager) - Delete poetry.lock, add uv project config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb57a37 commit 77c3b2a

11 files changed

Lines changed: 1756 additions & 5043 deletions

File tree

.bumpversion.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
current_version = 0.1.1
33
commit = True
44
tag = True
5-
files = pyproject.toml cache_manager/_metadata.py
5+
files = pyproject.toml
6+
67
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
78
serialize = {major}.{minor}.{patch}

cache_manager/_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import logging
1919
from collections.abc import Mapping
2020

21-
from pypath_common import _misc
21+
from pkg_infra.utils import _misc
2222
import platformdirs
2323

2424
from cache_manager._item import CacheItem

cache_manager/_data/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import functools as ft
2-
from pypath_common import data
2+
from pkg_infra import data
33

4-
load = ft.partial(data.load, module = "cache_manager")
4+
load = ft.partial(data.load, module="cache_manager")

cache_manager/_item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import datetime
1010
import logging
1111

12-
from pypath_common import _misc
12+
from pkg_infra.utils import _misc
1313

1414
from cache_manager import _open
1515
from cache_manager._status import Status

cache_manager/_open.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
import zipfile
1616
import logging
1717

18-
from pypath_common import _misc as _common
19-
from pypath_common import _constants as _const
18+
from pkg_infra.utils._misc import ext
2019

2120

2221
#--- Module logger
@@ -336,7 +335,7 @@ def set_type(self):
336335
Determines the file type based on the extension.
337336
"""
338337

339-
ext = self.ext or _common.ext(self.path)
338+
ext = self.ext or ext(self.path)
340339
ext = ext.strip('.')
341340
self.ext = 'tar.gz' if ext == 'tgz' else ext
342341

cache_manager/_session.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import functools as _ft
22
import logging
33

4-
from pypath_common import session as _session
4+
from pkg_infra.session import get_session as _get_session
55

6-
#--- Module logger
6+
#--- Module logger
77
logger = logging.getLogger(__name__)
88
logger.addHandler(logging.NullHandler())
99

10-
_get_session = _ft.partial(_session, 'cache_manager')
11-
12-
13-
session = _get_session()
10+
session = _get_session(workspace=".")

cache_manager/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import collections
1717
import logging
1818

19-
from pypath_common import _misc
19+
from pkg_infra.utils import _misc
2020
import dateutil
2121

2222
#--- Module logger

0 commit comments

Comments
 (0)