Skip to content

Commit

Permalink
[feat] Update ci-release and add fund-web
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve committed Oct 9, 2023
1 parent d443488 commit d0b2956
Show file tree
Hide file tree
Showing 18 changed files with 115 additions and 29 deletions.
36 changes: 36 additions & 0 deletions .github/scripts/git_clone_stat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import json

with open('clone.json', 'r') as fh:
now = json.load(fh)

with open('clone_before.json', 'r') as fh:
before = json.load(fh)
timestamps = {before['clones'][i]['timestamp']: i for i in range(len(before['clones']))}

latest = dict(before)
for i in range(len(now['clones'])):
timestamp = now['clones'][i]['timestamp']
if timestamp in timestamps:
latest['clones'][timestamps[timestamp]] = now['clones'][i]
else:
latest['clones'].append(now['clones'][i])


latest['count'] = sum(map(lambda x: int(x['count']), latest['clones']))
latest['uniques'] = sum(map(lambda x: int(x['uniques']), latest['clones']))

if len(timestamps) > 100:
remove_this = []
clones = latest['clones']
for i in range(len(timestamps) - 35):
clones[i]['timestamp'] = clones[i]['timestamp'][:7]
if clones[i]['timestamp'] == clones[i+1]['timestamp'][:7]:
clones[i+1]['count'] += clones[i]['count']
clones[i+1]['uniques'] += clones[i]['uniques']
remove_this.append(clones[i])

for item in remove_this:
clones.remove(item)

with open('clone.json', 'w', encoding='utf-8') as fh:
json.dump(latest, fh, ensure_ascii=False, indent=4)
5 changes: 5 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
draft: true
prerelease: true
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/qbot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
with:
draft: true
prerelease: true
# tag_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -154,6 +154,7 @@ jobs:
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}

- name: Upload assets
id: upload-release-asset
Expand Down Expand Up @@ -229,6 +230,7 @@ jobs:
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}

- name: Upload assets
id: upload-release-asset
Expand Down Expand Up @@ -271,6 +273,7 @@ jobs:
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}

- name: Upload assets
id: upload-release-asset
Expand Down
36 changes: 16 additions & 20 deletions .github/workflows/repo-clone-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,19 @@ jobs:
echo "[![GitHub Clones]($shields$url&logo=github)]($repo)" >> CLONE.md
echo '
```
# https://repo-analytics.github.io/
# fetch-traffics:
# runs-on: ubuntu-latest
# name: daily-traffic-data-fetching
# steps:
# - uses: actions/checkout@v1
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: 12.x
# - name: npm install
# run: npm install
# working-directory: ./backend
# - name: fetch
# run: node scripts/dailyGetTraffics.js
# env:
# awsAccessKeyId: ${{ secrets.awsAccessKeyId }}
# awsSecretAccessKey: ${{ secrets.awsSecretAccessKey }}
# working-directory: ./backend
**HTML**
```html' >> CLONE.md
echo "<a href='$repo'><img alt='GitHub Clones' src='$shields$url&logo=github'></a>" >> CLONE.md
echo '```' >> CLONE.md
git add CLONE.md
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git commit -m "create clone count badge"
fi
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
<h1> 🤖 Qbot </h1>
</div>

<!-- <img src="https://user-images.githubusercontent.com/29084184/204598632-23c473db-92ee-4e9b-9b57-d6d95c861fdf.png" width="42"/> -->

![releases](https://img.shields.io/github/downloads/UFund-Me/Qbot/total) <code>since Sep 26</code>

<p align="left">
<img alt="ViewCount" src="https://views.whatilearened.today/views/github/UFund-Me/Qbot.svg">
<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>
<img alt="ViewCount" valign="bottom" src="https://views.whatilearened.today/views/github/UFund-Me/Qbot.svg">
<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>
<img alt="releases" valign="bottom" src="https://img.shields.io/github/downloads/UFund-Me/Qbot/total"> <code>since Sep 26</code>
</p>

[![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)
Expand Down Expand Up @@ -272,7 +269,7 @@ docker logs -f fund_strategy_instance
dagster-daemon run &
dagit -h 0.0.0.0 -p 3000
```
## Strategies
## Strategy Lib

部分未整理。。。

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

<br>

## 开源共创、社区共建

首先,感谢自今年5月份开源以来收到广大用户的关注!我们在基础版本中开放了很多传统量化策略、深度学习、强化学习等人工智能策略和多因子库,为此,我们发起《Qbot人工智能量化交易社区共建计划》。采取以下两种方式共建共赢:

1. 内容共建:

- 在我们免费提供的<b>人工智能交易策略</b>基础上,提高SOTA指标,然后以个人所有权提交Qbot量化交易社区,作为一种策略服务提供给更多人,获取收益;
- 在我们免费提供的<b>上千个交易因子</b>基础上,应用交易因子完成策略回测、模拟交易,对交易结果好的可作为一种交易策略服务提供给更多人,获取收益;

2. 代码贡献:

- 参与本代码仓库程序设计与实现,多提交PR合并后可免费加入知识星球;
- 贡献榜单前10名可获得一年免费使用权,前3名可获得qbot进阶版终身免费使用权;

## 策略原理及源码分析

本项目编写了详细的策略原理说明和平台搭建到使用的详细文档,尤其适合量化小白。欢迎加群交流!
Expand Down
16 changes: 15 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ docker logs -f fund_strategy_instance
dagster-daemon run &
dagit -h 0.0.0.0 -p 3000
```
## Strategies
## Strategy Lib

部分未整理。。。

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

<br>

## 开源共创、社区共建

首先,感谢自今年5月份开源以来收到广大用户的关注!我们在基础版本中开放了很多传统量化策略、深度学习、强化学习等人工智能策略和多因子库,为此,我们发起《Qbot人工智能量化交易社区共建计划》。采取以下两种方式共建共赢:

1. 内容共建:

- 在我们免费提供的<b>人工智能交易策略</b>基础上,提高SOTA指标,然后以个人所有权提交Qbot量化交易社区,作为一种策略服务提供给更多人,获取收益;
- 在我们免费提供的<b>上千个交易因子</b>基础上,应用交易因子完成策略回测、模拟交易,对交易结果好的可作为一种交易策略服务提供给更多人,获取收益;

2. 代码贡献:

- 参与本代码仓库程序设计与实现,多提交PR合并后可免费加入知识星球;
- 贡献榜单前10名可获得一年免费使用权,前3名可获得qbot进阶版终身免费使用权;

## 策略原理及源码分析

本项目编写了详细的策略原理说明和平台搭建到使用的详细文档,尤其适合量化小白。欢迎加群交流!
Expand Down
1 change: 1 addition & 0 deletions web/fund/2.async.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/fund/2.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/fund/3.async.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/fund/3.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/fund/4.async.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/fund/4.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions web/fund/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!DOCTYPE html><html><head><link rel="stylesheet" href="/fund/umi.css"><script>if(location.href.indexOf(`https`) > -1) {
location.replace(`http://sunshowerc.github.io/fund/#/`)
}</script><meta charset="utf-8"><meta name="”referrer”" content="”no-referrer”"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><title>基金定投策略分析</title><script>window.routerBase = "/";</script></head><body><div id="root"></div><script src="/fund/umi.js"></script></body></html>
Binary file added web/fund/static/yay.05eb60c6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/fund/umi.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#root,body,html{height:100%}body{margin:0}.main-title{font-size:24px;color:#333;padding:10px}.sub-title{font-size:16px;color:#bbb}
1 change: 1 addition & 0 deletions web/fund/umi.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/fund/vendors.async.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions web/fund/vendors.chunk.css

Large diffs are not rendered by default.

0 comments on commit d0b2956

Please sign in to comment.