Compare commits

..

No commits in common. "4ca5e4b3c210520895b89c7abe1d977979dd1d6e" and "aa56bc219e28a18407ffe8e1184ef33b7efae437" have entirely different histories.

5 changed files with 8 additions and 14 deletions

View File

@ -137,7 +137,7 @@ repos:
# than merely an old one.
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.11.0#subdirectory=gatelock
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.19.1#subdirectory=earned_time
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.18.0#subdirectory=earned_time
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
# Same pin as workout_app/tools/render_finish_chime.sh installs.
@ -160,7 +160,7 @@ repos:
# than merely an old one.
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.11.0#subdirectory=gatelock
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.19.1#subdirectory=earned_time
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.18.0#subdirectory=earned_time
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
- mcp>=2,<3

View File

@ -10,7 +10,7 @@ dependencies = [
"gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.11.0#subdirectory=gatelock",
"crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync",
"freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays",
"earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.19.1#subdirectory=earned_time",
"earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.18.0#subdirectory=earned_time",
"sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays",
]

View File

@ -4,7 +4,7 @@ bandit==1.9.4
codespell==2.4.3
coverage==7.17.0
crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.19.1#subdirectory=earned_time
earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.18.0#subdirectory=earned_time
freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.11.0#subdirectory=gatelock
mcp==2.3.0

View File

@ -215,9 +215,3 @@ def _no_real_ntp() -> Iterator[None]:
"""
with patch("screen_locker._time_check._query_ntp_offset", return_value=None):
yield
@pytest.fixture(autouse=True)
def _no_live_focus_project(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
"""No live focus project reshapes the registry (earned_time >= 0.19)."""
monkeypatch.setenv("FOCUS_PROJECT_DATA", str(tmp_path / "focus_project"))

View File

@ -21,7 +21,7 @@ import pytest
from screen_locker import _sync_client
from screen_locker._degraded_sources import clear_degraded_sources
from screen_locker._earned import watched_earners
from screen_locker._earned import flat_earners
from screen_locker.tests._gatelock_fixtures import (
FAKE_OUTPUTS,
TWO_OUTPUTS,
@ -183,8 +183,8 @@ def _isolate_state_files(tmp_path: Path) -> Iterator[None]:
yield
# Every registry's flat earners (a live focus project hides some today).
_BONUS = [f"{e.name}_bonus_date" for e in watched_earners() if e.kind == "flat"]
# Every registered flat earner's live-pass stamp, so a future one is seeded too.
_SEEDED_STAMPS = ("last_reset_date", *(f"{e.name}_bonus_date" for e in flat_earners()))
@pytest.fixture(autouse=True)
@ -200,7 +200,7 @@ def _isolate_shutdown_base(tmp_path: Path) -> Iterator[None]:
"""
target = tmp_path / "shutdown_base.json"
today = datetime.now(tz=UTC).strftime("%Y-%m-%d")
target.write_text(json.dumps(dict.fromkeys(["last_reset_date", *_BONUS], today)))
target.write_text(json.dumps(dict.fromkeys(_SEEDED_STAMPS, today)))
with (
patch("screen_locker._constants.SHUTDOWN_BASE_FILE", target),
patch("screen_locker._startup_checks.SHUTDOWN_BASE_FILE", target),