Skip to content

Commit

Permalink
Dev (#30)
Browse files Browse the repository at this point in the history
* 完善日志系统,增加并完善一个api

* 完善ci,新建启动器,优化用户体验

* 嘗試讓他能作爲pip包

* 重構配置部分

* 更新工作流

* 修正一個錯誤

* feat: 初步實現GUI

* fix: 優化import

* fix: 修正若干問題,添加加載pip模塊的功能

* docs: 創建文檔

* 更新CI

* fix:修正UI的幾個錯誤

* build: 修正構建時建制UI的相關問題

* fix:修改了輸出兩次《宇宙安全生命》(X)的bug

* docs: 起草文檔而已

* feat: 完成插件列表功能

* feat(設置頁面的初始化):

* feat: 添加自動跟蹤功能

* feat(設置頁面的初始化):

* fix:修復一些小問題

* feat(config-registrar): add ConfigTree and improve ConfigKey

- Implement new ConfigTree class for managing configuration hierarchies.
- Refactor ConfigKey class to support default values and options.
- Add utility functions for obtaining default values of various types.
- Update ConfigRegistrar to utilize the new ConfigTree and ConfigKey features.
- Modify GUI_main to handle configuration items as ConfigKey or ConfigTree.
- Resolve conflicts in GUI_main.py during merge from origin/dev.

BREAKING CHANGE: The configuration management system has been overhauled,
introducing new classes and changing the behavior of existing ones. Update
your code to use ConfigTree and the refactored ConfigKey.

* feat(config-registrar): add has_option method and improve GUI handling

- Add a new method `has_option` in the config_registrar.ConfigKey class.- Refactor GUI_main to improve item widget handling and data setting.
- Resolve conflicts and adjust the layout in the main.ui file.
- Update Ui_MainWindow to reflect layout and widget changes.
- The configuration editor now correctly handles editable items and
  displays options as comboboxes where appropriate.

BREAKING CHANGE: The configuration handling has been modified, which
might affect users depending on the previous implementation.

* feat(config-registrar): add merge functionality and improve type handling

- Implement new merge method in ConfigKey to combine configurations.
- Refactor set method to improve type checking and value assignment.
- Add get_type method to retrieve the type of the stored value.
- Modify ConfigTree constructor to support new argument 'allow'.- Simplify list and dict construction within ConfigTree.
- Remove unused code and resolve conflicts in GUI_main and Ildm.yaml.

* 修改CI

* feat(config-registrar): implement to_list method and improve type handling

- Add a new to_list method in ConfigTree to convert tree structure to a list.- Refactor to_dict method to improve the conversion of tree content to a dictionary.
- Extend merge method to handle the combination of two configuration trees.
- Add debugging statements and TODO comments for future development.
- Remove outdated TODO comments and clean up the code structure.

* fix: 修復配置合并的問題,但是本次修復并不充分,仍然需要繼續測試和修復

* feat(config-registrar): add comprehensive tests for ConfigKey and ConfigTree

Implement new tests to ensure proper functionality and edge case handling
for ConfigKey and ConfigTree classes. This includes testing initialization,value setting, type conversion, option handling, and merge capabilities.
Additionally, refactor some code in config_registrar.py for better clarity
and fix a bug where None was an invalid value for ConfigKey.

* feat(config-registrar): add comprehensive tests for ConfigKey and ConfigTree

Implement new tests to ensure proper functionality and edge case handling
for ConfigKey and ConfigTree classes. This includes testing initialization,value setting, type conversion, option handling, and merge capabilities.
Additionally, refactor some code in config_registrar.py for better clarity
and fix a bug where None was an invalid value for ConfigKey.

* build(將不再支持python3.9以下):

* feat(config-registrar): add schema validation for configuration trees

Introduce a new ConfigSchema class to perform validation of configuration
trees against predefined schemas. This enhancement allows for stricter
validation of configuration data, ensuring that it adheres to the expected
structure and types. The schema validation system is designed to be
extendable, allowing for custom schema classes to be defined for more
complex validation logic.

* feat(config-registrar): add schema validation for configuration trees

Introduce a new ConfigSchema class to perform validation of configuration
trees against predefined schemas. This enhancement allows for stricter
validation of configuration data, ensuring that it adheres to the expected
structure and types. The schema validation system is designed to be
extendable, allowing for custom schema classes to be defined for more
complex validation logic.

* feat(config-registrar): add schema validation for configuration trees

Introduce a new ConfigSchema class to perform validation of configuration
trees against predefined schemas. This enhancement allows for stricter
validation of configuration data, ensuring that it adheres to the expected
structure and types. The schema validation system is designed to be
extendable, allowing for custom schema classes to be defined for more
complex validation logic.

* docs(readme): optimize image size and correct script execution command

- Reduce the size of the icon image in the README to improve page loading times.
- Correct the spelling error in the Python module name for starting the ictye-live-dm
  project to ensure users can successfully execute the startup command.

* docs(readme): optimize image size and correct script execution command

- Reduce the size of the icon image in the README to improve page loading times.
- Correct the spelling error in the Python module name for starting the ictye-live-dm
  project to ensure users can successfully execute the startup command.

* docs(readme): optimize image size and correct script execution command

- Reduce the size of the icon image in the README to improve page loading times.
- Correct the spelling error in the Python module name for starting the ictye-live-dm
  project to ensure users can successfully execute the startup command.

feat(config-registrar): add schema validation for configuration trees

Introduce a new ConfigSchema class to perform validation of configuration
trees against predefined schemas. This enhancement allows for stricter
validation of configuration data, ensuring that it adheres to the expected
structure and types. The schema validation system is designed to be
extendable, allowing for custom schema classes to be defined for more
complex validation logic.
  • Loading branch information
northgreen authored Jul 24, 2024
1 parent 3d3d67d commit b6e78e2
Show file tree
Hide file tree
Showing 86 changed files with 3,274 additions and 4,517 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11","3.12"]
python-version: [ "3.10", "3.11","3.12"]

steps:
- name: check out my code
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/test_linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test_linux
on:
workflow_dispatch:
pull_request:
push:

jobs:
test_linux:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11","3.12" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "dev"

- name: install python
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}

- name: install depends
run: |
python -m pip install --upgrade pip
pip install -r ./ictye-live-dm/requirements.txt
pip install ./ictye-live-dm/
pip install pytest pytest-cov pytest-asyncio pytest-aiohttp PyQt5
- name: test
run: |
pytest ./ictye-live-dm --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov --cov-report=html
- name: upload_results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: |
junit/test-results-${{ matrix.python-version }}.xml
htmlcov/*
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}


2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ __pycache__/
.hintrc/
.vscode/
build/
dist/
dist/*
data/
ictye-live-dm/src/ictye_live_dm/logs
/.hintrc
Expand Down
15 changes: 15 additions & 0 deletions .run/Ictye live dm plugin api.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Ictye live dm plugin api" type="StardustRunConfiguration" factoryName="build-pdf">
<option name="copyright" />
<option name="description" />
<option name="folderPath" value="$PROJECT_DIR$" />
<option name="footer" />
<option name="header" />
<option name="instanceId" value="pa" />
<option name="instanceName" value="Plugin Api" />
<option name="layout" />
<option name="logoPath" />
<option name="title" />
<method v="2" />
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/gen GUI.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Gen GUI" type="ShConfigurationType" activateToolWindowBeforeRun="false">
<option name="SCRIPT_TEXT" value="pyuic5 .\main.ui -o ..\GUI\Ui_MainWindow.py" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="false" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$/ictye-live-dm/src/ictye_live_dm/QT-GUI" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>
4 changes: 3 additions & 1 deletion .run/ictye live dm gui.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<option name="MODULE_MODE" value="true" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="gen GUI" run_configuration_type="ShConfigurationType" />
</method>
</configuration>
</component>
12 changes: 12 additions & 0 deletions Apis/Ildm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
openapi: "3.0.2"
info:
title: API awa
version: "1.0"
servers:
- url: https://api.server.test/v1
paths:
/test:
get:
responses:
'200':
description: OK
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# ictye live Danmku
<div align="center">
<img width="100" height="100" src="https://github.com/northgreen/ictye-live-dm/raw/dev/icon.png">
</img>
<h1 style="margin-top:0">Ictye Live Danmku(ictye-live-dm)</h1>
<img src="https://img.shields.io/badge/python-3.10-blue">
</img>
<img src="https://img.shields.io/badge/license-GPL-green">
</img>
</div>

一个简单而又全能的弹幕姬框架(其实就是一个web服务器加上websocket服务器),通过插件来实现弹幕功能

Expand All @@ -9,7 +17,7 @@

## 开始使用它

1. 部署ictye live Danmku:你只需要简单的解压它就好,默认情况的启动脚本是为Windows用户提供的,不过在非Windows操作系统上,你仍旧可以使用`requirement.txt`来配置环境并且使用`python -m ictye-live-Danmku`来启动项目
1. 部署ictye live Danmku:你只需要简单的解压它就好,默认情况的启动脚本是为Windows用户提供的,不过在非Windows操作系统上,你仍旧可以使用`requirement.txt`来配置环境并且使用`python -m ictye-live-dm`来启动项目
2. 配置项目:
1. 这个软件是通过插件的形式来实现弹幕的获取,弹幕的分析和处理
2. `/plugin`里放置python脚本插件,可以在后端提供弹幕,分析弹幕以及提供前端接口等待
Expand Down
6 changes: 0 additions & 6 deletions Writerside/c.list

This file was deleted.

12 changes: 0 additions & 12 deletions Writerside/cfg/buildprofiles.xml

This file was deleted.

Binary file removed Writerside/images/completion_procedure.png
Binary file not shown.
Binary file removed Writerside/images/completion_procedure_dark.png
Binary file not shown.
Binary file removed Writerside/images/convert_table_to_xml.png
Binary file not shown.
Binary file removed Writerside/images/convert_table_to_xml_dark.png
Binary file not shown.
Binary file removed Writerside/images/new_topic_options.png
Binary file not shown.
Binary file removed Writerside/images/new_topic_options_dark.png
Binary file not shown.
12 changes: 0 additions & 12 deletions Writerside/pa.tree

This file was deleted.

27 changes: 0 additions & 27 deletions Writerside/topics/Overview.topic

This file was deleted.

111 changes: 0 additions & 111 deletions Writerside/topics/Section-Starting-Page.topic

This file was deleted.

Loading

0 comments on commit b6e78e2

Please sign in to comment.