reportify-cli 0.1.28__tar.gz → 0.1.30__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.
Files changed (41) hide show
  1. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/PKG-INFO +1 -1
  2. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/pyproject.toml +1 -1
  3. reportify_cli-0.1.30/scripts/bump_version.sh +132 -0
  4. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/params.py +1 -1
  5. reportify_cli-0.1.28/scripts/bump_version.sh +0 -181
  6. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/.gitignore +0 -0
  7. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/Makefile +0 -0
  8. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/README.md +0 -0
  9. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/scripts/README.md +0 -0
  10. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/scripts/publish.sh +0 -0
  11. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/skills/reportify-agent/SKILL.md +0 -0
  12. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/skills/reportify-ai/SKILL.md +0 -0
  13. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/skills/reportify-ai/references/API_REFERENCE.md +0 -0
  14. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/skills/reportify-ai/references/COMMANDS.md +0 -0
  15. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/__init__.py +0 -0
  16. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/client.py +0 -0
  17. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/__init__.py +0 -0
  18. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/agent.py +0 -0
  19. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/channels.py +0 -0
  20. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/concepts.py +0 -0
  21. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/docs.py +0 -0
  22. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/following.py +0 -0
  23. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/kb.py +0 -0
  24. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/macro.py +0 -0
  25. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/quant.py +0 -0
  26. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/search.py +0 -0
  27. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/stock.py +0 -0
  28. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/timeline.py +0 -0
  29. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/commands/user.py +0 -0
  30. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/main.py +0 -0
  31. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/output.py +0 -0
  32. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/settings.py +0 -0
  33. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/src/utils.py +0 -0
  34. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/__init__.py +0 -0
  35. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/integration/test_docs_integration.py +0 -0
  36. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/integration/test_stock_integration.py +0 -0
  37. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/test_commands/__init__.py +0 -0
  38. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/test_commands/test_docs.py +0 -0
  39. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/test_commands/test_quant.py +0 -0
  40. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/tests/test_commands/test_search.py +0 -0
  41. {reportify_cli-0.1.28 → reportify_cli-0.1.30}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reportify-cli
3
- Version: 0.1.28
3
+ Version: 0.1.30
4
4
  Summary: CLI wrapper for Reportify SDK - Access Reportify API through command line
5
5
  Project-URL: Homepage, https://reportify.ai
6
6
  Project-URL: Documentation, https://docs.reportify.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "reportify-cli"
3
- version = "0.1.28"
3
+ version = "0.1.30"
4
4
  description = "CLI wrapper for Reportify SDK - Access Reportify API through command line"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -0,0 +1,132 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ # Colors for output
6
+ RED='\033[0;31m'
7
+ GREEN='\033[0;32m'
8
+ YELLOW='\033[1;33m'
9
+ BLUE='\033[0;34m'
10
+ NC='\033[0m' # No Color
11
+
12
+ # Get the directory of this script
13
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
15
+
16
+ cd "$PROJECT_DIR/"
17
+
18
+ echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
19
+ echo -e "${BLUE} Reportify CLI - Version Bump Script${NC}"
20
+ echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
21
+ echo ""
22
+
23
+ # Check if we're in the right directory
24
+ if [ ! -f "pyproject.toml" ]; then
25
+ echo -e "${RED}Error: pyproject.toml not found. Are you in the right directory?${NC}"
26
+ exit 1
27
+ fi
28
+
29
+ # Extract current version from pyproject.toml
30
+ CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
31
+ echo -e "${YELLOW}Current version: ${CURRENT_VERSION}${NC}"
32
+ echo ""
33
+
34
+ # Parse version components
35
+ IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
36
+ MAJOR="${VERSION_PARTS[0]}"
37
+ MINOR="${VERSION_PARTS[1]}"
38
+ PATCH="${VERSION_PARTS[2]}"
39
+
40
+ # Determine bump type
41
+ BUMP_TYPE="${1:-patch}"
42
+
43
+ case "$BUMP_TYPE" in
44
+ major)
45
+ MAJOR=$((MAJOR + 1))
46
+ MINOR=0
47
+ PATCH=0
48
+ ;;
49
+ minor)
50
+ MINOR=$((MINOR + 1))
51
+ PATCH=0
52
+ ;;
53
+ patch)
54
+ PATCH=$((PATCH + 1))
55
+ ;;
56
+ *)
57
+ echo -e "${RED}Error: Invalid bump type. Use 'major', 'minor', or 'patch'${NC}"
58
+ echo "Usage: $0 [major|minor|patch]"
59
+ exit 1
60
+ ;;
61
+ esac
62
+
63
+ NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
64
+ echo -e "${GREEN}New version: ${NEW_VERSION}${NC}"
65
+ echo ""
66
+
67
+ # Confirm the change
68
+ #read -p "Bump version from ${CURRENT_VERSION} to ${NEW_VERSION}? (y/n): " CONFIRM
69
+ #if [ "$CONFIRM" != "y" ]; then
70
+ # echo -e "${YELLOW}Version bump cancelled${NC}"
71
+ # exit 0
72
+ #fi
73
+
74
+ # Update version in pyproject.toml
75
+ echo -e "${BLUE}Updating pyproject.toml...${NC}"
76
+ if [[ "$OSTYPE" == "darwin"* ]]; then
77
+ # macOS
78
+ sed -i '' "s/^version = \".*\"/version = \"${NEW_VERSION}\"/" pyproject.toml
79
+ else
80
+ # Linux
81
+ sed -i "s/^version = \".*\"/version = \"${NEW_VERSION}\"/" pyproject.toml
82
+ fi
83
+ echo -e "${GREEN}✓ Updated pyproject.toml${NC}"
84
+ echo ""
85
+
86
+ # Show the diff
87
+ echo -e "${BLUE}Changes:${NC}"
88
+ git diff pyproject.toml
89
+ echo ""
90
+
91
+ # Ask if we should commit
92
+
93
+ if [ -n "$(git status --porcelain)" ]; then
94
+ echo -e "${RED}提交版本修改记录"
95
+ # 配置git信息
96
+ git config --global user.name "GitLab Runner Bot"
97
+ git config --global user.email "gitlab-runner-arm@xiaobangtouzi.com"
98
+ git remote set-url origin "https://gitlab-ci-token:${GITLAB_PUSHER_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
99
+ # 推送代码前先同步一次代码
100
+ echo -e "${YELLOW}同步代码"
101
+ git pull origin HEAD:${CI_COMMIT_REF_NAME}
102
+ # 提交和推送代码逻辑
103
+ git add pyproject.toml
104
+ git commit -am "chore: bump version to ${NEW_VERSION} [ci skip]"
105
+ echo -e "${GREEN}✓ Changes committed${NC}"
106
+ echo ""
107
+ git push origin -o ci.skip HEAD:${CI_COMMIT_REF_NAME}
108
+ echo -e "${GREEN}✓ Changes pushed to remote${NC}"
109
+ fi
110
+
111
+ if [ -n "$(git status --porcelain)" ]; then
112
+ echo -e "${RED}Error: You have uncommitted changes. Please commit or stash them first.${NC}"
113
+ git status --short
114
+ exit 1
115
+ else
116
+ echo -e "${GREEN}✓ No uncommitted changes${NC}"
117
+ fi
118
+
119
+ echo ""
120
+ echo -e "${GREEN}═══════════════════════════════════════════════${NC}"
121
+ echo -e "${GREEN} ✓ Version Bumped Successfully!${NC}"
122
+ echo -e "${GREEN}═══════════════════════════════════════════════${NC}"
123
+ echo ""
124
+ echo -e "Old version: ${YELLOW}${CURRENT_VERSION}${NC}"
125
+ echo -e "New version: ${GREEN}${NEW_VERSION}${NC}"
126
+ echo ""
127
+ echo -e "Next steps:"
128
+ echo -e " 1. Run tests: ${YELLOW}make test${NC}"
129
+ echo -e " 2. Publish to test PyPI: ${YELLOW}./scripts/publish.sh test${NC}"
130
+ echo -e " 3. Publish to prod PyPI: ${YELLOW}./scripts/publish.sh prod${NC}"
131
+ echo ""
132
+
@@ -497,7 +497,7 @@ QUANT_BACKTEST_PARAMS = [
497
497
  ParamDef("max_positions", "int", "Max number of holding stocks", default=5),
498
498
  ParamDef("min_volume", "int", "Minimum trading volume", default=100),
499
499
  ParamDef("auto_close", "bool", "Auto close positions", default=True),
500
- ParamDef("indicator", "dict[str, str]", "Indicator dict for custom strategy pre-computation or returning values"),
500
+ ParamDef("signal_factors", "dict[str, str]", "Signal factors dictionary for custom strategy pre-computation"),
501
501
  ]
502
502
 
503
503
  QUANT_KLINE_1M_PARAMS = [
@@ -1,181 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # 改为非严格模式,手动控制错误退出,便于调试
4
- set -eo pipefail
5
-
6
- # Colors for output
7
- RED='\033[0;31m'
8
- GREEN='\033[0;32m'
9
- YELLOW='\033[1;33m'
10
- BLUE='\033[0;34m'
11
- NC='\033[0m' # No Color
12
-
13
- # 错误处理函数
14
- error_exit() {
15
- echo -e "${RED}❌ $1${NC}"
16
- exit 1
17
- }
18
-
19
- # Get the directory of this script
20
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
21
- PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
22
-
23
- cd "$PROJECT_DIR/" || error_exit "Failed to enter project directory: $PROJECT_DIR"
24
-
25
- echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
26
- echo -e "${BLUE} Reportify CLI - Version Bump Script${NC}"
27
- echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
28
- echo ""
29
-
30
- # Check if we're in the right directory
31
- if [ ! -f "pyproject.toml" ]; then
32
- error_exit "pyproject.toml not found. Are you in the right directory?"
33
- fi
34
-
35
- # Extract current version from pyproject.toml
36
- CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
37
- if [ -z "$CURRENT_VERSION" ]; then
38
- error_exit "Failed to extract current version from pyproject.toml"
39
- fi
40
- echo -e "${YELLOW}Current version: ${CURRENT_VERSION}${NC}"
41
- echo ""
42
-
43
- # Parse version components
44
- IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
45
- if [ "${#VERSION_PARTS[@]}" -ne 3 ]; then
46
- error_exit "Invalid version format: $CURRENT_VERSION (expected MAJOR.MINOR.PATCH)"
47
- fi
48
- MAJOR="${VERSION_PARTS[0]}"
49
- MINOR="${VERSION_PARTS[1]}"
50
- PATCH="${VERSION_PARTS[2]}"
51
-
52
- # Determine bump type
53
- BUMP_TYPE="${1:-patch}"
54
- case "$BUMP_TYPE" in
55
- major)
56
- MAJOR=$((MAJOR + 1))
57
- MINOR=0
58
- PATCH=0
59
- ;;
60
- minor)
61
- MINOR=$((MINOR + 1))
62
- PATCH=0
63
- ;;
64
- patch)
65
- PATCH=$((PATCH + 1))
66
- ;;
67
- *)
68
- error_exit "Invalid bump type. Use 'major', 'minor', or 'patch'\nUsage: $0 [major|minor|patch]"
69
- ;;
70
- esac
71
-
72
- NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
73
- echo -e "${GREEN}New version: ${NEW_VERSION}${NC}"
74
- echo ""
75
-
76
- # ===================== 核心修复:先处理分支,再修改版本号 =====================
77
- # 仅在CI环境下执行分支切换(避免本地运行时干扰)
78
- if [ -n "${CI_COMMIT_REF_NAME}" ]; then
79
- echo -e "${YELLOW}CI环境:先切换到目标分支并同步远程代码${NC}"
80
-
81
- # 暂存当前所有修改(解决checkout时的文件覆盖问题)
82
- git stash push -u -m "temp stash for version bump" || true
83
-
84
- # 切换到目标分支
85
- git checkout "${CI_COMMIT_REF_NAME}" || error_exit "Failed to checkout branch ${CI_COMMIT_REF_NAME}"
86
-
87
- # 拉取远程最新版本(确保分支是最新的)
88
- git fetch origin "${CI_COMMIT_REF_NAME}" || error_exit "Failed to fetch remote branch"
89
- git reset --hard "origin/${CI_COMMIT_REF_NAME}" || error_exit "Failed to reset branch to remote latest"
90
-
91
- # 恢复暂存的修改(但此时暂存的是旧版本的修改,后续会重新更新版本号)
92
- git stash pop || true
93
- fi
94
-
95
- # ===================== 再更新版本号 =====================
96
- # Update version in pyproject.toml
97
- echo -e "${BLUE}Updating pyproject.toml...${NC}"
98
- if [[ "$OSTYPE" == "darwin"* ]]; then
99
- # macOS (sed requires empty -i flag)
100
- sed -i '' "s/^version = \".*\"/version = \"${NEW_VERSION}\"/" pyproject.toml || error_exit "Failed to update pyproject.toml (macOS)"
101
- else
102
- # Linux
103
- sed -i "s/^version = \".*\"/version = \"${NEW_VERSION}\"/" pyproject.toml || error_exit "Failed to update pyproject.toml (Linux)"
104
- fi
105
- echo -e "${GREEN}✓ Updated pyproject.toml${NC}"
106
- echo ""
107
-
108
- # Show the diff
109
- echo -e "${BLUE}Changes:${NC}"
110
- git diff pyproject.toml || true
111
- echo ""
112
-
113
- # 仅当 pyproject.toml 有变更时,执行提交推送逻辑
114
- if [ -n "$(git status --porcelain pyproject.toml)" ]; then
115
- echo -e "${YELLOW}Starting version commit & push...${NC}"
116
-
117
- # 配置git信息(仅本地生效,避免污染全局)
118
- git config --local user.name "GitLab Runner Bot"
119
- git config --local user.email "gitlab-runner-arm@xiaobangtouzi.com"
120
-
121
- # 更新远程仓库地址(带CI token认证)
122
- if [ -n "${GITLAB_PUSHER_TOKEN}" ] && [ -n "${CI_SERVER_HOST}" ] && [ -n "${CI_PROJECT_PATH}" ]; then
123
- git remote set-url origin "https://gitlab-ci-token:${GITLAB_PUSHER_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" || error_exit "Failed to set remote URL"
124
- fi
125
-
126
- # 同步远程代码(处理冲突)
127
- echo -e "${YELLOW}Syncing remote code...${NC}"
128
- git fetch origin "${CI_COMMIT_REF_NAME}" || error_exit "Failed to fetch remote branch"
129
- if ! git merge "origin/${CI_COMMIT_REF_NAME}" --no-edit; then
130
- echo -e "${RED}Merge conflict detected! Aborting...${NC}"
131
- git merge --abort
132
- error_exit "Please resolve conflicts manually and retry"
133
- fi
134
-
135
- # 仅添加版本文件,避免误提交其他变更
136
- git add pyproject.toml || error_exit "Failed to add pyproject.toml"
137
-
138
- # 检查是否有可提交的变更(避免无变更时commit失败)
139
- if git diff --cached --quiet; then
140
- echo -e "${YELLOW}⚠️ No changes to commit (pyproject.toml unchanged)${NC}"
141
- exit 0
142
- fi
143
-
144
- # 提交变更(仅提交版本文件,不带-a避免误提交)
145
- git commit -m "chore: bump version to ${NEW_VERSION} [ci skip]" || error_exit "Failed to commit changes"
146
- echo -e "${GREEN}✓ Changes committed${NC}"
147
- echo ""
148
-
149
- # 推送变更(CI环境带ci.skip避免循环触发)
150
- if [ -n "${CI_COMMIT_REF_NAME}" ]; then
151
- git push origin -o ci.skip "${CI_COMMIT_REF_NAME}" || error_exit "Failed to push changes to remote"
152
- echo -e "${GREEN}✓ Changes pushed to remote: ${CI_COMMIT_REF_NAME}${NC}"
153
- else
154
- # 非CI环境,提示手动推送
155
- echo -e "${YELLOW}⚠️ Not in CI environment, skip push. Please push manually.${NC}"
156
- fi
157
- else
158
- echo -e "${YELLOW}⚠️ No changes to pyproject.toml, skip commit & push${NC}"
159
- fi
160
-
161
- # 最终状态检查(友好提示,不强制退出)
162
- if [ -n "$(git status --porcelain)" ]; then
163
- echo -e "${YELLOW}⚠️ There are uncommitted changes (non-version files), please check${NC}"
164
- git status --short
165
- else
166
- echo -e "${GREEN}✓ Working directory clean${NC}"
167
- fi
168
-
169
- echo ""
170
- echo -e "${GREEN}═══════════════════════════════════════════════${NC}"
171
- echo -e "${GREEN} ✓ Version Bumped Successfully!${NC}"
172
- echo -e "${GREEN}═══════════════════════════════════════════════${NC}"
173
- echo ""
174
- echo -e "Old version: ${YELLOW}${CURRENT_VERSION}${NC}"
175
- echo -e "New version: ${GREEN}${NEW_VERSION}${NC}"
176
- echo ""
177
- echo -e "Next steps:"
178
- echo -e " 1. Run tests: ${YELLOW}make test${NC}"
179
- echo -e " 2. Publish to test PyPI: ${YELLOW}./scripts/publish.sh test${NC}"
180
- echo -e " 3. Publish to prod PyPI: ${YELLOW}./scripts/publish.sh prod${NC}"
181
- echo ""
File without changes
File without changes
File without changes