bitool 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bitool-0.1.2 → bitool-0.1.4}/PKG-INFO +4 -1
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/Cargo.toml +1 -1
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/pyproject.toml +1 -1
- {bitool-0.1.2 → bitool-0.1.4}/pyproject.toml +21 -18
- bitool-0.1.4/src/bitool/__init__.py +11 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/README.md +117 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/__init__.py +1 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/assets/theme.svg +1 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/config.py +29 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/gui.py +19 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/pyproject.toml +76 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/resource.qrc +5 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/resource_rc.py +208 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/tests/__init__.py +1 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/tests/conftest.py +27 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/tests/test_alarmclock.py +298 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/widgets/__init__.py +1 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/widgets/alarmclock.py +199 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/widgets/alarmclock.ui +111 -0
- bitool-0.1.4/src/bitool/apps/alarmclock/widgets/reminder.py +74 -0
- bitool-0.1.4/src/bitool/apps/pypack/README.md +64 -0
- bitool-0.1.4/src/bitool/apps/pypack/__init__.py +14 -0
- bitool-0.1.4/src/bitool/apps/pypack/cli.py +239 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/__init__.py +16 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/archiver.py +172 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/embedinstaller.py +266 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/libpacker.py +170 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/loader.py +240 -0
- bitool-0.1.4/src/bitool/apps/pypack/components/sourcepacker.py +347 -0
- bitool-0.1.4/src/bitool/apps/pypack/config.py +45 -0
- bitool-0.1.4/src/bitool/apps/pypack/models/__init__.py +8 -0
- bitool-0.1.4/src/bitool/apps/pypack/models/dependency.py +71 -0
- bitool-0.1.4/src/bitool/apps/pypack/models/entryfile.py +69 -0
- bitool-0.1.4/src/bitool/apps/pypack/models/project.py +153 -0
- bitool-0.1.4/src/bitool/apps/pypack/models/solution.py +218 -0
- bitool-0.1.4/src/bitool/apps/pypack/progress.py +172 -0
- bitool-0.1.4/src/bitool/apps/pypack/pyproject.toml +55 -0
- bitool-0.1.4/src/bitool/apps/pypack/workflow.py +283 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/__init__.py +32 -20
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/_base.py +2 -2
- bitool-0.1.4/src/bitool/cmd/_condition.py +118 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/_scheduler.py +26 -33
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/env.py +18 -210
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/git.py +5 -18
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/io.py +121 -44
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/pdf.py +73 -28
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/run.py +19 -110
- bitool-0.1.4/src/bitool/cmd/toml.py +143 -0
- bitool-0.1.4/src/bitool/core/__init__.py +7 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/core/config.py +47 -53
- bitool-0.1.4/src/bitool/core/env.py +325 -0
- bitool-0.1.4/src/bitool/gui/__init__.py +33 -0
- bitool-0.1.4/src/bitool/gui/_env.py +160 -0
- bitool-0.1.4/src/bitool/gui/_highdpi.py +143 -0
- bitool-0.1.4/src/bitool/gui/_themes.py +325 -0
- bitool-0.1.4/src/bitool/gui/_uiloader.py +438 -0
- bitool-0.1.4/src/bitool/gui/demos/__init__.py +4 -0
- bitool-0.1.4/src/bitool/gui/demos/theme_demo.py +495 -0
- bitool-0.1.4/src/bitool/gui/demos/theme_selector_demo.py +225 -0
- bitool-0.1.4/src/bitool/gui/demos/uiloader_demo.py +102 -0
- bitool-0.1.4/src/bitool/gui/demos/uiloader_demo.ui +48 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/aqua_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/base_structure.qss +450 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/catppuccin_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/consolestyle_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/dracula_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/elegantdark_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/elegantpurple_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/freshgreen_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/gruvbox_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/high_contrast_colors.qss +57 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/macos_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/material_dark_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/modernlight_colors.qss +69 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/monokai_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/nord_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/onedark_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/professionalblue_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/synthwave_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/tokyo_night_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/ubuntu_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/vitesse_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/stylesheets/warmorange_colors.qss +56 -0
- bitool-0.1.4/src/bitool/gui/tests/__init__.py +1 -0
- bitool-0.1.4/src/bitool/gui/tests/test_env.py +513 -0
- bitool-0.1.4/src/bitool/gui/tests/test_highdpi.py +459 -0
- bitool-0.1.4/src/bitool/gui/tests/test_theme_selector.py +225 -0
- bitool-0.1.4/src/bitool/gui/tests/test_themes.py +675 -0
- bitool-0.1.4/src/bitool/gui/tests/test_uiloader.py +740 -0
- bitool-0.1.4/src/bitool/gui/widgets/__init__.py +8 -0
- bitool-0.1.4/src/bitool/gui/widgets/theme_selector.py +214 -0
- bitool-0.1.4/src/bitool/skills/__init__.py +18 -0
- bitool-0.1.4/src/bitool/skills/_base.py +170 -0
- bitool-0.1.4/src/bitool/skills/_registry.py +221 -0
- bitool-0.1.4/src/bitool/skills/bumpversion.py +264 -0
- bitool-0.1.4/src/bitool/skills/clearscreen.py +81 -0
- bitool-0.1.4/src/bitool/skills/envpy.py +166 -0
- bitool-0.1.4/src/bitool/skills/envrs.py +154 -0
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/filedate.py +34 -14
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/filelevel.py +72 -62
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/gittool.py +79 -54
- bitool-0.1.4/src/bitool/skills/img2pdf.py +125 -0
- bitool-0.1.4/src/bitool/skills/pdf2img.py +120 -0
- bitool-0.1.4/src/bitool/skills/piptool.py +164 -0
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/pymake.py +53 -48
- bitool-0.1.4/src/bitool/skills/pypack.py +283 -0
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/sshcopyid.py +93 -89
- {bitool-0.1.2/src/bitool/scripts → bitool-0.1.4/src/bitool/skills}/taskkill.py +84 -59
- bitool-0.1.4/src/bitool/skills/which.py +174 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/utils/executor.py +13 -251
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/utils/profiler.py +2 -2
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/utils/task.py +5 -44
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/utils/task_group.py +27 -30
- bitool-0.1.4/src/tests/apps/test_pypack.py +1475 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_env.py +1 -128
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_io.py +7 -7
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_run.py +30 -158
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_scheduler.py +11 -20
- bitool-0.1.4/src/tests/cmd/test_toml.py +60 -0
- bitool-0.1.4/src/tests/conftest.py +54 -0
- bitool-0.1.4/src/tests/core/__init__.py +0 -0
- bitool-0.1.4/src/tests/core/test_config.py +1122 -0
- bitool-0.1.4/src/tests/core/test_env.py +315 -0
- bitool-0.1.4/src/tests/skills/__init__.py +0 -0
- bitool-0.1.4/src/tests/skills/test_base.py +253 -0
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_bumpversion.py +1 -1
- bitool-0.1.4/src/tests/skills/test_clearscreen.py +238 -0
- bitool-0.1.4/src/tests/skills/test_envpy.py +90 -0
- bitool-0.1.4/src/tests/skills/test_envrs.py +87 -0
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_filelevel.py +101 -88
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_gittool.py +13 -9
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_img2pdf.py +132 -143
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_pdf2img.py +166 -139
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/skills}/test_piptool.py +100 -199
- bitool-0.1.4/src/tests/skills/test_registry.py +200 -0
- bitool-0.1.4/src/tests/skills/test_which.py +145 -0
- bitool-0.1.4/src/tests/utils/__init__.py +0 -0
- {bitool-0.1.2/src/bitool/utils/tests → bitool-0.1.4/src/tests/utils}/test_profiler.py +17 -6
- bitool-0.1.4/src/tests/utils/test_task.py +186 -0
- bitool-0.1.2/src/bitool/__init__.py +0 -27
- bitool-0.1.2/src/bitool/cmd/_condition.py +0 -60
- bitool-0.1.2/src/bitool/cmd/toml.py +0 -237
- bitool-0.1.2/src/bitool/core/__init__.py +0 -7
- bitool-0.1.2/src/bitool/core/app.py +0 -142
- bitool-0.1.2/src/bitool/core/commands.py +0 -194
- bitool-0.1.2/src/bitool/core/env.py +0 -18
- bitool-0.1.2/src/bitool/core/plugin.py +0 -117
- bitool-0.1.2/src/bitool/core/workspace.py +0 -76
- bitool-0.1.2/src/bitool/scripts/__init__.py +0 -1
- bitool-0.1.2/src/bitool/scripts/bumpversion.py +0 -189
- bitool-0.1.2/src/bitool/scripts/clearscreen.py +0 -37
- bitool-0.1.2/src/bitool/scripts/envpy.py +0 -161
- bitool-0.1.2/src/bitool/scripts/envrs.py +0 -119
- bitool-0.1.2/src/bitool/scripts/img2pdf.py +0 -151
- bitool-0.1.2/src/bitool/scripts/pdf2img.py +0 -139
- bitool-0.1.2/src/bitool/scripts/piptool.py +0 -130
- bitool-0.1.2/src/bitool/scripts/which.py +0 -227
- bitool-0.1.2/src/bitool/utils/cli_parser.py +0 -412
- bitool-0.1.2/src/tests/cmd/test_toml.py +0 -121
- bitool-0.1.2/src/tests/conftest.py +0 -31
- {bitool-0.1.2 → bitool-0.1.4}/.gitignore +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/README.md +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/.cargo/config.toml +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/.cargo/libs/python38.lib +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/.cargo/libs/windows.0.48.5.lib +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/README.md +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/cmd_exec.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/config.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/crypto.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/file_ops.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/mod.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/pdf_ops.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/profiler.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/core/text_proc.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/lib.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/plugins/loader.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/plugins/mod.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/plugins/registry.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/mod.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_cmd_exec.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_config.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_file_ops.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_pdf_ops.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_profiler.rs +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/bitool-core/src/python/py_text_proc.rs +0 -0
- {bitool-0.1.2/src/bitool/utils/tests → bitool-0.1.4/src/bitool/apps}/__init__.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/cmd/version.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/consts.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/core/logger.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/models/__init__.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/models/version.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/types.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/bitool/utils/__init__.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/__init__.py +0 -0
- {bitool-0.1.2/src/tests/cmd → bitool-0.1.4/src/tests/apps}/__init__.py +0 -0
- {bitool-0.1.2/src/tests/scripts → bitool-0.1.4/src/tests/cmd}/__init__.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_base.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_condition.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_pdf.py +0 -0
- {bitool-0.1.2 → bitool-0.1.4}/src/tests/cmd/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitool
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Bitool - Rust + Python 混合架构工具集
|
|
5
5
|
Project-URL: Homepage, https://gitee.com/gooker_young/bitool
|
|
6
6
|
Project-URL: Issues, https://gitee.com/gooker_young/bitool/issues
|
|
@@ -34,6 +34,8 @@ Provides-Extra: core
|
|
|
34
34
|
Provides-Extra: docs
|
|
35
35
|
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == 'docs'
|
|
36
36
|
Requires-Dist: sphinx-rtd-theme>=1.5.2; extra == 'docs'
|
|
37
|
+
Provides-Extra: gui
|
|
38
|
+
Requires-Dist: pyside2>=5.15.2.1; extra == 'gui'
|
|
37
39
|
Provides-Extra: test
|
|
38
40
|
Requires-Dist: bandit>=1.7.10; extra == 'test'
|
|
39
41
|
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'test'
|
|
@@ -41,6 +43,7 @@ Requires-Dist: pytest-benchmark>=4.0.0; extra == 'test'
|
|
|
41
43
|
Requires-Dist: pytest-cov>=5.0.0; extra == 'test'
|
|
42
44
|
Requires-Dist: pytest-html>=4.1.1; extra == 'test'
|
|
43
45
|
Requires-Dist: pytest-mock>=3.14.0; extra == 'test'
|
|
46
|
+
Requires-Dist: pytest-qt>=4.4.0; extra == 'test'
|
|
44
47
|
Requires-Dist: pytest-timeout>=2.4.0; extra == 'test'
|
|
45
48
|
Requires-Dist: pytest-xdist>=3.6.1; extra == 'test'
|
|
46
49
|
Requires-Dist: pytest>=8.3.4; extra == 'test'
|
|
@@ -27,27 +27,29 @@ license = { text = "MIT" }
|
|
|
27
27
|
name = "bitool"
|
|
28
28
|
readme = "README.md"
|
|
29
29
|
requires-python = ">=3.8"
|
|
30
|
-
version = "0.1.
|
|
30
|
+
version = "0.1.4"
|
|
31
31
|
|
|
32
32
|
[project.urls]
|
|
33
33
|
Homepage = "https://gitee.com/gooker_young/bitool"
|
|
34
34
|
Issues = "https://gitee.com/gooker_young/bitool/issues"
|
|
35
35
|
|
|
36
36
|
[project.scripts]
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
alarmclk = "bitool.apps.alarmclock.gui:main"
|
|
38
|
+
bumpversion = "bitool.skills.bumpversion:main"
|
|
39
|
+
cls = "bitool.skills.clearscreen:main"
|
|
40
|
+
envpy = "bitool.skills.envpy:main"
|
|
41
|
+
envrs = "bitool.skills.envrs:main"
|
|
42
|
+
filedate = "bitool.skills.filedate:main"
|
|
43
|
+
filelevel = "bitool.skills.filelevel:main"
|
|
44
|
+
gitt = "bitool.skills.gittool:main"
|
|
45
|
+
img2pdf = "bitool.skills.img2pdf:main"
|
|
46
|
+
pdf2img = "bitool.skills.pdf2img:main"
|
|
47
|
+
pipt = "bitool.skills.piptool:main"
|
|
48
|
+
pymake = "bitool.skills.pymake:main"
|
|
49
|
+
pypack = "bitool.apps.pypack.cli:main"
|
|
50
|
+
sshcopyid = "bitool.skills.sshcopyid:main"
|
|
51
|
+
taskk = "bitool.skills.taskkill:main"
|
|
52
|
+
wch = "bitool.skills.which:main"
|
|
51
53
|
|
|
52
54
|
[[tool.uv.index]]
|
|
53
55
|
default = true
|
|
@@ -67,6 +69,7 @@ build = [
|
|
|
67
69
|
]
|
|
68
70
|
core = []
|
|
69
71
|
docs = ["sphinx-autobuild>=2021.3.14", "sphinx-rtd-theme>=1.5.2"]
|
|
72
|
+
gui = ["pyside2>=5.15.2.1"]
|
|
70
73
|
test = [
|
|
71
74
|
"bandit>=1.7.10",
|
|
72
75
|
"pytest-asyncio>=0.24.0",
|
|
@@ -74,7 +77,7 @@ test = [
|
|
|
74
77
|
"pytest-cov>=5.0.0",
|
|
75
78
|
"pytest-html>=4.1.1",
|
|
76
79
|
"pytest-mock>=3.14.0",
|
|
77
|
-
|
|
80
|
+
"pytest-qt>=4.4.0", # for qt testing
|
|
78
81
|
"pytest-timeout>=2.4.0",
|
|
79
82
|
"pytest-xdist>=3.6.1",
|
|
80
83
|
"pytest>=8.3.4",
|
|
@@ -83,7 +86,7 @@ typecheck = ["ty>=0.0.24"]
|
|
|
83
86
|
|
|
84
87
|
# ----------------------- pytest ------------------------ #
|
|
85
88
|
[tool.pytest.ini_options]
|
|
86
|
-
addopts = ["--dist=loadscope", "--numprocesses=
|
|
89
|
+
addopts = ["--dist=loadscope", "--numprocesses=8", "--tb=short", "-m not benchmark", "-v"]
|
|
87
90
|
asyncio_default_fixture_loop_scope = "function"
|
|
88
91
|
asyncio_mode = "auto"
|
|
89
92
|
filterwarnings = ["ignore::DeprecationWarning"]
|
|
@@ -160,7 +163,7 @@ max-doc-length = 120
|
|
|
160
163
|
convention = "numpy"
|
|
161
164
|
|
|
162
165
|
[dependency-groups]
|
|
163
|
-
dev = ["bitool[build,docs,test,typecheck]"]
|
|
166
|
+
dev = ["bitool[build,docs,gui,test,typecheck]"]
|
|
164
167
|
test = ["bitool[test]"]
|
|
165
168
|
|
|
166
169
|
# ----------------------- Hatch ------------------------ #
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Bitool Maturin - Rust + Python 混合架构工具集."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.1.4"
|
|
4
|
+
__author__ = "gooker_young"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
from .cmd._scheduler import CommandScheduler
|
|
8
|
+
from .consts import Constants
|
|
9
|
+
from .utils.profiler import profile
|
|
10
|
+
|
|
11
|
+
__all__ = ["CommandScheduler", "Constants", "profile"]
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Alarm Clock
|
|
2
|
+
|
|
3
|
+
A digital alarm clock application with a graphical user interface built using PySide2. Features include configurable alarms, digital time display, visual notifications, alarm history, and advanced configuration options.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Digital clock display** with animated border effects and customizable styling
|
|
8
|
+
- **Configurable alarm time setting** with precise time selection
|
|
9
|
+
- **Quick delay options** (1, 5, 10, 15, 30, 60 minutes) for fast alarm setup
|
|
10
|
+
- **Repeat alarm functionality** for daily recurring alarms
|
|
11
|
+
- **Snooze feature** with configurable snooze duration and count limits
|
|
12
|
+
- **Multiple visual notification effects** including color, opacity, and combined animations
|
|
13
|
+
|
|
14
|
+
- **Alarm history tracking** with statistics and recent activity
|
|
15
|
+
- **High contrast accessibility theme** for improved visibility
|
|
16
|
+
- **Professional UI styling** using qtstyles framework
|
|
17
|
+
- **Persistent configuration** with automatic saving and loading
|
|
18
|
+
- **Advanced settings** including window behavior, logging, and performance options
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Install the required dependencies:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install -e .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
Run the alarm clock application:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
alarmclk
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or directly with Python:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
python -m pytola.alarmclock
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Command Line Options
|
|
43
|
+
|
|
44
|
+
- `-d, --debug`: Enable debug mode with verbose logging
|
|
45
|
+
- `-v, --version`: Show version information
|
|
46
|
+
- `--config PATH`: Use custom configuration file
|
|
47
|
+
- `--reset-config`: Reset configuration to defaults
|
|
48
|
+
|
|
49
|
+
### Configuration
|
|
50
|
+
|
|
51
|
+
The application creates configuration files in `~/.pytola/alarmclock/`:
|
|
52
|
+
|
|
53
|
+
- `config.json`: Main configuration settings
|
|
54
|
+
- `history.json`: Alarm history and statistics
|
|
55
|
+
- `alarmclock.log`: Application logs
|
|
56
|
+
|
|
57
|
+
Configuration can be customized through the config file or programmatically.
|
|
58
|
+
|
|
59
|
+
## Configuration Parameters
|
|
60
|
+
|
|
61
|
+
The application uses the following configuration parameters:
|
|
62
|
+
|
|
63
|
+
- **Digital Clock**: Displays current time with animated border colors
|
|
64
|
+
- **Alarm Time**: Set specific time for the alarm to trigger
|
|
65
|
+
- **Delay Options**: Quick buttons to set alarms for specific intervals
|
|
66
|
+
- **Repeat Option**: Enable/disable alarm repetition
|
|
67
|
+
- **Visual Notifications**: Alert dialog with blinking effect
|
|
68
|
+
|
|
69
|
+
## Architecture
|
|
70
|
+
|
|
71
|
+
The application follows a modular design:
|
|
72
|
+
|
|
73
|
+
- `AlarmClockConfig`: Configuration dataclass with all application settings
|
|
74
|
+
- `AlarmClock`: Main application window with GUI controls and digital clock display
|
|
75
|
+
- `Reminder`: Notification dialog with visual effects
|
|
76
|
+
|
|
77
|
+
## Testing
|
|
78
|
+
|
|
79
|
+
The module includes comprehensive tests divided into two categories:
|
|
80
|
+
|
|
81
|
+
### Core Tests (Non-GUI)
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
python -m pytest pytola/alarmclock/tests/test_alarmclock_core.py -v
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Tests configuration, data classes, enums, and core logic without requiring a GUI environment.
|
|
88
|
+
|
|
89
|
+
### GUI Tests
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
python -m pytest pytola/alarmclock/tests/test_alarmclock_gui.py -v -m qt
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Tests GUI components using pytest-qt. These tests require a working Qt environment.
|
|
96
|
+
|
|
97
|
+
### Benchmark Tests
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python -m pytest pytola/alarmclock/tests/test_benchmark.py -v
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Performance benchmarks for critical operations.
|
|
104
|
+
|
|
105
|
+
### Run All Tests
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
python -m pytest pytola/alarmclock/tests/ -v
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Dependencies
|
|
112
|
+
|
|
113
|
+
- PySide2: GUI framework
|
|
114
|
+
- pytola.qtstyles: Professional Qt stylesheet themes
|
|
115
|
+
- typing-extensions: Type hinting support for older Python versions
|
|
116
|
+
- pytest: Testing framework
|
|
117
|
+
- pytest-qt: Qt testing utilities
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Alarmclock module."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775579698603" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1639" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M517.78756813 963.02833313c-248.20624839 0-450.14412281-201.93786116-450.14412292-450.14412274s201.93786116-450.14412281 450.14412292-450.14412293 450.14412281 201.93786116 450.14412269 450.14412293c0 110.01201254-54.54782202 174.46299818-176.8584166 208.99548464-18.13438105 5.1444977-34.40386711 7.25053268-56.09117547 7.25053245-7.3469941 0-15.54605323-0.24115299-25.04729943-0.67521515a469.43601209 469.43601209 0 0 0-20.4493977-0.51445125c-36.55813255 0-45.46455228 5.56250078-59.16180948 26.09228721-12.13781811 18.19868433-15.41743385 34.01803535 3.68154668 61.05883651 1.55942577 2.21856863 3.15100963 4.38890686 5.11233931 6.97723435l5.56250076 7.29876343c17.10547892 22.47505743 31.49401053 45.49671041 19.9349601 79.64335214l-1.89704011 5.59464564-3.42430764 4.8229824C629.53584301 961.27598479 594.40853004 963.02833313 517.78756813 963.02833313z m0-819.90536181c-203.88313189 0-369.76123919 165.87810694-369.76123914 369.76123907s165.87810694 369.76123919 369.76123914 369.76123899c37.2976513 0 55.09443111-0.90028283 64.30630705-2.79732269-0.41798999-0.57875404-0.90028283-1.18966641-1.38258884-1.81665161l-5.53034276-7.25053241a322.01381491 322.01381491 0 0 1-6.88077321-9.3726402c-36.23660395-51.26820641-37.89249105-102.4238655-4.87119975-151.95579598 34.24310269-51.34858158 75.15799728-61.89481598 126.04034521-61.894816 7.45952764 0 15.43350624 0.22506734 24.05055567 0.61089915 26.68711402 1.17359408 39.86990654 0.83597968 55.65711286-3.64937491 88.51762698-24.98299647 118.35575041-58.18112471 118.35575039-131.63500434 0.01607252-203.88313189-165.84594893-369.76123919-369.74516662-369.76123907z" fill="#1296db" p-id="1640"></path><path d="M300.75380167 440.53962147m-56.26802518 0a56.26801236 56.26801236 0 1 0 112.53603734 0 56.26801236 56.26801236 0 1 0-112.53603734 0Z" fill="#1296db" p-id="1641"></path><path d="M734.82133467 440.53962147m-56.26801214 0a56.26801236 56.26801236 0 1 0 112.53603733 0 56.26801236 56.26801236 0 1 0-112.53603733 0Z" fill="#1296db" p-id="1642"></path><path d="M429.3664027 295.85044411m-56.26801231 0a56.26801236 56.26801236 0 1 0 112.53602443 0 56.26801236 56.26801236 0 1 0-112.53602443 0Z" fill="#1296db" p-id="1643"></path><path d="M606.2087337 295.85044411m-56.26801201 0a56.26801236 56.26801236 0 1 0 112.5360242 0 56.26801236 56.26801236 0 1 0-112.5360242 0Z" fill="#1296db" p-id="1644"></path></svg>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Configuration for alarmclock."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from bitool.core import JsonConfig
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AlarmClockConfig(JsonConfig):
|
|
9
|
+
"""Configuration for the alarm clock application."""
|
|
10
|
+
|
|
11
|
+
CLOCK_SIZE = [480, 400] # noqa: RUF012
|
|
12
|
+
WIN_SIZE = [480, 400] # noqa: RUF012
|
|
13
|
+
WIN_POS = [300, 200] # noqa: RUF012
|
|
14
|
+
THEME = "high_contrast"
|
|
15
|
+
ALARM_CLOCK_TITLE = "Digital Alarm Clock"
|
|
16
|
+
DIGITAL_FONT = "bold italic 81px 'Consolas'"
|
|
17
|
+
DIGITAL_BORDER_COLORS = ("#00aa00", "#eecc00", "#aa00aa", "#c0e0b0")
|
|
18
|
+
DIGITAL_TIMER_FORMAT = "%H:%M:%S"
|
|
19
|
+
DIGITAL_UPDATE_INTERVAL = 1000
|
|
20
|
+
|
|
21
|
+
BLINK_TITLE = "Alarm Reminder!"
|
|
22
|
+
BLINK_CONTENT = "⏰ Time's Up!"
|
|
23
|
+
BLINK_TYPE = "color"
|
|
24
|
+
BLINK_BG_COLORS = ("#baf1ba", "#f8ccc3", "#aab4f0", "#efaec0")
|
|
25
|
+
BLINK_INTERVAL = 300
|
|
26
|
+
DELAY_STEPS = (1, 5, 10, 15, 30, 60)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
conf = AlarmClockConfig()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Graphical user interface for alarmclock."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from PySide2.QtWidgets import QApplication
|
|
8
|
+
|
|
9
|
+
from .widgets.alarmclock import AlarmClock
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main() -> None:
|
|
13
|
+
"""Run entry point for the GUI application."""
|
|
14
|
+
app = QApplication(sys.argv)
|
|
15
|
+
|
|
16
|
+
window = AlarmClock()
|
|
17
|
+
window.show()
|
|
18
|
+
|
|
19
|
+
sys.exit(app.exec_())
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
dependencies = ["pytola-core>=0.2.6", "pytola-qtstyles>=0.2.6"]
|
|
3
|
+
description = "A digital alarm clock with GUI interface supporting configurable alarms, time display, and visual notifications"
|
|
4
|
+
name = "alarmclock"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.8"
|
|
7
|
+
version = "0.2.7"
|
|
8
|
+
|
|
9
|
+
[build-system]
|
|
10
|
+
build-backend = "hatchling.build"
|
|
11
|
+
requires = ["hatchling"]
|
|
12
|
+
# ------------------------ ruff ------------------------- #
|
|
13
|
+
[tool.ruff]
|
|
14
|
+
exclude = ["**/*_rc.py", "**/*_ui.py", "**/ui_*.py", "docs/**/*.py"]
|
|
15
|
+
line-length = 120
|
|
16
|
+
preview = true
|
|
17
|
+
target-version = "py38"
|
|
18
|
+
unsafe-fixes = true
|
|
19
|
+
|
|
20
|
+
[tool.ruff.lint]
|
|
21
|
+
# See list of rules at: https://docs.astral.sh/ruff/rules/
|
|
22
|
+
select = [
|
|
23
|
+
"A",
|
|
24
|
+
"ANN",
|
|
25
|
+
"B",
|
|
26
|
+
"BLE",
|
|
27
|
+
"C4",
|
|
28
|
+
"COM",
|
|
29
|
+
"DTZ",
|
|
30
|
+
"E",
|
|
31
|
+
"ERA",
|
|
32
|
+
"F",
|
|
33
|
+
"FBT",
|
|
34
|
+
"I",
|
|
35
|
+
"LOG",
|
|
36
|
+
"PERF",
|
|
37
|
+
"RUF",
|
|
38
|
+
"S",
|
|
39
|
+
"SIM",
|
|
40
|
+
"SLOT",
|
|
41
|
+
"T10",
|
|
42
|
+
"T20",
|
|
43
|
+
"TRY",
|
|
44
|
+
"UP"
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
ignore = ["E501", "ERA001", "RUF002", "RUF003"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff.lint.per-file-ignores]
|
|
50
|
+
"**/*gui*.py" = ["FBT", "N802", "N803", "N806"] # Allow Qt naming conventions
|
|
51
|
+
"**/gui/**" = ["FBT", "N802", "N803", "N806"] # Allow Qt naming conventions
|
|
52
|
+
"**/tests/**" = ["ANN001", "ANN002", "ANN003", "FBT001", "S101", "S106"] # Allow pytest fixtures in tests.
|
|
53
|
+
"**/ui/**" = ["N802", "N803", "N806"] # Allow Qt naming conventions
|
|
54
|
+
"**/views/**" = ["N802", "N803", "N806"] # Allow Qt naming conventions
|
|
55
|
+
"*benchmark*.py" = ["ANN001"]
|
|
56
|
+
|
|
57
|
+
[tool.ruff.lint.pycodestyle]
|
|
58
|
+
max-doc-length = 120
|
|
59
|
+
|
|
60
|
+
[tool.ruff.lint.pydocstyle]
|
|
61
|
+
convention = "numpy"
|
|
62
|
+
|
|
63
|
+
# ------------------------ pytest ------------------------- #
|
|
64
|
+
[tool.pytest.ini_options]
|
|
65
|
+
addopts = ["--tb=short", "-m not benchmark", "-v"]
|
|
66
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
67
|
+
asyncio_mode = "auto"
|
|
68
|
+
filterwarnings = ["ignore::DeprecationWarning"]
|
|
69
|
+
markers = [
|
|
70
|
+
"benchmark: marks tests as performance benchmarks",
|
|
71
|
+
"slow: marks tests as slow-running (for stress testing and large-scale operations)"
|
|
72
|
+
]
|
|
73
|
+
python_classes = ["Test*"]
|
|
74
|
+
python_files = ["test_*.py"]
|
|
75
|
+
python_functions = ["test_*"]
|
|
76
|
+
testpaths = ["."]
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Resource object code (Python 3)
|
|
2
|
+
# Created by: object code
|
|
3
|
+
# Created by: The Resource Compiler for Qt version 5.15.2
|
|
4
|
+
# WARNING! All changes made in this file will be lost!
|
|
5
|
+
|
|
6
|
+
from PySide2 import QtCore
|
|
7
|
+
|
|
8
|
+
qt_resource_data = b"\
|
|
9
|
+
\x00\x00\x0a\x8b\
|
|
10
|
+
<\
|
|
11
|
+
?xml version=\x221.\
|
|
12
|
+
0\x22 standalone=\x22n\
|
|
13
|
+
o\x22?><!DOCTYPE sv\
|
|
14
|
+
g PUBLIC \x22-//W3C\
|
|
15
|
+
//DTD SVG 1.1//E\
|
|
16
|
+
N\x22 \x22http://www.w\
|
|
17
|
+
3.org/Graphics/S\
|
|
18
|
+
VG/1.1/DTD/svg11\
|
|
19
|
+
.dtd\x22><svg t=\x2217\
|
|
20
|
+
75579698603\x22 cla\
|
|
21
|
+
ss=\x22icon\x22 viewBo\
|
|
22
|
+
x=\x220 0 1024 1024\
|
|
23
|
+
\x22 version=\x221.1\x22 \
|
|
24
|
+
xmlns=\x22http://ww\
|
|
25
|
+
w.w3.org/2000/sv\
|
|
26
|
+
g\x22 p-id=\x221639\x22 x\
|
|
27
|
+
mlns:xlink=\x22http\
|
|
28
|
+
://www.w3.org/19\
|
|
29
|
+
99/xlink\x22 width=\
|
|
30
|
+
\x22200\x22 height=\x2220\
|
|
31
|
+
0\x22><path d=\x22M517\
|
|
32
|
+
.78756813 963.02\
|
|
33
|
+
833313c-248.2062\
|
|
34
|
+
4839 0-450.14412\
|
|
35
|
+
281-201.93786116\
|
|
36
|
+
-450.14412292-45\
|
|
37
|
+
0.14412274s201.9\
|
|
38
|
+
3786116-450.1441\
|
|
39
|
+
2281 450.1441229\
|
|
40
|
+
2-450.14412293 4\
|
|
41
|
+
50.14412281 201.\
|
|
42
|
+
93786116 450.144\
|
|
43
|
+
12269 450.144122\
|
|
44
|
+
93c0 110.0120125\
|
|
45
|
+
4-54.54782202 17\
|
|
46
|
+
4.46299818-176.8\
|
|
47
|
+
584166 208.99548\
|
|
48
|
+
464-18.13438105 \
|
|
49
|
+
5.1444977-34.403\
|
|
50
|
+
86711 7.25053268\
|
|
51
|
+
-56.09117547 7.2\
|
|
52
|
+
5053245-7.346994\
|
|
53
|
+
1 0-15.54605323-\
|
|
54
|
+
0.24115299-25.04\
|
|
55
|
+
729943-0.6752151\
|
|
56
|
+
5a469.43601209 4\
|
|
57
|
+
69.43601209 0 0 \
|
|
58
|
+
0-20.4493977-0.5\
|
|
59
|
+
1445125c-36.5581\
|
|
60
|
+
3255 0-45.464552\
|
|
61
|
+
28 5.56250078-59\
|
|
62
|
+
.16180948 26.092\
|
|
63
|
+
28721-12.1378181\
|
|
64
|
+
1 18.19868433-15\
|
|
65
|
+
.41743385 34.018\
|
|
66
|
+
03535 3.68154668\
|
|
67
|
+
61.05883651 1.5\
|
|
68
|
+
5942577 2.218568\
|
|
69
|
+
63 3.15100963 4.\
|
|
70
|
+
38890686 5.11233\
|
|
71
|
+
931 6.97723435l5\
|
|
72
|
+
.56250076 7.2987\
|
|
73
|
+
6343c17.10547892\
|
|
74
|
+
22.47505743 31.\
|
|
75
|
+
49401053 45.4967\
|
|
76
|
+
1041 19.9349601 \
|
|
77
|
+
79.64335214l-1.8\
|
|
78
|
+
9704011 5.594645\
|
|
79
|
+
64-3.42430764 4.\
|
|
80
|
+
8229824C629.5358\
|
|
81
|
+
4301 961.2759847\
|
|
82
|
+
9 594.40853004 9\
|
|
83
|
+
63.02833313 517.\
|
|
84
|
+
78756813 963.028\
|
|
85
|
+
33313z m0-819.90\
|
|
86
|
+
536181c-203.8831\
|
|
87
|
+
3189 0-369.76123\
|
|
88
|
+
919 165.87810694\
|
|
89
|
+
-369.76123914 36\
|
|
90
|
+
9.76123907s165.8\
|
|
91
|
+
7810694 369.7612\
|
|
92
|
+
3919 369.7612391\
|
|
93
|
+
4 369.76123899c3\
|
|
94
|
+
7.2976513 0 55.0\
|
|
95
|
+
9443111-0.900282\
|
|
96
|
+
83 64.30630705-2\
|
|
97
|
+
.79732269-0.4179\
|
|
98
|
+
8999-0.57875404-\
|
|
99
|
+
0.90028283-1.189\
|
|
100
|
+
66641-1.38258884\
|
|
101
|
+
-1.81665161l-5.5\
|
|
102
|
+
3034276-7.250532\
|
|
103
|
+
41a322.01381491 \
|
|
104
|
+
322.01381491 0 0\
|
|
105
|
+
1-6.88077321-9.\
|
|
106
|
+
3726402c-36.2366\
|
|
107
|
+
0395-51.26820641\
|
|
108
|
+
-37.89249105-102\
|
|
109
|
+
.4238655-4.87119\
|
|
110
|
+
975-151.95579598\
|
|
111
|
+
34.24310269-51.\
|
|
112
|
+
34858158 75.1579\
|
|
113
|
+
9728-61.89481598\
|
|
114
|
+
126.04034521-61\
|
|
115
|
+
.894816 7.459527\
|
|
116
|
+
64 0 15.43350624\
|
|
117
|
+
0.22506734 24.0\
|
|
118
|
+
5055567 0.610899\
|
|
119
|
+
15 26.68711402 1\
|
|
120
|
+
.17359408 39.869\
|
|
121
|
+
90654 0.83597968\
|
|
122
|
+
55.65711286-3.6\
|
|
123
|
+
4937491 88.51762\
|
|
124
|
+
698-24.98299647 \
|
|
125
|
+
118.35575041-58.\
|
|
126
|
+
18112471 118.355\
|
|
127
|
+
75039-131.635004\
|
|
128
|
+
34 0.01607252-20\
|
|
129
|
+
3.88313189-165.8\
|
|
130
|
+
4594893-369.7612\
|
|
131
|
+
3919-369.7451666\
|
|
132
|
+
2-369.76123907z\x22\
|
|
133
|
+
fill=\x22#1296db\x22 \
|
|
134
|
+
p-id=\x221640\x22></pa\
|
|
135
|
+
th><path d=\x22M300\
|
|
136
|
+
.75380167 440.53\
|
|
137
|
+
962147m-56.26802\
|
|
138
|
+
518 0a56.2680123\
|
|
139
|
+
6 56.26801236 0 \
|
|
140
|
+
1 0 112.53603734\
|
|
141
|
+
0 56.26801236 5\
|
|
142
|
+
6.26801236 0 1 0\
|
|
143
|
+
-112.53603734 0Z\
|
|
144
|
+
\x22 fill=\x22#1296db\x22\
|
|
145
|
+
p-id=\x221641\x22></p\
|
|
146
|
+
ath><path d=\x22M73\
|
|
147
|
+
4.82133467 440.5\
|
|
148
|
+
3962147m-56.2680\
|
|
149
|
+
1214 0a56.268012\
|
|
150
|
+
36 56.26801236 0\
|
|
151
|
+
1 0 112.5360373\
|
|
152
|
+
3 0 56.26801236 \
|
|
153
|
+
56.26801236 0 1 \
|
|
154
|
+
0-112.53603733 0\
|
|
155
|
+
Z\x22 fill=\x22#1296db\
|
|
156
|
+
\x22 p-id=\x221642\x22></\
|
|
157
|
+
path><path d=\x22M4\
|
|
158
|
+
29.3664027 295.8\
|
|
159
|
+
5044411m-56.2680\
|
|
160
|
+
1231 0a56.268012\
|
|
161
|
+
36 56.26801236 0\
|
|
162
|
+
1 0 112.5360244\
|
|
163
|
+
3 0 56.26801236 \
|
|
164
|
+
56.26801236 0 1 \
|
|
165
|
+
0-112.53602443 0\
|
|
166
|
+
Z\x22 fill=\x22#1296db\
|
|
167
|
+
\x22 p-id=\x221643\x22></\
|
|
168
|
+
path><path d=\x22M6\
|
|
169
|
+
06.2087337 295.8\
|
|
170
|
+
5044411m-56.2680\
|
|
171
|
+
1201 0a56.268012\
|
|
172
|
+
36 56.26801236 0\
|
|
173
|
+
1 0 112.5360242\
|
|
174
|
+
0 56.26801236 5\
|
|
175
|
+
6.26801236 0 1 0\
|
|
176
|
+
-112.5360242 0Z\x22\
|
|
177
|
+
fill=\x22#1296db\x22 \
|
|
178
|
+
p-id=\x221644\x22></pa\
|
|
179
|
+
th></svg>\x0a\
|
|
180
|
+
"
|
|
181
|
+
|
|
182
|
+
qt_resource_name = b"\
|
|
183
|
+
\x00\x06\
|
|
184
|
+
\x06\x8a\x9c\xb3\
|
|
185
|
+
\x00a\
|
|
186
|
+
\x00s\x00s\x00e\x00t\x00s\
|
|
187
|
+
\x00\x09\
|
|
188
|
+
\x0c8\xaf\x07\
|
|
189
|
+
\x00t\
|
|
190
|
+
\x00h\x00e\x00m\x00e\x00.\x00s\x00v\x00g\
|
|
191
|
+
"
|
|
192
|
+
|
|
193
|
+
qt_resource_struct = b"\
|
|
194
|
+
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
|
195
|
+
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
196
|
+
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
|
|
197
|
+
\x00\x00\x00\x00\x00\x00\x00\x00\
|
|
198
|
+
\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
|
199
|
+
\x00\x00\x01\x9dh\xcf\xf6\x12\
|
|
200
|
+
"
|
|
201
|
+
|
|
202
|
+
def qInitResources():
|
|
203
|
+
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
|
204
|
+
|
|
205
|
+
def qCleanupResources():
|
|
206
|
+
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
|
207
|
+
|
|
208
|
+
qInitResources()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Tests for alarmclock module."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Test configuration for alarmclock tests."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
|
|
7
|
+
import pytest
|
|
8
|
+
|
|
9
|
+
from bitool.gui import clear_ui_cache
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from collections.abc import Generator
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@pytest.fixture(autouse=True)
|
|
16
|
+
def _() -> Generator[None, None, None]:
|
|
17
|
+
"""Clear UI loader cache before and after each test to prevent dangling pointer issues.
|
|
18
|
+
|
|
19
|
+
This fixes the access violation error (exit code 3221225477) that occurs
|
|
20
|
+
when multiple tests create AlarmClock instances consecutively. The cache
|
|
21
|
+
may hold references to destroyed widgets, causing memory access violations.
|
|
22
|
+
"""
|
|
23
|
+
# 测试前清除缓存,确保不使用已销毁的 widget 引用
|
|
24
|
+
clear_ui_cache()
|
|
25
|
+
yield
|
|
26
|
+
# 测试后也清除缓存,保持干净状态
|
|
27
|
+
clear_ui_cache()
|