isagellm-dev-tools 0.2.2.0__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.
- isagellm_dev_tools-0.2.2.0/MANIFEST.in +8 -0
- isagellm_dev_tools-0.2.2.0/PKG-INFO +173 -0
- isagellm_dev_tools-0.2.2.0/README.md +142 -0
- isagellm_dev_tools-0.2.2.0/pyproject.toml +131 -0
- isagellm_dev_tools-0.2.2.0/setup.cfg +4 -0
- isagellm_dev_tools-0.2.2.0/setup.py +9 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/PKG-INFO +173 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/SOURCES.txt +57 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/dependency_links.txt +1 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/entry_points.txt +3 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/requires.txt +13 -0
- isagellm_dev_tools-0.2.2.0/src/isagellm_dev_tools.egg-info/top_level.txt +1 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__init__.py +19 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__init__.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/__init__.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/checker.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/cli.cpython-311-pytest-8.4.2.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/cli.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/constants.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/fixer.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/github_cli.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/hooks_manager.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/pytorch_manager.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/__pycache__/repo_manager.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/checker.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/cli.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__init__.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/__init__.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/fix.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/gh.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/hooks.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/pytorch.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/repo.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/fix.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/gh.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/hooks.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/pytorch.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/repo.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/constants.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/fixer.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/github_cli.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/hooks_manager.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/py.typed +2 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/pytorch_manager.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/repo_manager.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/templates/ci_version_check.yml +45 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__init__.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__pycache__/__init__.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__pycache__/constants.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__pycache__/formatting.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__pycache__/git.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/__pycache__/github.cpython-311.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/constants.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/formatting.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/git.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/utils/github.pyc +0 -0
- isagellm_dev_tools-0.2.2.0/tests/test_cli.py +24 -0
- isagellm_dev_tools-0.2.2.0/tests/test_gh_commands.py +46 -0
- isagellm_dev_tools-0.2.2.0/tests/test_repo_commands.py +69 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: isagellm-dev-tools
|
|
3
|
+
Version: 0.2.2.0
|
|
4
|
+
Summary: Developer tools for sageLLM multi-repository development
|
|
5
|
+
Author-email: IntelliStream Team <intellistream@outlook.com>
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Project-URL: Homepage, https://github.com/intellistream/sagellm-dev-tools
|
|
8
|
+
Project-URL: Repository, https://github.com/intellistream/sagellm-dev-tools
|
|
9
|
+
Project-URL: Issues, https://github.com/intellistream/sagellm-dev-tools/issues
|
|
10
|
+
Keywords: llm,inference,developer-tools,sagellm
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: ==3.11.*
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: click>=8.1.0
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Requires-Dist: PyYAML>=6.0
|
|
22
|
+
Requires-Dist: GitPython>=3.1.0
|
|
23
|
+
Requires-Dist: requests>=2.31.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pre-commit>=3.3.0; extra == "dev"
|
|
31
|
+
|
|
32
|
+
# sagellm-dev-tools: sageLLM Developer Tools
|
|
33
|
+
|
|
34
|
+
**Status**: 🚧 Under Development\
|
|
35
|
+
**PyPI Package**: `isagellm-dev-tools`\
|
|
36
|
+
**CLI Tool**: `sagellm-dev`
|
|
37
|
+
|
|
38
|
+
## 🎯 Purpose
|
|
39
|
+
|
|
40
|
+
Unified developer toolkit for sageLLM multi-repository development workflow.
|
|
41
|
+
|
|
42
|
+
## 📦 Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Install from PyPI
|
|
46
|
+
pip install isagellm-dev-tools
|
|
47
|
+
|
|
48
|
+
# Or install from source
|
|
49
|
+
git clone git@github.com:intellistream/sagellm-dev-tools.git
|
|
50
|
+
cd sagellm-dev-tools
|
|
51
|
+
pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 🚀 Quick Start
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Initialize development environment (clone all repos)
|
|
58
|
+
sagellm-dev init
|
|
59
|
+
|
|
60
|
+
# Sync all repositories
|
|
61
|
+
sagellm-dev sync
|
|
62
|
+
|
|
63
|
+
# Check architecture and dependencies
|
|
64
|
+
sagellm-dev check
|
|
65
|
+
|
|
66
|
+
# Install git hooks to all repos
|
|
67
|
+
sagellm-dev hooks install
|
|
68
|
+
|
|
69
|
+
# Push all repositories
|
|
70
|
+
sagellm-dev push
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 📖 Command Reference
|
|
74
|
+
|
|
75
|
+
### Repository Management
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
sagellm-dev init # Clone all sageLLM repositories
|
|
79
|
+
sagellm-dev sync [--all] # Sync all repos (git pull)
|
|
80
|
+
sagellm-dev push [--check] # Batch push
|
|
81
|
+
sagellm-dev merge <from> <to> # Batch merge branches
|
|
82
|
+
sagellm-dev status # Show status of all repos
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Architecture & Dependency Checks
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
sagellm-dev check # Run all checks
|
|
89
|
+
sagellm-dev check --arch # Architecture conformance
|
|
90
|
+
sagellm-dev check --deps # Dependency versions
|
|
91
|
+
sagellm-dev check --hooks # Git hooks integrity
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Tool Fixes
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
sagellm-dev fix # Run all fixes
|
|
98
|
+
sagellm-dev fix --tools # Fix tool versions (ruff, pre-commit)
|
|
99
|
+
sagellm-dev fix --deps # Fix dependency mismatches
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Git Hooks Management
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
sagellm-dev hooks install # Install hooks to all repos
|
|
106
|
+
sagellm-dev hooks uninstall # Remove hooks
|
|
107
|
+
sagellm-dev hooks update # Update hook templates
|
|
108
|
+
sagellm-dev hooks status # Check hooks status
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### PyTorch Management
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
sagellm-dev pytorch download <version> <platform> # Download wheels
|
|
115
|
+
sagellm-dev pytorch upload <version> <platform> # Upload to GitHub
|
|
116
|
+
sagellm-dev pytorch list # List versions
|
|
117
|
+
|
|
118
|
+
# Examples:
|
|
119
|
+
sagellm-dev pytorch download 2.5.1 cu121 # CUDA 12.1
|
|
120
|
+
sagellm-dev pytorch download 2.5.1 cpu # CPU only
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Information
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
sagellm-dev info # Show environment info
|
|
127
|
+
sagellm-dev version # Show version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### GitHub Issue Management
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
sagellm-dev gh list <repo> # List open issues
|
|
134
|
+
sagellm-dev gh view <repo> <issue> # View issue details
|
|
135
|
+
sagellm-dev gh assign <repo> <issue> <user> # Assign issue to user
|
|
136
|
+
sagellm-dev gh assign-batch <repo> <user> <issues...> # Batch assign
|
|
137
|
+
sagellm-dev gh priority <repo> # Group by assignee/priority
|
|
138
|
+
sagellm-dev gh create <repo> --title "..." # Create issue
|
|
139
|
+
[--body "..."] [--assignee user]... [--label label]...
|
|
140
|
+
|
|
141
|
+
# Examples:
|
|
142
|
+
sagellm-dev gh create sagellm-website --title "[Feature] Leaderboard" \
|
|
143
|
+
--body "负责人:王明琪" --assignee MingqiWang-coder --label enhancement
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## 🏗️ Architecture
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
sagellm-dev-tools/
|
|
150
|
+
├── src/sagellm_dev_tools/
|
|
151
|
+
│ ├── cli.py # Main CLI entry
|
|
152
|
+
│ ├── repo_manager.py # Repository operations
|
|
153
|
+
│ ├── checker.py # Architecture/dependency checks
|
|
154
|
+
│ ├── fixer.py # Automated fixes
|
|
155
|
+
│ ├── hooks_manager.py # Git hooks management
|
|
156
|
+
│ ├── pytorch_manager.py # PyTorch download/upload
|
|
157
|
+
│ ├── constants.py # Constants
|
|
158
|
+
│ └── templates/ # Git hook templates
|
|
159
|
+
└── tests/
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## 🔒 Privacy
|
|
163
|
+
|
|
164
|
+
This is a **private** repository. Internal use only for sageLLM development team.
|
|
165
|
+
|
|
166
|
+
## 📄 License
|
|
167
|
+
|
|
168
|
+
Proprietary - Internal Use Only
|
|
169
|
+
|
|
170
|
+
______________________________________________________________________
|
|
171
|
+
|
|
172
|
+
**Maintainer**: IntelliStream Team\
|
|
173
|
+
**Related**: [sagellm](https://github.com/intellistream/sagellm)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# sagellm-dev-tools: sageLLM Developer Tools
|
|
2
|
+
|
|
3
|
+
**Status**: 🚧 Under Development\
|
|
4
|
+
**PyPI Package**: `isagellm-dev-tools`\
|
|
5
|
+
**CLI Tool**: `sagellm-dev`
|
|
6
|
+
|
|
7
|
+
## 🎯 Purpose
|
|
8
|
+
|
|
9
|
+
Unified developer toolkit for sageLLM multi-repository development workflow.
|
|
10
|
+
|
|
11
|
+
## 📦 Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install from PyPI
|
|
15
|
+
pip install isagellm-dev-tools
|
|
16
|
+
|
|
17
|
+
# Or install from source
|
|
18
|
+
git clone git@github.com:intellistream/sagellm-dev-tools.git
|
|
19
|
+
cd sagellm-dev-tools
|
|
20
|
+
pip install -e .
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 🚀 Quick Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Initialize development environment (clone all repos)
|
|
27
|
+
sagellm-dev init
|
|
28
|
+
|
|
29
|
+
# Sync all repositories
|
|
30
|
+
sagellm-dev sync
|
|
31
|
+
|
|
32
|
+
# Check architecture and dependencies
|
|
33
|
+
sagellm-dev check
|
|
34
|
+
|
|
35
|
+
# Install git hooks to all repos
|
|
36
|
+
sagellm-dev hooks install
|
|
37
|
+
|
|
38
|
+
# Push all repositories
|
|
39
|
+
sagellm-dev push
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 📖 Command Reference
|
|
43
|
+
|
|
44
|
+
### Repository Management
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
sagellm-dev init # Clone all sageLLM repositories
|
|
48
|
+
sagellm-dev sync [--all] # Sync all repos (git pull)
|
|
49
|
+
sagellm-dev push [--check] # Batch push
|
|
50
|
+
sagellm-dev merge <from> <to> # Batch merge branches
|
|
51
|
+
sagellm-dev status # Show status of all repos
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Architecture & Dependency Checks
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
sagellm-dev check # Run all checks
|
|
58
|
+
sagellm-dev check --arch # Architecture conformance
|
|
59
|
+
sagellm-dev check --deps # Dependency versions
|
|
60
|
+
sagellm-dev check --hooks # Git hooks integrity
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Tool Fixes
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
sagellm-dev fix # Run all fixes
|
|
67
|
+
sagellm-dev fix --tools # Fix tool versions (ruff, pre-commit)
|
|
68
|
+
sagellm-dev fix --deps # Fix dependency mismatches
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Git Hooks Management
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
sagellm-dev hooks install # Install hooks to all repos
|
|
75
|
+
sagellm-dev hooks uninstall # Remove hooks
|
|
76
|
+
sagellm-dev hooks update # Update hook templates
|
|
77
|
+
sagellm-dev hooks status # Check hooks status
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### PyTorch Management
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
sagellm-dev pytorch download <version> <platform> # Download wheels
|
|
84
|
+
sagellm-dev pytorch upload <version> <platform> # Upload to GitHub
|
|
85
|
+
sagellm-dev pytorch list # List versions
|
|
86
|
+
|
|
87
|
+
# Examples:
|
|
88
|
+
sagellm-dev pytorch download 2.5.1 cu121 # CUDA 12.1
|
|
89
|
+
sagellm-dev pytorch download 2.5.1 cpu # CPU only
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Information
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
sagellm-dev info # Show environment info
|
|
96
|
+
sagellm-dev version # Show version
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### GitHub Issue Management
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
sagellm-dev gh list <repo> # List open issues
|
|
103
|
+
sagellm-dev gh view <repo> <issue> # View issue details
|
|
104
|
+
sagellm-dev gh assign <repo> <issue> <user> # Assign issue to user
|
|
105
|
+
sagellm-dev gh assign-batch <repo> <user> <issues...> # Batch assign
|
|
106
|
+
sagellm-dev gh priority <repo> # Group by assignee/priority
|
|
107
|
+
sagellm-dev gh create <repo> --title "..." # Create issue
|
|
108
|
+
[--body "..."] [--assignee user]... [--label label]...
|
|
109
|
+
|
|
110
|
+
# Examples:
|
|
111
|
+
sagellm-dev gh create sagellm-website --title "[Feature] Leaderboard" \
|
|
112
|
+
--body "负责人:王明琪" --assignee MingqiWang-coder --label enhancement
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 🏗️ Architecture
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
sagellm-dev-tools/
|
|
119
|
+
├── src/sagellm_dev_tools/
|
|
120
|
+
│ ├── cli.py # Main CLI entry
|
|
121
|
+
│ ├── repo_manager.py # Repository operations
|
|
122
|
+
│ ├── checker.py # Architecture/dependency checks
|
|
123
|
+
│ ├── fixer.py # Automated fixes
|
|
124
|
+
│ ├── hooks_manager.py # Git hooks management
|
|
125
|
+
│ ├── pytorch_manager.py # PyTorch download/upload
|
|
126
|
+
│ ├── constants.py # Constants
|
|
127
|
+
│ └── templates/ # Git hook templates
|
|
128
|
+
└── tests/
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 🔒 Privacy
|
|
132
|
+
|
|
133
|
+
This is a **private** repository. Internal use only for sageLLM development team.
|
|
134
|
+
|
|
135
|
+
## 📄 License
|
|
136
|
+
|
|
137
|
+
Proprietary - Internal Use Only
|
|
138
|
+
|
|
139
|
+
______________________________________________________________________
|
|
140
|
+
|
|
141
|
+
**Maintainer**: IntelliStream Team\
|
|
142
|
+
**Related**: [sagellm](https://github.com/intellistream/sagellm)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "isagellm-dev-tools"
|
|
7
|
+
version = "0.2.2.0"
|
|
8
|
+
description = "Developer tools for sageLLM multi-repository development"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = "==3.11.*"
|
|
11
|
+
license = { text = "Proprietary" }
|
|
12
|
+
authors = [{ name = "IntelliStream Team", email = "intellistream@outlook.com" }]
|
|
13
|
+
keywords = ["llm", "inference", "developer-tools", "sagellm"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
dependencies = [
|
|
24
|
+
"click>=8.1.0",
|
|
25
|
+
"rich>=13.0.0",
|
|
26
|
+
"PyYAML>=6.0",
|
|
27
|
+
"GitPython>=3.1.0",
|
|
28
|
+
"requests>=2.31.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=7.4.0",
|
|
34
|
+
"pytest-cov>=4.1.0",
|
|
35
|
+
"pytest-asyncio>=0.21.0",
|
|
36
|
+
"ruff>=0.8.0",
|
|
37
|
+
"mypy>=1.5.0",
|
|
38
|
+
"pre-commit>=3.3.0",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
sagellm-dev = "sagellm_dev_tools.cli:main"
|
|
43
|
+
sage-dev = "sagellm_dev_tools.cli:main"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/intellistream/sagellm-dev-tools"
|
|
47
|
+
Repository = "https://github.com/intellistream/sagellm-dev-tools"
|
|
48
|
+
Issues = "https://github.com/intellistream/sagellm-dev-tools/issues"
|
|
49
|
+
|
|
50
|
+
[tool.setuptools]
|
|
51
|
+
packages = ["sagellm_dev_tools"]
|
|
52
|
+
package-dir = { "" = "src" }
|
|
53
|
+
include-package-data = true
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.package-data]
|
|
56
|
+
sagellm_dev_tools = ["py.typed", "templates/*"]
|
|
57
|
+
"*" = ["*.pyc", "*.pyo", "__pycache__/*", "*.so", "*.pyd", "*.dylib"]
|
|
58
|
+
|
|
59
|
+
[tool.ruff]
|
|
60
|
+
line-length = 100
|
|
61
|
+
target-version = "py310"
|
|
62
|
+
|
|
63
|
+
[tool.ruff.lint]
|
|
64
|
+
select = [
|
|
65
|
+
"E",
|
|
66
|
+
"F",
|
|
67
|
+
"W",
|
|
68
|
+
"I",
|
|
69
|
+
"N",
|
|
70
|
+
"UP",
|
|
71
|
+
"ANN",
|
|
72
|
+
"B",
|
|
73
|
+
"A",
|
|
74
|
+
"COM",
|
|
75
|
+
"C4",
|
|
76
|
+
"DTZ",
|
|
77
|
+
"T10",
|
|
78
|
+
"ISC",
|
|
79
|
+
"ICN",
|
|
80
|
+
"G",
|
|
81
|
+
"PIE",
|
|
82
|
+
"T20",
|
|
83
|
+
"PYI",
|
|
84
|
+
"PT",
|
|
85
|
+
"Q",
|
|
86
|
+
"RSE",
|
|
87
|
+
"RET",
|
|
88
|
+
"SLF",
|
|
89
|
+
"SIM",
|
|
90
|
+
"TID",
|
|
91
|
+
"TCH",
|
|
92
|
+
"ARG",
|
|
93
|
+
"PTH",
|
|
94
|
+
"ERA",
|
|
95
|
+
"PD",
|
|
96
|
+
"PGH",
|
|
97
|
+
"PL",
|
|
98
|
+
"TRY",
|
|
99
|
+
"NPY",
|
|
100
|
+
"RUF",
|
|
101
|
+
]
|
|
102
|
+
ignore = ["ANN101", "ANN102", "ANN401", "COM812", "ISC001"]
|
|
103
|
+
|
|
104
|
+
[tool.ruff.lint.per-file-ignores]
|
|
105
|
+
"tests/**/*.py" = ["ANN", "ARG", "PLR2004"]
|
|
106
|
+
|
|
107
|
+
[tool.pytest.ini_options]
|
|
108
|
+
testpaths = ["tests"]
|
|
109
|
+
python_files = ["test_*.py"]
|
|
110
|
+
python_functions = ["test_*"]
|
|
111
|
+
addopts = "-v --strict-markers"
|
|
112
|
+
markers = [
|
|
113
|
+
"slow: marks tests as slow",
|
|
114
|
+
"integration: marks tests as integration tests",
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
[tool.mypy]
|
|
118
|
+
python_version = "3.10"
|
|
119
|
+
warn_return_any = true
|
|
120
|
+
warn_unused_configs = true
|
|
121
|
+
disallow_untyped_defs = true
|
|
122
|
+
disallow_incomplete_defs = true
|
|
123
|
+
check_untyped_defs = true
|
|
124
|
+
strict_optional = true
|
|
125
|
+
warn_redundant_casts = true
|
|
126
|
+
warn_unused_ignores = true
|
|
127
|
+
warn_no_return = true
|
|
128
|
+
|
|
129
|
+
[[tool.mypy.overrides]]
|
|
130
|
+
module = "tests.*"
|
|
131
|
+
disallow_untyped_defs = false
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: isagellm-dev-tools
|
|
3
|
+
Version: 0.2.2.0
|
|
4
|
+
Summary: Developer tools for sageLLM multi-repository development
|
|
5
|
+
Author-email: IntelliStream Team <intellistream@outlook.com>
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Project-URL: Homepage, https://github.com/intellistream/sagellm-dev-tools
|
|
8
|
+
Project-URL: Repository, https://github.com/intellistream/sagellm-dev-tools
|
|
9
|
+
Project-URL: Issues, https://github.com/intellistream/sagellm-dev-tools/issues
|
|
10
|
+
Keywords: llm,inference,developer-tools,sagellm
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: ==3.11.*
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: click>=8.1.0
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Requires-Dist: PyYAML>=6.0
|
|
22
|
+
Requires-Dist: GitPython>=3.1.0
|
|
23
|
+
Requires-Dist: requests>=2.31.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pre-commit>=3.3.0; extra == "dev"
|
|
31
|
+
|
|
32
|
+
# sagellm-dev-tools: sageLLM Developer Tools
|
|
33
|
+
|
|
34
|
+
**Status**: 🚧 Under Development\
|
|
35
|
+
**PyPI Package**: `isagellm-dev-tools`\
|
|
36
|
+
**CLI Tool**: `sagellm-dev`
|
|
37
|
+
|
|
38
|
+
## 🎯 Purpose
|
|
39
|
+
|
|
40
|
+
Unified developer toolkit for sageLLM multi-repository development workflow.
|
|
41
|
+
|
|
42
|
+
## 📦 Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Install from PyPI
|
|
46
|
+
pip install isagellm-dev-tools
|
|
47
|
+
|
|
48
|
+
# Or install from source
|
|
49
|
+
git clone git@github.com:intellistream/sagellm-dev-tools.git
|
|
50
|
+
cd sagellm-dev-tools
|
|
51
|
+
pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 🚀 Quick Start
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Initialize development environment (clone all repos)
|
|
58
|
+
sagellm-dev init
|
|
59
|
+
|
|
60
|
+
# Sync all repositories
|
|
61
|
+
sagellm-dev sync
|
|
62
|
+
|
|
63
|
+
# Check architecture and dependencies
|
|
64
|
+
sagellm-dev check
|
|
65
|
+
|
|
66
|
+
# Install git hooks to all repos
|
|
67
|
+
sagellm-dev hooks install
|
|
68
|
+
|
|
69
|
+
# Push all repositories
|
|
70
|
+
sagellm-dev push
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 📖 Command Reference
|
|
74
|
+
|
|
75
|
+
### Repository Management
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
sagellm-dev init # Clone all sageLLM repositories
|
|
79
|
+
sagellm-dev sync [--all] # Sync all repos (git pull)
|
|
80
|
+
sagellm-dev push [--check] # Batch push
|
|
81
|
+
sagellm-dev merge <from> <to> # Batch merge branches
|
|
82
|
+
sagellm-dev status # Show status of all repos
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Architecture & Dependency Checks
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
sagellm-dev check # Run all checks
|
|
89
|
+
sagellm-dev check --arch # Architecture conformance
|
|
90
|
+
sagellm-dev check --deps # Dependency versions
|
|
91
|
+
sagellm-dev check --hooks # Git hooks integrity
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Tool Fixes
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
sagellm-dev fix # Run all fixes
|
|
98
|
+
sagellm-dev fix --tools # Fix tool versions (ruff, pre-commit)
|
|
99
|
+
sagellm-dev fix --deps # Fix dependency mismatches
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Git Hooks Management
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
sagellm-dev hooks install # Install hooks to all repos
|
|
106
|
+
sagellm-dev hooks uninstall # Remove hooks
|
|
107
|
+
sagellm-dev hooks update # Update hook templates
|
|
108
|
+
sagellm-dev hooks status # Check hooks status
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### PyTorch Management
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
sagellm-dev pytorch download <version> <platform> # Download wheels
|
|
115
|
+
sagellm-dev pytorch upload <version> <platform> # Upload to GitHub
|
|
116
|
+
sagellm-dev pytorch list # List versions
|
|
117
|
+
|
|
118
|
+
# Examples:
|
|
119
|
+
sagellm-dev pytorch download 2.5.1 cu121 # CUDA 12.1
|
|
120
|
+
sagellm-dev pytorch download 2.5.1 cpu # CPU only
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Information
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
sagellm-dev info # Show environment info
|
|
127
|
+
sagellm-dev version # Show version
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### GitHub Issue Management
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
sagellm-dev gh list <repo> # List open issues
|
|
134
|
+
sagellm-dev gh view <repo> <issue> # View issue details
|
|
135
|
+
sagellm-dev gh assign <repo> <issue> <user> # Assign issue to user
|
|
136
|
+
sagellm-dev gh assign-batch <repo> <user> <issues...> # Batch assign
|
|
137
|
+
sagellm-dev gh priority <repo> # Group by assignee/priority
|
|
138
|
+
sagellm-dev gh create <repo> --title "..." # Create issue
|
|
139
|
+
[--body "..."] [--assignee user]... [--label label]...
|
|
140
|
+
|
|
141
|
+
# Examples:
|
|
142
|
+
sagellm-dev gh create sagellm-website --title "[Feature] Leaderboard" \
|
|
143
|
+
--body "负责人:王明琪" --assignee MingqiWang-coder --label enhancement
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## 🏗️ Architecture
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
sagellm-dev-tools/
|
|
150
|
+
├── src/sagellm_dev_tools/
|
|
151
|
+
│ ├── cli.py # Main CLI entry
|
|
152
|
+
│ ├── repo_manager.py # Repository operations
|
|
153
|
+
│ ├── checker.py # Architecture/dependency checks
|
|
154
|
+
│ ├── fixer.py # Automated fixes
|
|
155
|
+
│ ├── hooks_manager.py # Git hooks management
|
|
156
|
+
│ ├── pytorch_manager.py # PyTorch download/upload
|
|
157
|
+
│ ├── constants.py # Constants
|
|
158
|
+
│ └── templates/ # Git hook templates
|
|
159
|
+
└── tests/
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## 🔒 Privacy
|
|
163
|
+
|
|
164
|
+
This is a **private** repository. Internal use only for sageLLM development team.
|
|
165
|
+
|
|
166
|
+
## 📄 License
|
|
167
|
+
|
|
168
|
+
Proprietary - Internal Use Only
|
|
169
|
+
|
|
170
|
+
______________________________________________________________________
|
|
171
|
+
|
|
172
|
+
**Maintainer**: IntelliStream Team\
|
|
173
|
+
**Related**: [sagellm](https://github.com/intellistream/sagellm)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
src/isagellm_dev_tools.egg-info/PKG-INFO
|
|
6
|
+
src/isagellm_dev_tools.egg-info/SOURCES.txt
|
|
7
|
+
src/isagellm_dev_tools.egg-info/dependency_links.txt
|
|
8
|
+
src/isagellm_dev_tools.egg-info/entry_points.txt
|
|
9
|
+
src/isagellm_dev_tools.egg-info/requires.txt
|
|
10
|
+
src/isagellm_dev_tools.egg-info/top_level.txt
|
|
11
|
+
src/sagellm_dev_tools/__init__.py
|
|
12
|
+
src/sagellm_dev_tools/__init__.pyc
|
|
13
|
+
src/sagellm_dev_tools/checker.pyc
|
|
14
|
+
src/sagellm_dev_tools/cli.pyc
|
|
15
|
+
src/sagellm_dev_tools/constants.pyc
|
|
16
|
+
src/sagellm_dev_tools/fixer.pyc
|
|
17
|
+
src/sagellm_dev_tools/github_cli.pyc
|
|
18
|
+
src/sagellm_dev_tools/hooks_manager.pyc
|
|
19
|
+
src/sagellm_dev_tools/py.typed
|
|
20
|
+
src/sagellm_dev_tools/pytorch_manager.pyc
|
|
21
|
+
src/sagellm_dev_tools/repo_manager.pyc
|
|
22
|
+
src/sagellm_dev_tools/__pycache__/__init__.cpython-311.pyc
|
|
23
|
+
src/sagellm_dev_tools/__pycache__/checker.cpython-311.pyc
|
|
24
|
+
src/sagellm_dev_tools/__pycache__/cli.cpython-311-pytest-8.4.2.pyc
|
|
25
|
+
src/sagellm_dev_tools/__pycache__/cli.cpython-311.pyc
|
|
26
|
+
src/sagellm_dev_tools/__pycache__/constants.cpython-311.pyc
|
|
27
|
+
src/sagellm_dev_tools/__pycache__/fixer.cpython-311.pyc
|
|
28
|
+
src/sagellm_dev_tools/__pycache__/github_cli.cpython-311.pyc
|
|
29
|
+
src/sagellm_dev_tools/__pycache__/hooks_manager.cpython-311.pyc
|
|
30
|
+
src/sagellm_dev_tools/__pycache__/pytorch_manager.cpython-311.pyc
|
|
31
|
+
src/sagellm_dev_tools/__pycache__/repo_manager.cpython-311.pyc
|
|
32
|
+
src/sagellm_dev_tools/commands/__init__.pyc
|
|
33
|
+
src/sagellm_dev_tools/commands/fix.pyc
|
|
34
|
+
src/sagellm_dev_tools/commands/gh.pyc
|
|
35
|
+
src/sagellm_dev_tools/commands/hooks.pyc
|
|
36
|
+
src/sagellm_dev_tools/commands/pytorch.pyc
|
|
37
|
+
src/sagellm_dev_tools/commands/repo.pyc
|
|
38
|
+
src/sagellm_dev_tools/commands/__pycache__/__init__.cpython-311.pyc
|
|
39
|
+
src/sagellm_dev_tools/commands/__pycache__/fix.cpython-311.pyc
|
|
40
|
+
src/sagellm_dev_tools/commands/__pycache__/gh.cpython-311.pyc
|
|
41
|
+
src/sagellm_dev_tools/commands/__pycache__/hooks.cpython-311.pyc
|
|
42
|
+
src/sagellm_dev_tools/commands/__pycache__/pytorch.cpython-311.pyc
|
|
43
|
+
src/sagellm_dev_tools/commands/__pycache__/repo.cpython-311.pyc
|
|
44
|
+
src/sagellm_dev_tools/templates/ci_version_check.yml
|
|
45
|
+
src/sagellm_dev_tools/utils/__init__.pyc
|
|
46
|
+
src/sagellm_dev_tools/utils/constants.pyc
|
|
47
|
+
src/sagellm_dev_tools/utils/formatting.pyc
|
|
48
|
+
src/sagellm_dev_tools/utils/git.pyc
|
|
49
|
+
src/sagellm_dev_tools/utils/github.pyc
|
|
50
|
+
src/sagellm_dev_tools/utils/__pycache__/__init__.cpython-311.pyc
|
|
51
|
+
src/sagellm_dev_tools/utils/__pycache__/constants.cpython-311.pyc
|
|
52
|
+
src/sagellm_dev_tools/utils/__pycache__/formatting.cpython-311.pyc
|
|
53
|
+
src/sagellm_dev_tools/utils/__pycache__/git.cpython-311.pyc
|
|
54
|
+
src/sagellm_dev_tools/utils/__pycache__/github.cpython-311.pyc
|
|
55
|
+
tests/test_cli.py
|
|
56
|
+
tests/test_gh_commands.py
|
|
57
|
+
tests/test_repo_commands.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sagellm_dev_tools
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""sageLLM Developer Tools.
|
|
2
|
+
|
|
3
|
+
Unified toolkit for sageLLM multi-repository development workflow.
|
|
4
|
+
|
|
5
|
+
CLI Tool: sage-dev
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
$ sage-dev init # Clone all repos
|
|
9
|
+
$ sage-dev sync # Sync all repos
|
|
10
|
+
$ sage-dev check # Run checks
|
|
11
|
+
$ sage-dev hooks install # Install git hooks
|
|
12
|
+
$ sage-dev gh list <repo> # List open issues
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
__version__ = "0.2.2.0"
|
|
18
|
+
|
|
19
|
+
__all__ = ["__version__"]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
isagellm_dev_tools-0.2.2.0/src/sagellm_dev_tools/commands/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ─────────────────────────────────────────────────────────────────
|
|
2
|
+
# Version Check - Ensure tool versions match between local and CI
|
|
3
|
+
# ─────────────────────────────────────────────────────────────────
|
|
4
|
+
version-check:
|
|
5
|
+
name: Check Tool Versions
|
|
6
|
+
runs-on: self-hosted
|
|
7
|
+
steps:
|
|
8
|
+
- uses: actions/checkout@v4
|
|
9
|
+
|
|
10
|
+
- name: Set up Python
|
|
11
|
+
uses: actions/setup-python@v5
|
|
12
|
+
with:
|
|
13
|
+
python-version: "3.11"
|
|
14
|
+
|
|
15
|
+
- name: Install ruff
|
|
16
|
+
run: |
|
|
17
|
+
python -m pip install --upgrade pip
|
|
18
|
+
pip install ruff
|
|
19
|
+
|
|
20
|
+
- name: Check ruff version consistency
|
|
21
|
+
run: |
|
|
22
|
+
# Get local ruff version
|
|
23
|
+
LOCAL_RUFF=$(ruff --version | awk '{print $2}')
|
|
24
|
+
echo "Local ruff: $LOCAL_RUFF"
|
|
25
|
+
|
|
26
|
+
# Get pre-commit config ruff version
|
|
27
|
+
if [ -f .pre-commit-config.yaml ]; then
|
|
28
|
+
PRECOMMIT_RUFF=$(grep -A 2 'ruff-pre-commit' .pre-commit-config.yaml | grep 'rev:' | awk '{print $2}' | sed 's/v//')
|
|
29
|
+
echo "Pre-commit ruff: v$PRECOMMIT_RUFF"
|
|
30
|
+
|
|
31
|
+
# Compare versions
|
|
32
|
+
if [ "$LOCAL_RUFF" != "$PRECOMMIT_RUFF" ]; then
|
|
33
|
+
echo "::error::❌ Version mismatch! Local ruff ($LOCAL_RUFF) != pre-commit ruff (v$PRECOMMIT_RUFF)"
|
|
34
|
+
echo ""
|
|
35
|
+
echo "To fix this, run:"
|
|
36
|
+
echo " pip install ruff==$PRECOMMIT_RUFF"
|
|
37
|
+
echo "Or update .pre-commit-config.yaml:"
|
|
38
|
+
echo " pre-commit autoupdate"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
echo "✅ Versions match: $LOCAL_RUFF"
|
|
43
|
+
else
|
|
44
|
+
echo "⚠️ No .pre-commit-config.yaml found, skipping check"
|
|
45
|
+
fi
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""CLI smoke tests."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from click.testing import CliRunner
|
|
6
|
+
|
|
7
|
+
from sagellm_dev_tools.cli import main
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_cli_help() -> None:
|
|
11
|
+
runner = CliRunner()
|
|
12
|
+
result = runner.invoke(main, ["--help"])
|
|
13
|
+
|
|
14
|
+
assert result.exit_code == 0
|
|
15
|
+
assert "sagellm-dev" in result.output
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_cli_no_args_shows_quick_commands() -> None:
|
|
19
|
+
runner = CliRunner()
|
|
20
|
+
result = runner.invoke(main, [])
|
|
21
|
+
|
|
22
|
+
assert result.exit_code == 0
|
|
23
|
+
assert "Quick commands" in result.output
|
|
24
|
+
assert "sagellm-dev init" in result.output
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""GitHub command unit tests."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from click.testing import CliRunner
|
|
6
|
+
|
|
7
|
+
import sagellm_dev_tools.commands.gh as gh_cmd
|
|
8
|
+
from sagellm_dev_tools.github_cli import IssueInfo
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_extract_priority_from_title_and_labels() -> None:
|
|
12
|
+
assert gh_cmd._extract_priority("[P0] urgent", []) == 0
|
|
13
|
+
assert gh_cmd._extract_priority("Fix", ["P2"]) == 2
|
|
14
|
+
assert gh_cmd._extract_priority("Fix", ["priority/P1"]) == 1
|
|
15
|
+
assert gh_cmd._extract_priority("Fix", []) == 99
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_gh_list_flat_table(monkeypatch) -> None:
|
|
19
|
+
runner = CliRunner()
|
|
20
|
+
|
|
21
|
+
monkeypatch.setattr(gh_cmd, "SAGELLM_REPOS", ["repo-a"])
|
|
22
|
+
|
|
23
|
+
class DummyGitHubCLI:
|
|
24
|
+
def list_issues(self, repo: str, state: str = "open", limit: int = 200):
|
|
25
|
+
return [
|
|
26
|
+
IssueInfo(
|
|
27
|
+
number=1,
|
|
28
|
+
title="[P1] Sample issue",
|
|
29
|
+
state="open",
|
|
30
|
+
assignees=["alice"],
|
|
31
|
+
labels=["P1"],
|
|
32
|
+
body="details",
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
def get_current_user_login(self):
|
|
37
|
+
return "alice"
|
|
38
|
+
|
|
39
|
+
monkeypatch.setattr(gh_cmd, "GitHubCLI", DummyGitHubCLI)
|
|
40
|
+
|
|
41
|
+
result = runner.invoke(gh_cmd.gh, ["list", "repo-a"])
|
|
42
|
+
|
|
43
|
+
assert result.exit_code == 0
|
|
44
|
+
assert "Sample issue" in result.output
|
|
45
|
+
assert "repo-a" in result.output
|
|
46
|
+
assert "P1" in result.output
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Repository command unit tests."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from click.testing import CliRunner
|
|
6
|
+
|
|
7
|
+
import sagellm_dev_tools.commands.repo as repo_cmd
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_init_reports_success_and_skip(monkeypatch) -> None:
|
|
11
|
+
runner = CliRunner()
|
|
12
|
+
|
|
13
|
+
monkeypatch.setattr(repo_cmd, "SAGELLM_REPOS", ["repo-a", "repo-b"])
|
|
14
|
+
|
|
15
|
+
def fake_clone(repo: str, parent_dir: str, use_ssh: bool = True) -> bool:
|
|
16
|
+
return repo == "repo-a"
|
|
17
|
+
|
|
18
|
+
monkeypatch.setattr(repo_cmd, "clone_repository", fake_clone)
|
|
19
|
+
|
|
20
|
+
result = runner.invoke(repo_cmd.init, ["--parent-dir", "/tmp", "--https"])
|
|
21
|
+
|
|
22
|
+
assert result.exit_code == 0
|
|
23
|
+
assert "Cloned: 1" in result.output
|
|
24
|
+
assert "Skipped: 1" in result.output
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_push_check_skips_dirty_repo(monkeypatch) -> None:
|
|
28
|
+
runner = CliRunner()
|
|
29
|
+
|
|
30
|
+
monkeypatch.setattr(repo_cmd, "SAGELLM_REPOS", ["repo-a"])
|
|
31
|
+
|
|
32
|
+
def fake_status(repo: str, parent_dir: str) -> dict:
|
|
33
|
+
return {"exists": True, "is_repo": True, "dirty": True}
|
|
34
|
+
|
|
35
|
+
def fake_push(repo: str, parent_dir: str) -> dict:
|
|
36
|
+
raise AssertionError("push_repository should not be called for dirty repo")
|
|
37
|
+
|
|
38
|
+
monkeypatch.setattr(repo_cmd, "get_repo_status", fake_status)
|
|
39
|
+
monkeypatch.setattr(repo_cmd, "push_repository", fake_push)
|
|
40
|
+
|
|
41
|
+
result = runner.invoke(repo_cmd.push, ["--parent-dir", "/tmp", "--check"])
|
|
42
|
+
|
|
43
|
+
assert result.exit_code == 0
|
|
44
|
+
assert "uncommitted changes" in result.output
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def test_status_outputs_repo_state(monkeypatch) -> None:
|
|
48
|
+
runner = CliRunner()
|
|
49
|
+
|
|
50
|
+
monkeypatch.setattr(repo_cmd, "SAGELLM_REPOS", ["repo-a"])
|
|
51
|
+
|
|
52
|
+
def fake_status(repo: str, parent_dir: str) -> dict:
|
|
53
|
+
return {
|
|
54
|
+
"exists": True,
|
|
55
|
+
"is_repo": True,
|
|
56
|
+
"branch": "main",
|
|
57
|
+
"dirty": False,
|
|
58
|
+
"ahead": 1,
|
|
59
|
+
"behind": 0,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
monkeypatch.setattr(repo_cmd, "get_repo_status", fake_status)
|
|
63
|
+
|
|
64
|
+
result = runner.invoke(repo_cmd.status, ["--parent-dir", "/tmp"])
|
|
65
|
+
|
|
66
|
+
assert result.exit_code == 0
|
|
67
|
+
assert "repo-a" in result.output
|
|
68
|
+
assert "main" in result.output
|
|
69
|
+
assert "↑1" in result.output
|