Relax JSON schema and update deps (#19)
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful

Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
Reviewed-on: #19
This commit is contained in:
2024-12-24 19:27:15 +00:00
parent 541b69a853
commit 6b2ebdffba
12 changed files with 174 additions and 96 deletions

View File

@@ -187,8 +187,7 @@ type GymAttendance =
[<JsonRequired>]
TotalPeopleInGym : int
/// How many people are in classes at the gym as of this statistics snapshot
[<JsonRequired>]
TotalPeopleInClasses : int
TotalPeopleInClasses : int option
/// E.g. " or fewer"
TotalPeopleSuffix : string option
/// Whether the number of people in the gym is approximate. This appears to become true when the number
@@ -219,10 +218,10 @@ type GymAttendance =
$" out of %i{this.MaximumCapacity} maximum"
let classes =
if this.TotalPeopleInClasses = 0 then
""
else
$"\n%i{this.TotalPeopleInClasses} in classes"
match this.TotalPeopleInClasses with
| None
| Some 0 -> ""
| Some totalPeopleInClasses -> $"\n%i{totalPeopleInClasses} in classes"
$"""%i{this.TotalPeopleInGym}%s{totalPeopleSuffix} in gym%s{capacity} (is exact: %c{Char.emoji (not this.IsApproximate)})%s{classes}
Query made at %s{this.AttendanceTime.ToString "s"}%s{this.AttendanceTime.ToString "zzz"}