-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update HomeView.vue (#211) Co-authored-by: Tianyi Pu <[email protected]> * 修改VideoModel (#212) * 修改VideoModel1 - 增加GeneratedField: `cl_s`, `ce_s`, `ioe`, `thrp`, `corr` - 删除ExpandVideoModel中如上五个域 - 更新view_utils.refresh_video以适应改动 - 增加view_utils.refresh_video的测试 * add flake8 tests * Create flake8.yml * Update backend.yml * Update flake8.yml * 格式化videomanager * Update flake8.yml * 格式化 * 格式化 * 格式化 * 格式化 * 格式化 * 格式化 * 格式化 * 格式化 * 格式化 * 忽略try except没有指定错误类型的问题 * fix * 上传录像 * 增加flake8-commas测试 * fix * 录像页、录像上传 * gzip压缩response (#213) 经测试,访问一个240录像用户主页,使用该middleware前响应大小34082B,使用后响应大小3683B * 优化前端加载性能 (#214) * 优化前端加载性能 - 个人主页的tab改用异步加载。#180 的改动取消了ms-toollib的异步引入,导致加载开销明显变大。此PR通过异步加载整个UploadView组件解决了这个问题。 - AccountLinkManager的子组件改用异步加载,未绑定账号的用户不会加载相应的子组件。 - vite打包使用gzip,使得加载内容减少了约三分之二 * Update package.json * fix: 账号关联信息不显示 (#215) --------- Co-authored-by: eee555 <[email protected]>
- Loading branch information
1 parent
42418ca
commit ae4d179
Showing
73 changed files
with
759 additions
and
637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Back-end Code Style Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Adjust the branch name as needed | ||
pull_request: | ||
paths: | ||
- 'back_end/saolei/**' | ||
|
||
jobs: | ||
check_flag: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: back_end/saolei | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' # Choose the Python version you want to use | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip install flake8 | ||
pip install flake8-commas | ||
pip install flake8-comprehensions | ||
- name: Run Tests | ||
run: | | ||
python -m flake8 --ignore=E501,E722 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,19 @@ | |
from .utils import update_saolei_account, update_msgames_account, update_wom_account | ||
from userprofile.models import UserProfile | ||
import datetime | ||
from unittest import skip, expectedFailure | ||
from unittest import expectedFailure | ||
|
||
|
||
class AccountLinkTestCase(TestCase): | ||
def setUp(self): | ||
user = UserProfile.objects.create(username='setUp', email='[email protected]') | ||
AccountSaolei.objects.create(id=1,parent=user) | ||
AccountSaolei.objects.create(id=1, parent=user) | ||
AccountMinesweeperGames.objects.create(id=7872, parent=user) | ||
AccountWorldOfMinesweeper.objects.create(id=1783173, parent=user) | ||
|
||
def test_update_saolei(self): | ||
account = AccountSaolei.objects.filter(id=1).first() | ||
self.assertEqual(update_saolei_account(account, 0), '',) | ||
self.assertEqual(update_saolei_account(account, 0), '') | ||
account = AccountSaolei.objects.filter(id=1).first() | ||
self.assertEqual(account.id, 1) | ||
self.assertEqual(account.name, '张砷镓') | ||
|
@@ -38,7 +39,7 @@ def test_update_msgames(self): | |
self.assertEqual(account.id, 7872) | ||
self.assertEqual(account.name, 'Ze-En JU') | ||
self.assertEqual(account.local_name, '鞠泽恩') | ||
self.assertEqual(account.joined, datetime.date(2019,5,28)) | ||
self.assertEqual(account.joined, datetime.date(2019, 5, 28)) | ||
|
||
def test_update_wom(self): | ||
account = AccountWorldOfMinesweeper.objects.filter(id=1783173).first() | ||
|
@@ -85,4 +86,4 @@ def test_msgames_private_name(self): | |
account = AccountMinesweeperGames.objects.create(id=8371, parent=user) | ||
self.assertEqual(update_msgames_account(account, 0), '') | ||
self.assertEqual(account.name, 'Private') | ||
self.assertEqual(account.local_name, 'None') | ||
self.assertEqual(account.local_name, 'None') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.