29fc493cc2
Rewrite fasting trend algorithm and add comprehensive tests
...
- Replace day-iteration algorithm with pair-based approach for fasting
detection. Iterate consecutive food scrobble pairs and mark foodless
days between them as fasting days.
- Handle consecutive-day periodic fasting: when two food scrobbles are on
consecutive days with a gap >= periodic_threshold but < full_threshold,
mark the later day as a periodic fast (user's original bug fix).
- Fix _dt test helper to use replace() instead of subtracting hours,
producing correct timestamps (e.g., '3 days ago at 18:46' instead of
'3 days + 18h46m ago').
- Fix total_days off-by-one: removed +1 from inclusive day count so a
'last_30' period correctly reports 30 days.
- Add _drinks_on_day() for per-day drink detection (replaces whole-
window _drinks_in_window for more accurate liquid fasting detection).
- Fix Beer test fixture to use styles M2M field instead of non-existent
beer_style attribute.
- Add 26 test cases covering: classification, short gaps, periodic/
full/liquid fasting, multi-day gaps, vacation exemptions, custom
thresholds, streaks, mixed types, edge cases.
Reasoning:
The original day-iteration algorithm had fundamental issues: it marked
days with food as fasting (since it only checked prev/next food times),
it didn't filter out normal (< periodic) gaps, and the _dt helper was
misinterpreting hour parameters. The new pair-based approach is cleaner:
for each consecutive food scrobble pair, we mark the foodless days
between them. This naturally handles multi-day fasts and correctly
avoids marking food-eating days as fasting. The consecutive-day periodic
rule preserves the user's original intent of detecting overnight fasts
between meals.
2026-07-19 13:11:29 -04:00
dccc80c615
[discgolf] Fix tests and naming scheme
build / test (push) Has been cancelled
2026-06-20 00:55:16 -04:00
033239260f
[perf] Add caching and lock protections
build / test (push) Successful in 1m57s
2026-06-19 13:37:30 -04:00
c6b1e42d7a
[scrobbles] Use IDs not UUIDs in URLs
build / test (push) Successful in 1m59s
2026-06-18 11:25:57 -04:00
ed2ed59f65
[scrobbles] Fix tests around visbility
2026-06-09 12:48:01 -04:00
58639c6fc1
[importers] Add error_log to surface import errors
build / test (push) Successful in 2m2s
2026-06-08 10:58:02 -04:00
8d069df9d1
[scrobbles] Fix log saving tests
2026-05-31 23:24:22 -04:00
22956c7c7f
[music] Tracks can have multiple artists
build & deploy / test (push) Successful in 1m54s
build & deploy / build-and-deploy (push) Successful in 33s
2026-05-28 23:37:46 -04:00
83e7061b92
[birds] Fix tests
build & deploy / test (push) Successful in 1m54s
build & deploy / build-and-deploy (push) Successful in 27s
2026-05-23 18:29:16 -04:00
9bafe45951
[trails] Use half way waypoints
build & deploy / test (push) Successful in 1m51s
build & deploy / build-and-deploy (push) Successful in 29s
2026-05-21 17:13:04 -04:00
62c200ab05
[trails] Fix webdav importer
build & deploy / test (push) Successful in 1m54s
build & deploy / build-and-deploy (push) Successful in 26s
2026-05-21 13:54:28 -04:00
7c33095d87
[trails] Pull data out of FIT/GPX files
build & deploy / test (push) Successful in 1m50s
build & deploy / build-and-deploy (push) Successful in 27s
2026-05-21 11:17:13 -04:00
cb50de13c0
[trails] Add auto GPX and FIT file importing
build & deploy / test (push) Successful in 1m51s
build & deploy / build-and-deploy (push) Successful in 32s
2026-05-21 10:52:23 -04:00
e85d6ec779
[birds] Fix importer not finishing, and add formjs
2026-05-15 12:20:27 -04:00
f160f5a7b8
[birds] Add much better bird importing
build & deploy / test (push) Failing after 1m19s
build & deploy / build-and-deploy (push) Has been skipped
2026-05-15 12:10:20 -04:00
b1d6f4726b
[deploy] Fix deploy failing
build & deploy / test (push) Successful in 1m57s
build & deploy / build-and-deploy (push) Failing after 16s
2026-05-01 16:57:51 -04:00
cbdb5c49d0
[deploy] Add commit catpure to deploy step
build & deploy / test (push) Failing after 1m31s
build & deploy / build-and-deploy (push) Has been skipped
2026-05-01 16:48:58 -04:00
f486b1614b
[videos] Blow out imdb tests
build & deploy / test (push) Successful in 1m54s
build & deploy / deploy (push) Successful in 19s
2026-04-28 17:29:25 -04:00
78651af802
[tasks] Fix Todoist callback to lookup by user
2026-04-01 11:53:04 -04:00
59998ac849
[scrobbles] Allow Bearer or Token
build & deploy / test (push) Successful in 1m40s
build & deploy / deploy (push) Successful in 23s
2026-03-31 14:43:40 -04:00
2ca3dd1ed9
[scrobbles] Update webhook view permissions and small template changes
2026-03-30 12:54:21 -04:00
ea66ee376d
[tests] Fix scrobble tests
build & deploy / test (push) Successful in 1m49s
build & deploy / deploy (push) Failing after 2m3s
2026-03-27 16:06:24 -04:00
d576467db8
[black] Reformat to use 88 line lengths
2026-03-23 16:17:15 -04:00
190f486c49
[videos] Fix saving imdb_id duplicates
build & deploy / test (push) Successful in 2m1s
build & deploy / deploy (push) Successful in 22s
2026-03-21 14:35:39 -04:00
7a74f7f882
[tests] Add scrobble tests
build & deploy / test (push) Successful in 1m49s
build & deploy / deploy (push) Failing after 2m5s
2026-03-19 21:17:27 -04:00
5934dcdf8e
[format] Blacken everything
build & deploy / test (push) Successful in 1m53s
build & deploy / deploy (push) Successful in 1m12s
2026-03-11 23:54:24 -04:00
c89b434d18
[tests] Add tests for the context processor
build & deploy / test (push) Successful in 1m39s
build & deploy / deploy (push) Successful in 21s
2026-03-11 17:09:06 -04:00
e83f922e32
[format] Blacken tests
build & deploy / test (push) Successful in 1m38s
build & deploy / deploy (push) Successful in 20s
2026-03-11 16:50:17 -04:00
d38e960897
[scrobbles] Add same change to mopidy (album_id)
build & deploy / deploy (push) Has been cancelled
build & deploy / test (push) Has been cancelled
2026-03-11 16:08:31 -04:00
88a8b8320c
[scrobbles] Save album_id to log
2026-03-11 15:57:57 -04:00
5d9834b63d
[scrobbles] Fix note str output
build & deploy / test (push) Successful in 1m41s
build & deploy / deploy (push) Has been skipped
2026-03-11 11:35:01 -04:00
5b8559efd0
[scrobbles] Add raw data storage to Jellyfins scrobbles
build & deploy / test (push) Successful in 1m46s
build & deploy / deploy (push) Has been skipped
2026-03-08 17:00:25 -04:00
7d8e1ac817
[tests] Add tests for koreader and views
build & deploy / test (push) Successful in 1m44s
build & deploy / deploy (push) Has been skipped
2026-03-08 01:05:17 -05:00
770a51b9c0
[foods] Add recipe website parsing
build & deploy / test (push) Failing after 1m10s
build & deploy / deploy (push) Has been skipped
2026-03-06 10:46:34 -05:00
2d8f433314
[tests] Fix slow aggregation tests
2026-03-02 10:30:32 -05:00
d1844c01a0
[tests] Speed up tests
2026-03-02 09:19:36 -05:00
3851624dd7
[tests] Fix IMDB test and bump reqs
2025-11-17 20:09:34 -05:00
b4dbbb4211
[boardgames] Deprecate failing tests
2025-11-02 23:45:34 -05:00
a8747dfe77
Update all the places we need base_run_time_seconds now
2025-11-02 21:18:52 -05:00
56ee14512d
[podcasts] Actually test new lookup method
2025-10-14 11:30:57 -04:00
b8dd3ee258
[tests] Shim to fix broken import
2025-08-03 11:13:23 -04:00
1531b77b5c
[tests] Fix metadata test
2025-07-30 13:59:11 -04:00
9514861b32
[tests] Skip failing tests
2025-07-19 21:09:51 -04:00
257e6899d3
[tests] Clean up podcast tests
2025-04-07 13:40:32 -04:00
bcc3f46806
[tests] We dont differentiate on albums anymore
2025-04-07 12:39:57 -04:00
6c461ed55f
[tests] Simplify view tests to not mess with time
2025-04-07 12:30:54 -04:00
28cf57c6dd
[tests] Try fixing CI breaking with small seconds
2025-04-07 09:56:10 -04:00
0bb874f1db
[scrobblers] Fixes test with wiggly second
2025-04-07 00:12:29 -04:00
16091c9053
[tests] Skips the podcast scrobble tests, no Google Podcast
2025-03-27 16:50:42 -04:00
e02010e409
[videos] Fix skip for youtube tests
2025-03-27 16:35:23 -04:00