Skip to content

Commit 36bca07

Browse files
authored
Merge pull request slgobinath#750 from slgobinath/master
release: 3.0.0b4
2 parents 88200b2 + c397e7c commit 36bca07

File tree

105 files changed

+5733
-2460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5733
-2460
lines changed

.github/workflows/build-deb.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Debian Package
2+
3+
on:
4+
push:
5+
branches: [ release ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-deb:
10+
name: Build Debian Package
11+
runs-on: ubuntu-24.04
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y build-essential python3-stdeb fakeroot dpkg-dev debhelper dh-python python3 python3-packaging python3-setuptools
21+
22+
- name: Build .deb package
23+
run: |
24+
DPKG_DEB_COMPRESSOR_TYPE=xz dpkg-buildpackage -us -uc -nc
25+
mv ../*.deb .
26+
27+
- name: Upload .deb to GitHub Release
28+
if: github.event_name == 'release'
29+
uses: softprops/action-gh-release@v2
30+
with:
31+
files: "*.deb"
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Save .deb as workflow artifact
36+
if: github.event_name != 'release'
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: deb-package
40+
path: "*.deb"

.github/workflows/mypy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
3131
with:
3232
python-version: '3.13'
33-
- run: sudo apt-get install -y libwayland-dev libcairo2-dev libgirepository-2.0-dev
33+
- run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libwayland-dev libcairo2-dev libgirepository-2.0-dev
3436
- run: uv pip install -r pyproject.toml
3537
- run: uv pip install --group types
3638
- run: mypy safeeyes

.github/workflows/pytest.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Workflow to run pytest
2+
name: pytest
3+
4+
on: [push, pull_request]
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
UV_SYSTEM_PYTHON: 1
11+
PIP_DISABLE_PIP_VERSION_CHECK: 1
12+
13+
jobs:
14+
pytest:
15+
name: pytest
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
with:
20+
persist-credentials: false
21+
- uses: astral-sh/setup-uv@22695119d769bdb6f7032ad67b9bca0ef8c4a174 # v5.4.0
22+
with:
23+
enable-cache: true
24+
cache-dependency-glob: ''
25+
cache-suffix: '3.13'
26+
- name: Setup Python
27+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
28+
with:
29+
python-version: '3.13'
30+
- name: Install OS dependencies
31+
run: |
32+
sudo apt-get update -yy
33+
sudo apt-get install -yy --no-install-recommends libwayland-dev libcairo2-dev libgirepository-2.0-dev gir1.2-gtk-4.0
34+
- run: uv pip install -r pyproject.toml
35+
- run: uv pip install --group tests
36+
- run: pytest

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install build wheel
25+
sudo apt-get update
2526
sudo apt-get install -y gettext
2627
2728
- name: Get Current Version

.github/workflows/translations.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run: |
2626
python3 -m pip install --upgrade pip setuptools wheel
2727
python3 -m pip install polib
28+
sudo apt-get update
2829
sudo apt-get install -y gettext
2930
3031
- name: Check translations

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ include README.md
33

44
graft safeeyes
55

6+
prune safeeyes/tests
7+
68
global-exclude *.py[cod]

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,18 @@ flatpak install flathub io.github.slgobinath.SafeEyes
118118
Ensure to meet the following dependencies:
119119

120120
- gir1.2-notify-0.7
121+
- gir1.2-gtk-4.0
121122
- python3-babel
122123
- python3-croniter
123-
- python3-psutil
124+
- python3-gi
124125
- python3-packaging
125126
- python3-xlib
126-
- xprintidle (optional)
127-
- wlrctl (wayland optional)
127+
- python3-pywayland (optional for KDE/other wayland)
128+
- xprintidle (optional for X11)
129+
- wlrctl (optional for wayland/wlroots)
128130
- Python 3.10+
129131

130-
**To install Safe Eyes:**
132+
**To install Safe Eyes from PyPI:**
131133

132134
```bash
133135
sudo pip3 install safeeyes
@@ -188,7 +190,6 @@ This method has the same caveats about icons/window icons as running from source
188190
- Smart pause if system is idle
189191
- Multi-screen support
190192
- Customizable user interface
191-
- RPC API to control externally
192193
- Command-line arguments to control the running instance
193194
- Customizable using plug-ins
194195

@@ -208,7 +209,12 @@ To ensure that the coding and formatting guidelines are followed, install [ruff]
208209

209210
To ensure that any types are correct, install [mypy](https://github.com/python/mypy) and run `mypy safeeyes`.
210211

211-
The last three checks are also run in CI, so a PR must pass all the tests for it to be mmerged.
212+
To ensure that the tests still pass, install [pytest](https://docs.pytest.org/en/stable/) and run `pytest`.
213+
214+
The last four checks are also run in CI, so a PR must pass all the tests for it to be mmerged.
215+
216+
It is also possible to use dependency groups to install the needed dependencies. When using a new enough version of pip, run `pip install --group types` to install all dependencies to run the type check.
217+
The available dependency groups can be found in the `pyproject.toml` file.
212218

213219
## How to Release?
214220

debian/changelog

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
safeeyes (3.0.0b3) noble; urgency=medium
2+
3+
* Wayland support: break screen shortcuts, window activation, donotdisturb
4+
detection
5+
6+
* Feature: Add option to postpone breaks by seconds rather than minutes
7+
8+
* Feature: screensaver: add tray action to lock screen now
9+
10+
* smartpause: Performance/Battery life improvements
11+
12+
* replace RPC server with native GTK commandline integration
13+
14+
* Internal refactoring to improve thread safety
15+
16+
* Internal: automated tests using pytest
17+
18+
* Internal: typechecking improvement
19+
20+
-- Mel Dafert <[email protected]> Fri, 22 Aug 2025 11:30:00 +0000
21+
122
safeeyes (3.0.0b3) noble; urgency=medium
223

324
* Re-release due to broken github action

debian/control

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ Homepage: https://github.com/slgobinath/SafeEyes/
99

1010
Package: safeeyes
1111
Architecture: all
12-
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>= 3.10.0), python3-xlib, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter, python3-packaging, gir1.2-gtk-4.0
12+
Depends: ${misc:Depends}, ${python3:Depends},
13+
python3 (>= 3.10.0),
14+
python3-xlib,
15+
python3-babel,
16+
x11-utils,
17+
xprintidle,
18+
alsa-utils,
19+
python3-croniter,
20+
python3-packaging,
21+
gir1.2-notify-0.7,
22+
gir1.2-gtk-4.0
1323
Description: Prevent eye strain with Safe Eyes – an essential screen break reminder.
1424
Safe Eyes is a simple tool to remind you to take periodic breaks for your eyes. This is essential for anyone spending more time on the computer to avoid eye strain and other physical problems.
1525
.

pyproject.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "safeeyes"
3-
version = "3.0.0b3"
3+
version = "3.0.0b4"
44
description = "Protect your eyes from eye strain using this continuous breaks reminder."
55
keywords = ["linux utility health eye-strain safe-eyes"]
66
readme = "README.md"
@@ -24,15 +24,14 @@ dependencies = [
2424
"pywayland",
2525
"PyGObject",
2626
"babel",
27-
"psutil",
2827
"packaging",
2928
"python-xlib",
3029
]
3130
requires-python = ">=3.10"
3231

3332
[project.urls]
3433
Homepage = "https://github.com/slgobinath/SafeEyes"
35-
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.0.0b3.tar.gz"
34+
Downloads = "https://github.com/slgobinath/SafeEyes/archive/v3.0.0b4.tar.gz"
3635

3736
[project.scripts]
3837
safeeyes = "safeeyes.__main__:main"
@@ -46,12 +45,14 @@ build-backend = "setuptools.build_meta"
4645

4746
[tool.setuptools.packages.find]
4847
include=["safeeyes*"]
48+
exclude=["safeeyes.tests*"]
4949

5050
[dependency-groups]
5151
dev = [
5252
{include-group = "lint"},
5353
{include-group = "scripts"},
54-
{include-group = "types"}
54+
{include-group = "tests"},
55+
{include-group = "types"},
5556
]
5657
lint = [
5758
"ruff==0.11.2"
@@ -63,8 +64,12 @@ types = [
6364
"mypy==1.15.0",
6465
"PyGObject-stubs==2.13.0",
6566
"types-croniter==5.0.1.20250322",
66-
"types-psutil==7.0.0.20250218",
67-
"types-python-xlib==0.33.0.20240407"
67+
"types-python-xlib==0.33.0.20240407",
68+
{include-group = "tests"},
69+
]
70+
tests = [
71+
"pytest==8.3.5",
72+
"time-machine==2.16.0",
6873
]
6974

7075
[tool.mypy]
@@ -78,3 +83,8 @@ enable_error_code = [
7883
"ignore-without-code",
7984
"possibly-undefined"
8085
]
86+
87+
[tool.pytest.ini_options]
88+
addopts = [
89+
"--import-mode=importlib",
90+
]

0 commit comments

Comments
 (0)