Skip to content

Commit d0b2956

Browse files
committed
[feat] Update ci-release and add fund-web
1 parent d443488 commit d0b2956

File tree

18 files changed

+115
-29
lines changed

18 files changed

+115
-29
lines changed

.github/scripts/git_clone_stat.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import json
2+
3+
with open('clone.json', 'r') as fh:
4+
now = json.load(fh)
5+
6+
with open('clone_before.json', 'r') as fh:
7+
before = json.load(fh)
8+
timestamps = {before['clones'][i]['timestamp']: i for i in range(len(before['clones']))}
9+
10+
latest = dict(before)
11+
for i in range(len(now['clones'])):
12+
timestamp = now['clones'][i]['timestamp']
13+
if timestamp in timestamps:
14+
latest['clones'][timestamps[timestamp]] = now['clones'][i]
15+
else:
16+
latest['clones'].append(now['clones'][i])
17+
18+
19+
latest['count'] = sum(map(lambda x: int(x['count']), latest['clones']))
20+
latest['uniques'] = sum(map(lambda x: int(x['uniques']), latest['clones']))
21+
22+
if len(timestamps) > 100:
23+
remove_this = []
24+
clones = latest['clones']
25+
for i in range(len(timestamps) - 35):
26+
clones[i]['timestamp'] = clones[i]['timestamp'][:7]
27+
if clones[i]['timestamp'] == clones[i+1]['timestamp'][:7]:
28+
clones[i+1]['count'] += clones[i]['count']
29+
clones[i+1]['uniques'] += clones[i]['uniques']
30+
remove_this.append(clones[i])
31+
32+
for item in remove_this:
33+
clones.remove(item)
34+
35+
with open('clone.json', 'w', encoding='utf-8') as fh:
36+
json.dump(latest, fh, ensure_ascii=False, indent=4)

.github/workflows/ci-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
draft: true
4040
prerelease: true
4141
tag_name: ${{ github.ref }}
42+
release_name: Release ${{ github.ref }}
43+
body: |
44+
Changes in this Release
45+
- First Change
46+
- Second Change
4247
env:
4348
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4449

.github/workflows/qbot-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
draft: true
8383
prerelease: true
84-
# tag_name: ${{ github.ref }}
84+
tag_name: ${{ github.ref }}
8585
env:
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787

@@ -154,6 +154,7 @@ jobs:
154154
with:
155155
draft: false
156156
prerelease: false
157+
tag_name: ${{ github.ref }}
157158

158159
- name: Upload assets
159160
id: upload-release-asset
@@ -229,6 +230,7 @@ jobs:
229230
with:
230231
draft: false
231232
prerelease: false
233+
tag_name: ${{ github.ref }}
232234

233235
- name: Upload assets
234236
id: upload-release-asset
@@ -271,6 +273,7 @@ jobs:
271273
with:
272274
draft: false
273275
prerelease: false
276+
tag_name: ${{ github.ref }}
274277

275278
- name: Upload assets
276279
id: upload-release-asset

.github/workflows/repo-clone-stats.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,19 @@ jobs:
7272
echo "[![GitHub Clones]($shields$url&logo=github)]($repo)" >> CLONE.md
7373
echo '
7474
```
75-
76-
# https://repo-analytics.github.io/
77-
# fetch-traffics:
78-
# runs-on: ubuntu-latest
79-
# name: daily-traffic-data-fetching
80-
# steps:
81-
# - uses: actions/checkout@v1
82-
# - name: Use Node.js
83-
# uses: actions/setup-node@v1
84-
# with:
85-
# node-version: 12.x
86-
# - name: npm install
87-
# run: npm install
88-
# working-directory: ./backend
89-
# - name: fetch
90-
# run: node scripts/dailyGetTraffics.js
91-
# env:
92-
# awsAccessKeyId: ${{ secrets.awsAccessKeyId }}
93-
# awsSecretAccessKey: ${{ secrets.awsSecretAccessKey }}
94-
# working-directory: ./backend
75+
76+
**HTML**
77+
```html' >> CLONE.md
78+
echo "<a href='$repo'><img alt='GitHub Clones' src='$shields$url&logo=github'></a>" >> CLONE.md
79+
echo '```' >> CLONE.md
80+
81+
git add CLONE.md
82+
git config --global user.name "GitHub Action"
83+
git config --global user.email "action@github.com"
84+
git commit -m "create clone count badge"
85+
fi
86+
87+
- name: Push
88+
uses: ad-m/github-push-action@master
89+
with:
90+
github_token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
<h1> 🤖 Qbot </h1>
66
</div>
77

8-
<!-- <img src="https://user-images.githubusercontent.com/29084184/204598632-23c473db-92ee-4e9b-9b57-d6d95c861fdf.png" width="42"/> -->
9-
10-
![releases](https://img.shields.io/github/downloads/UFund-Me/Qbot/total) <code>since Sep 26</code>
11-
128
<p align="left">
13-
<img alt="ViewCount" src="https://views.whatilearened.today/views/github/UFund-Me/Qbot.svg">
14-
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' src='https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/MShawon/cf89f3274d06170b8a4973039aa6220a/raw/clone.json&logo=github'></a>
9+
<img alt="ViewCount" valign="bottom" src="https://views.whatilearened.today/views/github/UFund-Me/Qbot.svg">
10+
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' valign="bottom" src='https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/MShawon/cf89f3274d06170b8a4973039aa6220a/raw/clone.json&logo=github'></a>
11+
<img alt="releases" valign="bottom" src="https://img.shields.io/github/downloads/UFund-Me/Qbot/total"> <code>since Sep 26</code>
1512
</p>
1613

1714
[![CodeQL](https://github.com/UFund-Me/Qbot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/UFund-Me/Qbot/actions/workflows/codeql-analysis.yml)
@@ -272,7 +269,7 @@ docker logs -f fund_strategy_instance
272269
dagster-daemon run &
273270
dagit -h 0.0.0.0 -p 3000
274271
```
275-
## Strategies
272+
## Strategy Lib
276273

277274
部分未整理。。。
278275

@@ -440,6 +437,20 @@ Results and models are available in the [model zoo](docs/03-智能策略/model_z
440437

441438
<br>
442439

440+
## 开源共创、社区共建
441+
442+
首先,感谢自今年5月份开源以来收到广大用户的关注!我们在基础版本中开放了很多传统量化策略、深度学习、强化学习等人工智能策略和多因子库,为此,我们发起《Qbot人工智能量化交易社区共建计划》。采取以下两种方式共建共赢:
443+
444+
1. 内容共建:
445+
446+
- 在我们免费提供的<b>人工智能交易策略</b>基础上,提高SOTA指标,然后以个人所有权提交Qbot量化交易社区,作为一种策略服务提供给更多人,获取收益;
447+
- 在我们免费提供的<b>上千个交易因子</b>基础上,应用交易因子完成策略回测、模拟交易,对交易结果好的可作为一种交易策略服务提供给更多人,获取收益;
448+
449+
2. 代码贡献:
450+
451+
- 参与本代码仓库程序设计与实现,多提交PR合并后可免费加入知识星球;
452+
- 贡献榜单前10名可获得一年免费使用权,前3名可获得qbot进阶版终身免费使用权;
453+
443454
## 策略原理及源码分析
444455

445456
本项目编写了详细的策略原理说明和平台搭建到使用的详细文档,尤其适合量化小白。欢迎加群交流!

docs/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ docker logs -f fund_strategy_instance
261261
dagster-daemon run &
262262
dagit -h 0.0.0.0 -p 3000
263263
```
264-
## Strategies
264+
## Strategy Lib
265265

266266
部分未整理。。。
267267

@@ -429,6 +429,20 @@ Results and models are available in the [model zoo](https://ufund-me.github.io/Q
429429

430430
<br>
431431

432+
## 开源共创、社区共建
433+
434+
首先,感谢自今年5月份开源以来收到广大用户的关注!我们在基础版本中开放了很多传统量化策略、深度学习、强化学习等人工智能策略和多因子库,为此,我们发起《Qbot人工智能量化交易社区共建计划》。采取以下两种方式共建共赢:
435+
436+
1. 内容共建:
437+
438+
- 在我们免费提供的<b>人工智能交易策略</b>基础上,提高SOTA指标,然后以个人所有权提交Qbot量化交易社区,作为一种策略服务提供给更多人,获取收益;
439+
- 在我们免费提供的<b>上千个交易因子</b>基础上,应用交易因子完成策略回测、模拟交易,对交易结果好的可作为一种交易策略服务提供给更多人,获取收益;
440+
441+
2. 代码贡献:
442+
443+
- 参与本代码仓库程序设计与实现,多提交PR合并后可免费加入知识星球;
444+
- 贡献榜单前10名可获得一年免费使用权,前3名可获得qbot进阶版终身免费使用权;
445+
432446
## 策略原理及源码分析
433447

434448
本项目编写了详细的策略原理说明和平台搭建到使用的详细文档,尤其适合量化小白。欢迎加群交流!

web/fund/2.async.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/fund/2.chunk.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/fund/3.async.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/fund/3.chunk.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)