ipa-python-kit 1.0.0__py3-none-any.whl → 1.0.2__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.
ipa/app/__init__.py CHANGED
@@ -55,3 +55,6 @@ class IAppConfig(ABC):
55
55
 
56
56
  def get_sidecar_dir(self, *args, **kwargs) -> Optional[Path]:
57
57
  raise NotImplementedError()
58
+
59
+ def get_result_dir(self, *args, **kwargs) -> Optional[Path]:
60
+ raise NotImplementedError()
ipa/datetime/__init__.py CHANGED
@@ -1 +1,28 @@
1
+ import time
2
+ from typing import Literal
3
+
1
4
  from .core import *
5
+
6
+
7
+ def timestamp(
8
+ unit: Literal["second", "millisecond", "microsecond"] = "millisecond",
9
+ type: Union[float, int] = int,
10
+ ) -> Union[float, int]:
11
+ """
12
+ 获取当前时间戳
13
+ Args:
14
+ unit: 时间戳单位,默认毫秒
15
+ type: 时间戳类型,默认整数
16
+ Returns:
17
+ 时间戳
18
+ """
19
+ s = time.time()
20
+ if unit == "millisecond":
21
+ v = s * 1000
22
+ elif unit == "microsecond":
23
+ v = s * 1000000
24
+ elif unit == "second":
25
+ v = s
26
+ else:
27
+ raise NotImplementedError(f"unsupported unit: {unit}")
28
+ return type(v)
ipa/version.py CHANGED
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.0.0'
22
- __version_tuple__ = version_tuple = (1, 0, 0)
21
+ __version__ = version = '1.0.2'
22
+ __version_tuple__ = version_tuple = (1, 0, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipa-python-kit
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: kit for python
5
5
  Author-email: xdewx <present150608@sina.com>
6
6
  Keywords: python,kit,lib,util
@@ -55,7 +55,7 @@ or
55
55
 
56
56
  ## features
57
57
 
58
- 1. pytest
58
+ 1. pytest & pytest-cov
59
59
  2. pre-commit
60
60
  3. darker for code format
61
61
  4. ruff for lint
@@ -83,6 +83,7 @@ before you start:
83
83
  ### unit test
84
84
 
85
85
  `uv run -m pytest`
86
+ > `htmlcov` folder contains html coverage report.
86
87
 
87
88
  ### run cli
88
89
 
@@ -1,6 +1,6 @@
1
1
  ipa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ipa/version.py,sha256=iNy4L1FSyQ-2tV1aGTwtqfit5nbPuc8UTnEC1of1vuI,544
3
- ipa/app/__init__.py,sha256=PsYzgVAzJSYDUopPAnMe7pMVMcpyOC90NYrqZ-XIyNY,1539
2
+ ipa/version.py,sha256=0DkA8HSDEaUB7F6mxNgPDdO4wyqEtSY7V2LT0FyvBr0,544
3
+ ipa/app/__init__.py,sha256=tqOZI4ivIzk-eack8u8Q1QyFxbqaIGB6LKQtThEqi-E,1644
4
4
  ipa/cli/__init__.py,sha256=YYZYz2QwK34Ro-EBrEDd4sZJ6IeqvUCP-b2cjPWbPa8,44
5
5
  ipa/cli/model.py,sha256=Tdvn8XWcJ_aoghf5N8PlLc38-O01_XPlef66i_--z08,2584
6
6
  ipa/cli/proxy.py,sha256=rEqxH9RacIrb2lxglCnihmF2RooT719WE3NGur5hIfE,7131
@@ -23,7 +23,7 @@ ipa/data_type/point.py,sha256=wJrXONLstZubS3bqRBJCskj268PV5k92qzkk-5YOWgc,9748
23
23
  ipa/data_type/process.py,sha256=Wgr9gmY_Q6UBIYEtGY5259iqhBZ9oJZVoSUwMIancdY,1826
24
24
  ipa/data_type/spatial.py,sha256=TcehRvqxpWzo4iBZjnXSBoGTejJaR_5bgw-2goidXlI,1408
25
25
  ipa/data_type/unitable.py,sha256=pZ8-rEx2h8SLvO7xAaAT52JX2608pwkempPLlBT2h7s,12613
26
- ipa/datetime/__init__.py,sha256=nE8jJjGJaKuJKCyuf6QLfrj8xPj8IqGKeH2VXP3FMzY,21
26
+ ipa/datetime/__init__.py,sha256=FDmUO-LWFrTRKZlVv2mVCP_KUClURpSWUXE9Vn9fs34,672
27
27
  ipa/datetime/core.py,sha256=jwkljzWPX74WOa004Ply9HVffXEAr7aVMg0sBvoef5k,1739
28
28
  ipa/decorator/__init__.py,sha256=vD9dHyCtblfLmOPCJ-cAAybWwdMtG4IVdZmbald52yI,177
29
29
  ipa/decorator/exception.py,sha256=vvNt-LsgU8hM3NM6eJZfFdk8ZTxgJiXDAz2tfnUdlug,1525
@@ -66,7 +66,7 @@ ipa/visualization/__init__.py,sha256=FnTG9eLlbkd4vPyyzteOMjrm3IEtdOYYRUAg0hw-ejg
66
66
  ipa/visualization/_networkx.py,sha256=5bUbKTtTwdFYgEY1ww99-fvVjvWhJkfTf1sVYfUax8k,1598
67
67
  ipa/websocket/__init__.py,sha256=nE8jJjGJaKuJKCyuf6QLfrj8xPj8IqGKeH2VXP3FMzY,21
68
68
  ipa/websocket/core/__init__.py,sha256=EOqo4MnWXdjHcmqiP61pWIinbhDYb4_Lesiei7uiyXk,4843
69
- ipa_python_kit-1.0.0.dist-info/METADATA,sha256=K--OWqeANjIPaU_-hmiSS0agwxisSY54GyHoz-W5oLg,2846
70
- ipa_python_kit-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
71
- ipa_python_kit-1.0.0.dist-info/top_level.txt,sha256=jpjQhUSwP61wKQAysY61KwKKom42vtQTiJNXMT6AyCc,4
72
- ipa_python_kit-1.0.0.dist-info/RECORD,,
69
+ ipa_python_kit-1.0.2.dist-info/METADATA,sha256=TiBN7_JGWX3xIRI-FGQ81W5AjI__aHXHwBs0B3_HZZo,2910
70
+ ipa_python_kit-1.0.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
71
+ ipa_python_kit-1.0.2.dist-info/top_level.txt,sha256=jpjQhUSwP61wKQAysY61KwKKom42vtQTiJNXMT6AyCc,4
72
+ ipa_python_kit-1.0.2.dist-info/RECORD,,