Skip to content

Commit 560f5b4

Browse files
committed
Update dev version
* Add panels * Add translations * Refactor * Add tests
1 parent 59c0cb9 commit 560f5b4

61 files changed

Lines changed: 3245 additions & 755 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: JE_Editor Dev Python3.10
1+
name: JE_Editor Dev
22

33
on:
44
push:
@@ -14,18 +14,25 @@ permissions:
1414
jobs:
1515
build_dev_version:
1616
runs-on: windows-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12"]
1721

1822
steps:
19-
- uses: actions/checkout@v3
20-
- name: Set up Python 3.10
21-
uses: actions/setup-python@v3
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
2226
with:
23-
python-version: "3.10"
27+
python-version: ${{ matrix.python-version }}
2428
- name: Install dependencies
2529
run: |
2630
python -m pip install --upgrade pip wheel
2731
pip install -r dev_requirements.txt
32+
pip install -e .
33+
- name: Run unit tests
34+
run: python -m pytest test/ -v --tb=short
2835
- name: Test Start Editor
2936
run: python ./test/qt_ui/unit_test/start_qt_ui.py
3037
- name: Test Extend Editor
31-
run: python ./test/qt_ui/unit_test/extend_test.py
38+
run: python ./test/qt_ui/unit_test/extend_test.py

.github/workflows/dev_python3_11.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/dev_python3_12.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: JE_Editor Stable Python3.11
1+
name: JE_Editor Stable
22

33
on:
44
push:
@@ -14,18 +14,25 @@ permissions:
1414
jobs:
1515
build_stable_version:
1616
runs-on: windows-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12"]
1721

1822
steps:
19-
- uses: actions/checkout@v3
20-
- name: Set up Python 3.11
21-
uses: actions/setup-python@v3
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
2226
with:
23-
python-version: "3.11"
27+
python-version: ${{ matrix.python-version }}
2428
- name: Install dependencies
2529
run: |
2630
python -m pip install --upgrade pip wheel
2731
pip install -r dev_requirements.txt
32+
pip install -e .
33+
- name: Run unit tests
34+
run: python -m pytest test/ -v --tb=short
2835
- name: Test Start Editor
2936
run: python ./test/qt_ui/unit_test/start_qt_ui.py
3037
- name: Test Extend Editor
31-
run: python ./test/qt_ui/unit_test/extend_test.py
38+
run: python ./test/qt_ui/unit_test/extend_test.py

.github/workflows/stable_python3_10.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/stable_python3_12.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ dmypy.json
124124
.idea/misc.xml
125125
/.idea
126126
/.claude/
127+
/output

dev_requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ qtconsole
1212
pycodestyle
1313
pydantic
1414
jedi
15+
pytest
16+
pytest-qt
1517
je_editor_dev
1618
auto-py-to-exe

exe/auto_py_to_exe.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@
6060
{
6161
"optionDest": "pathex",
6262
"value": "D:/Codes/JEDITOR/.venv"
63-
},
64-
{
65-
"optionDest": "pathex",
66-
"value": ""
6763
}
6864
],
6965
"nonPyinstallerOptions": {

je_editor/pyside_ui/browser/browser_view.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ def download_file(self, download_instance: QWebEngineDownloadRequest):
5656
jeditor_logger.info("Download File "
5757
f"download_instance: {download_instance}")
5858

59+
# 清理已完成的下載 / Clean up finished downloads
60+
self.download_list = [
61+
d for d in self.download_list
62+
if d.state() == QWebEngineDownloadRequest.DownloadState.DownloadInProgress
63+
]
64+
self.download_window_list = [w for w in self.download_window_list if w.isVisible()]
65+
5966
# 加入下載請求到清單
6067
self.download_list.append(download_instance)
6168

0 commit comments

Comments
 (0)