hossam 0.4.11__tar.gz → 0.4.13__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hossam
3
- Version: 0.4.11
3
+ Version: 0.4.13
4
4
  Summary: Hossam Data Helper
5
5
  Author-email: Lee Kwang-Ho <leekh4232@gmail.com>
6
6
  License-Expression: MIT
@@ -1,3 +1,6 @@
1
+ import importlib.metadata
2
+ import requests
3
+
1
4
  # submodules
2
5
  from . import hs_classroom
3
6
  from . import hs_gis
@@ -28,8 +31,26 @@ my_dpi = hs_plot.config.dpi
28
31
 
29
32
  __all__ = ["my_dpi", "load_data", "load_info", "hs_classroom", "hs_gis", "hs_plot", "hs_prep", "hs_stats", "hs_timeserise", "hs_util", "hs_cluster", "visualize_silhouette"]
30
33
 
31
- # 내부 모듈에서 hs_fig를 사용할 때는 아래와 같이 import 하세요.
32
- # from hossam import hs_fig
34
+
35
+ def check_pypi_latest(package_name: str):
36
+ # 설치된 버전
37
+ installed = importlib.metadata.version(package_name)
38
+
39
+ try:
40
+ # PyPI 최신 버전
41
+ url = f"https://pypi.org/pypi/{package_name}/json"
42
+ resp = requests.get(url, timeout=5)
43
+ resp.raise_for_status()
44
+ latest = resp.json()["info"]["version"]
45
+ except Exception:
46
+ latest = None
47
+
48
+ return {
49
+ "package": package_name,
50
+ "installed": installed,
51
+ "latest": latest,
52
+ "outdated": installed != latest
53
+ }
33
54
 
34
55
 
35
56
  def _init_korean_font():
@@ -70,6 +91,17 @@ def _init_korean_font():
70
91
 
71
92
  def _init():
72
93
 
94
+ version_info = check_pypi_latest("hossam")
95
+
96
+ if version_info["outdated"]:
97
+ print(
98
+ f"\n⚠️ 'hossam' 패키지의 최신 버전이 출시되었습니다! (설치된 버전: {version_info['installed']}, 최신 버전: {version_info['latest']})"
99
+ )
100
+ print(" 최신 버전으로 업데이트하려면 다음 명령어를 실행하세요:")
101
+ print(" pip install --upgrade hossam\n")
102
+
103
+ raise Warning("hossam 패키지가 최신 버전이 아닙니다.")
104
+
73
105
  # 안내 메시지 (블릿 리스트)
74
106
  messages = [
75
107
  "📦 아이티윌 이광호 강사가 제작한 라이브러리를 사용중입니다.",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hossam
3
- Version: 0.4.11
3
+ Version: 0.4.13
4
4
  Summary: Hossam Data Helper
5
5
  Author-email: Lee Kwang-Ho <leekh4232@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hossam"
7
- version = "0.4.11"
7
+ version = "0.4.13"
8
8
  description = "Hossam Data Helper"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes