Skip to content

support configuring exercises by day of the week#474

Merged
garysheng merged 1 commit intoPeonPing:mainfrom
garfieldnate:main
Apr 18, 2026
Merged

support configuring exercises by day of the week#474
garysheng merged 1 commit intoPeonPing:mainfrom
garfieldnate:main

Conversation

@garfieldnate
Copy link
Copy Markdown
Contributor

This was done in a backwards-compatible manner, meaning
you can still use the old uniform (same every day) config, or
you can specify a schedule:

{
"trainer": {
"exercises": { "pushups": 300, "squats": 300 },
// or
"schedule": {
"mon": { "pushups": 400 },
"sun": { "squats": 0 }
}
}
}

At run-time, the schedule value for an exercise is prioritized over any value
for it that might be in the "exercises" object, in the case that both are in the
JSON config. However, from the command line if you set a schedule for
an exercise, then its uniform goal is removed, and vice versa if a uniform goal
is set.

Uses short weekday names: mon, tue, wed, thu, fri, sat, sun (full names like "monday" are also accepted and normalized)

All 28 trainer tests pass. There are some others that fail on my machine, but they're not anything that I touched as far as I can tell.

This was done with Claude. The agent got into some kind of forever-failing
loop related to some Python code getting messed up when piped into the
shell, so I ended up removing two usages of dictionary comprehensions to
get around that.

Fixes #323.

New day-centric schedule config structure:

{
     "trainer": {
          "exercises": { "pushups": 300, "squats": 300 },
          "schedule": {
               "mon": { "pushups": 400 },
               "sun": { "squats": 0 }
          }
     }
}

Schedule and uniform goals are mutually exclusive per exercise:
- Setting a day-specific goal removes any uniform goal
- Setting a uniform goal removes any schedule entries

Uses short weekday names: mon, tue, wed, thu, fri, sat, sun
(full names like "monday" are also accepted and normalized)

All 28 trainer tests pass.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

@garfieldnate is attempting to deploy a commit to the Gary Sheng's projects Team on Vercel.

A member of the Team first needs to authorize it.

@garysheng garysheng merged commit b7d1523 into PeonPing:main Apr 18, 2026
2 of 3 checks passed
garysheng added a commit that referenced this pull request Apr 18, 2026
- Day-of-week trainer schedule (PR #474, closes #323)
- README_ja.md updated with new trainer schedule commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

day of the week config for peon trainer

2 participants