SessionSmith 0.1.2__tar.gz → 0.1.3__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.
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/PKG-INFO +51 -1
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/__init__.py +1 -1
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/core.py +11 -3
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/manager.py +11 -3
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith.egg-info/PKG-INFO +51 -1
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/LICENSE +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/compare.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/formats.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/info.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/jupyter_utils.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/serializers.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/tracer.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/utils.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/version_control.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/visualizer.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/visualizer_arrays.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith/visualizer_generic.py +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith.egg-info/SOURCES.txt +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith.egg-info/dependency_links.txt +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith.egg-info/requires.txt +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/SessionSmith.egg-info/top_level.txt +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/setup.cfg +0 -0
- {sessionsmith-0.1.2 → sessionsmith-0.1.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: SessionSmith
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Simple session save/load utility for Jupyter notebooks using pickle
|
|
5
5
|
Home-page: https://github.com/yut0takagi/SessionSmith
|
|
6
6
|
Author: YutoTAKAGI
|
|
@@ -59,6 +59,7 @@ Dynamic: summary
|
|
|
59
59
|
- 🏷️ **バージョン管理**: Git風のコミット・チェックアウト機能
|
|
60
60
|
- 📈 **アルゴリズムトレーサー**: 1行ごとの変数状態記録・可視化
|
|
61
61
|
- 🎨 **可視化**: アルゴリズムの実行をアニメーションで表示
|
|
62
|
+
- 🚀 **拡張機能対応**: Cursor/VSCode拡張機能でコードを書かずに実行可能
|
|
62
63
|
|
|
63
64
|
## インストール
|
|
64
65
|
|
|
@@ -219,6 +220,55 @@ visualize_algorithm_trace(
|
|
|
219
220
|
)
|
|
220
221
|
```
|
|
221
222
|
|
|
223
|
+
## Cursor/VSCode拡張機能
|
|
224
|
+
|
|
225
|
+
SessionSmithには、Cursor/VSCode用の拡張機能が用意されています。コードを書かずに、GUIからセッションの保存・復元が可能です。
|
|
226
|
+
|
|
227
|
+
### インストール
|
|
228
|
+
|
|
229
|
+
**Open VSX Registryから:**
|
|
230
|
+
1. Cursor/VSCodeでコマンドパレット(Cmd+Shift+P / Ctrl+Shift+P)を開く
|
|
231
|
+
2. `Extensions: Install Extension` を選択
|
|
232
|
+
3. `SessionSmith` を検索してインストール
|
|
233
|
+
|
|
234
|
+
または、以下のURLから直接インストール:
|
|
235
|
+
- https://open-vsx.org/extension/yut0takagi/sessionsmith
|
|
236
|
+
|
|
237
|
+
### 使い方
|
|
238
|
+
|
|
239
|
+
#### Notebookでの使用
|
|
240
|
+
|
|
241
|
+
1. Jupyter Notebookを開く
|
|
242
|
+
2. 変数を定義:
|
|
243
|
+
```python
|
|
244
|
+
x = 42
|
|
245
|
+
y = "Hello"
|
|
246
|
+
z = [1, 2, 3]
|
|
247
|
+
```
|
|
248
|
+
3. コマンドパレットから `SessionSmith: Save Session` を選択
|
|
249
|
+
4. ファイル名を入力して保存
|
|
250
|
+
|
|
251
|
+
#### セッションの読み込み
|
|
252
|
+
|
|
253
|
+
1. コマンドパレットから `SessionSmith: Load Session` を選択
|
|
254
|
+
2. セッションファイル(.pkl, .json, .msgpack, .h5)を選択
|
|
255
|
+
3. 変数が自動的に復元されます
|
|
256
|
+
|
|
257
|
+
#### セッション情報の表示
|
|
258
|
+
|
|
259
|
+
- エクスプローラーでセッションファイルを右クリック
|
|
260
|
+
- 「Show Session Info」を選択
|
|
261
|
+
|
|
262
|
+
### 機能
|
|
263
|
+
|
|
264
|
+
- ✅ **Save Session**: 現在のPythonセッション(変数)を保存
|
|
265
|
+
- ✅ **Load Session**: セッションファイルを選択して変数を復元
|
|
266
|
+
- ✅ **Show Session Info**: セッションファイルの情報を表示
|
|
267
|
+
- ✅ **Notebook対応**: Jupyter Notebookでセルを追加せずに実行
|
|
268
|
+
- ✅ **自動検出**: Pythonインタープリターを自動検出(仮想環境対応)
|
|
269
|
+
|
|
270
|
+
詳細は [extension/README.md](extension/README.md) を参照してください。
|
|
271
|
+
|
|
222
272
|
## ライセンス
|
|
223
273
|
|
|
224
274
|
MIT
|
|
@@ -101,12 +101,13 @@ def _validate_on_error_option(on_error: str) -> str:
|
|
|
101
101
|
return on_error
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
def _get_globals_dict(globals_dict: Optional[Dict[str, Any]]) -> Dict[str, Any]:
|
|
104
|
+
def _get_globals_dict(globals_dict: Optional[Dict[str, Any]], depth: int = 2) -> Dict[str, Any]:
|
|
105
105
|
"""
|
|
106
106
|
グローバル変数辞書を取得します
|
|
107
107
|
|
|
108
108
|
Args:
|
|
109
109
|
globals_dict: グローバル変数辞書(Noneの場合は自動取得)
|
|
110
|
+
depth: 呼び出し元からのフレーム深度(デフォルトは2:_get_globals_dict -> save/load_session -> ユーザーコード)
|
|
110
111
|
|
|
111
112
|
Returns:
|
|
112
113
|
dict: グローバル変数辞書
|
|
@@ -118,9 +119,16 @@ def _get_globals_dict(globals_dict: Optional[Dict[str, Any]]) -> Dict[str, Any]:
|
|
|
118
119
|
|
|
119
120
|
try:
|
|
120
121
|
frame = inspect.currentframe()
|
|
121
|
-
if frame is None
|
|
122
|
+
if frame is None:
|
|
122
123
|
raise RuntimeError("Cannot access calling frame")
|
|
123
|
-
|
|
124
|
+
|
|
125
|
+
# 指定された深度までフレームを遡る
|
|
126
|
+
caller_frame = frame
|
|
127
|
+
for _ in range(depth):
|
|
128
|
+
if caller_frame.f_back is None:
|
|
129
|
+
raise RuntimeError("Cannot access calling frame at specified depth")
|
|
130
|
+
caller_frame = caller_frame.f_back
|
|
131
|
+
|
|
124
132
|
result = caller_frame.f_globals.copy()
|
|
125
133
|
del frame
|
|
126
134
|
return result
|
|
@@ -50,12 +50,13 @@ class SessionManager:
|
|
|
50
50
|
if enable_version_control and vc_base_path:
|
|
51
51
|
self._init_version_control()
|
|
52
52
|
|
|
53
|
-
def _get_globals_dict(self, globals_dict: Optional[Dict[str, Any]]) -> Dict[str, Any]:
|
|
53
|
+
def _get_globals_dict(self, globals_dict: Optional[Dict[str, Any]], depth: int = 2) -> Dict[str, Any]:
|
|
54
54
|
"""
|
|
55
55
|
グローバル変数辞書を取得します
|
|
56
56
|
|
|
57
57
|
Args:
|
|
58
58
|
globals_dict: グローバル変数辞書(Noneの場合は自動取得)
|
|
59
|
+
depth: 呼び出し元からのフレーム深度(デフォルトは2:_get_globals_dict -> __init__ -> ユーザーコード)
|
|
59
60
|
|
|
60
61
|
Returns:
|
|
61
62
|
dict: グローバル変数辞書
|
|
@@ -67,9 +68,16 @@ class SessionManager:
|
|
|
67
68
|
|
|
68
69
|
try:
|
|
69
70
|
frame = inspect.currentframe()
|
|
70
|
-
if frame is None
|
|
71
|
+
if frame is None:
|
|
71
72
|
raise RuntimeError("Cannot access calling frame")
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
# 指定された深度までフレームを遡る
|
|
75
|
+
caller_frame = frame
|
|
76
|
+
for _ in range(depth):
|
|
77
|
+
if caller_frame.f_back is None:
|
|
78
|
+
raise RuntimeError("Cannot access calling frame at specified depth")
|
|
79
|
+
caller_frame = caller_frame.f_back
|
|
80
|
+
|
|
73
81
|
result = caller_frame.f_globals.copy()
|
|
74
82
|
del frame
|
|
75
83
|
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: SessionSmith
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Simple session save/load utility for Jupyter notebooks using pickle
|
|
5
5
|
Home-page: https://github.com/yut0takagi/SessionSmith
|
|
6
6
|
Author: YutoTAKAGI
|
|
@@ -59,6 +59,7 @@ Dynamic: summary
|
|
|
59
59
|
- 🏷️ **バージョン管理**: Git風のコミット・チェックアウト機能
|
|
60
60
|
- 📈 **アルゴリズムトレーサー**: 1行ごとの変数状態記録・可視化
|
|
61
61
|
- 🎨 **可視化**: アルゴリズムの実行をアニメーションで表示
|
|
62
|
+
- 🚀 **拡張機能対応**: Cursor/VSCode拡張機能でコードを書かずに実行可能
|
|
62
63
|
|
|
63
64
|
## インストール
|
|
64
65
|
|
|
@@ -219,6 +220,55 @@ visualize_algorithm_trace(
|
|
|
219
220
|
)
|
|
220
221
|
```
|
|
221
222
|
|
|
223
|
+
## Cursor/VSCode拡張機能
|
|
224
|
+
|
|
225
|
+
SessionSmithには、Cursor/VSCode用の拡張機能が用意されています。コードを書かずに、GUIからセッションの保存・復元が可能です。
|
|
226
|
+
|
|
227
|
+
### インストール
|
|
228
|
+
|
|
229
|
+
**Open VSX Registryから:**
|
|
230
|
+
1. Cursor/VSCodeでコマンドパレット(Cmd+Shift+P / Ctrl+Shift+P)を開く
|
|
231
|
+
2. `Extensions: Install Extension` を選択
|
|
232
|
+
3. `SessionSmith` を検索してインストール
|
|
233
|
+
|
|
234
|
+
または、以下のURLから直接インストール:
|
|
235
|
+
- https://open-vsx.org/extension/yut0takagi/sessionsmith
|
|
236
|
+
|
|
237
|
+
### 使い方
|
|
238
|
+
|
|
239
|
+
#### Notebookでの使用
|
|
240
|
+
|
|
241
|
+
1. Jupyter Notebookを開く
|
|
242
|
+
2. 変数を定義:
|
|
243
|
+
```python
|
|
244
|
+
x = 42
|
|
245
|
+
y = "Hello"
|
|
246
|
+
z = [1, 2, 3]
|
|
247
|
+
```
|
|
248
|
+
3. コマンドパレットから `SessionSmith: Save Session` を選択
|
|
249
|
+
4. ファイル名を入力して保存
|
|
250
|
+
|
|
251
|
+
#### セッションの読み込み
|
|
252
|
+
|
|
253
|
+
1. コマンドパレットから `SessionSmith: Load Session` を選択
|
|
254
|
+
2. セッションファイル(.pkl, .json, .msgpack, .h5)を選択
|
|
255
|
+
3. 変数が自動的に復元されます
|
|
256
|
+
|
|
257
|
+
#### セッション情報の表示
|
|
258
|
+
|
|
259
|
+
- エクスプローラーでセッションファイルを右クリック
|
|
260
|
+
- 「Show Session Info」を選択
|
|
261
|
+
|
|
262
|
+
### 機能
|
|
263
|
+
|
|
264
|
+
- ✅ **Save Session**: 現在のPythonセッション(変数)を保存
|
|
265
|
+
- ✅ **Load Session**: セッションファイルを選択して変数を復元
|
|
266
|
+
- ✅ **Show Session Info**: セッションファイルの情報を表示
|
|
267
|
+
- ✅ **Notebook対応**: Jupyter Notebookでセルを追加せずに実行
|
|
268
|
+
- ✅ **自動検出**: Pythonインタープリターを自動検出(仮想環境対応)
|
|
269
|
+
|
|
270
|
+
詳細は [extension/README.md](extension/README.md) を参照してください。
|
|
271
|
+
|
|
222
272
|
## ライセンス
|
|
223
273
|
|
|
224
274
|
MIT
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|