Skip to content

Commit

Permalink
Merge pull request #320 from LiamMorrow/renovate/all-minor-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamMorrow authored Nov 18, 2024
2 parents 6262ecd + 0388304 commit 07cb438
Show file tree
Hide file tree
Showing 18 changed files with 320 additions and 297 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.29.2",
"version": "0.30.1",
"commands": [
"dotnet-csharpier"
]
Expand Down
10 changes: 5 additions & 5 deletions LiftLog.Api/LiftLog.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

<ItemGroup>
<PackageReference Include="cuid.net" Version="6.0.0" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="FluentValidation" Version="11.11.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.11">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.10" />
<PackageReference Include="OpenAI-DotNet" Version="8.3.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
<PackageReference Include="OpenAI-DotNet" Version="8.4.1" />
<PackageReference Include="Google.Apis.AndroidPublisher.v3" Version="1.68.0.3576" />
</ItemGroup>

Expand Down
13 changes: 6 additions & 7 deletions LiftLog.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@
"notasecret",
X509KeyStorageFlags.Exportable
);
ServiceAccountCredential credential =
new(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { AndroidPublisherService.Scope.Androidpublisher },
}.FromCertificate(certificate)
);
ServiceAccountCredential credential = new(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { AndroidPublisherService.Scope.Androidpublisher },
}.FromCertificate(certificate)
);
return new AndroidPublisherService(
new AndroidPublisherService.Initializer
{
Expand Down
22 changes: 10 additions & 12 deletions LiftLog.Api/Service/GptAiWorkoutPlanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ public class GptAiWorkoutPlanner(OpenAIClient openAiClient, ILogger<GptAiWorkout
private static readonly JsonNode aiWorkoutPlanJsonSchema = JsonNode.Parse(
File.ReadAllText("./AiWorkoutPlan.json")
)!;
private static readonly Function GetGymPlanFunction =
new(
"GetGymPlan",
"Gets a gym plan based on the user's goals and attributes.",
aiWorkoutPlanJsonSchema
);
private static readonly Function GetGymPlanFunction = new(
"GetGymPlan",
"Gets a gym plan based on the user's goals and attributes.",
aiWorkoutPlanJsonSchema
);

private static readonly JsonNode sessionBlueprintJsonSchema = JsonNode.Parse(
File.ReadAllText("./AiSessionBlueprint.json")
)!;
private static readonly Function GetSessionFunction =
new(
"GetSession",
"Gets a gym session based on the user's goals and attributes.",
sessionBlueprintJsonSchema
);
private static readonly Function GetSessionFunction = new(
"GetSession",
"Gets a gym session based on the user's goals and attributes.",
sessionBlueprintJsonSchema
);

public async Task<AiWorkoutPlan> GenerateWorkoutPlanAsync(AiWorkoutAttributes attributes)
{
Expand Down
42 changes: 25 additions & 17 deletions LiftLog.Lib/Models/BlueprintModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ public record ExerciseBlueprint(
string Link
)
{
public static readonly ExerciseBlueprint Default =
new(
Name: string.Empty,
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 0,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: string.Empty,
Link: string.Empty
);
public static readonly ExerciseBlueprint Default = new(
Name: string.Empty,
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 0,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: string.Empty,
Link: string.Empty
);
}

public record KeyedExerciseBlueprint(string Name, int Sets, int RepsPerSet)
Expand Down Expand Up @@ -98,12 +97,21 @@ string when lowerName.EndsWith('s') => lowerName[..^1],

public record Rest(TimeSpan MinRest, TimeSpan MaxRest, TimeSpan FailureRest)
{
public static readonly Rest Short =
new(TimeSpan.FromSeconds(60), TimeSpan.FromSeconds(90), TimeSpan.FromSeconds(180));
public static readonly Rest Short = new(
TimeSpan.FromSeconds(60),
TimeSpan.FromSeconds(90),
TimeSpan.FromSeconds(180)
);

public static readonly Rest Medium =
new(TimeSpan.FromSeconds(90), TimeSpan.FromSeconds(180), TimeSpan.FromSeconds(300));
public static readonly Rest Medium = new(
TimeSpan.FromSeconds(90),
TimeSpan.FromSeconds(180),
TimeSpan.FromSeconds(300)
);

public static readonly Rest Long =
new(TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(8));
public static readonly Rest Long = new(
TimeSpan.FromMinutes(3),
TimeSpan.FromMinutes(5),
TimeSpan.FromMinutes(8)
);
}
9 changes: 7 additions & 2 deletions LiftLog.Lib/Models/SessionModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ public record Session(
decimal? Bodyweight
)
{
public static readonly Session Empty =
new(Guid.Empty, SessionBlueprint.Empty, [], DateOnly.MinValue, null);
public static readonly Session Empty = new(
Guid.Empty,
SessionBlueprint.Empty,
[],
DateOnly.MinValue,
null
);

public static Session FreeformSession(DateOnly date, decimal? bodyweight) =>
Empty with
Expand Down
4 changes: 2 additions & 2 deletions LiftLog.Maui/LiftLog.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
<PackageReference Include="Plugin.InAppBilling" Version="8.0.5" />
<PackageReference Include="Plugin.LocalNotification" Version="11.1.4" />
<PackageReference Include="Plugin.Maui.AppRating" Version="1.2.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.93" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.93" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.100" />
<PackageReference Include="Sentry.Maui" Version="4.13.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion LiftLog.Ui/LiftLog.Ui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="FuzzySharp" Version="2.0.2" />
<PackageReference Include="MaterialColorUtilities" Version="0.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Fluxor" Version="6.1.0" />
<PackageReference Include="Fluxor.Blazor.Web" Version="6.1.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
Expand Down
75 changes: 37 additions & 38 deletions LiftLog.Ui/Pages/Screenshot/ScreenshotCollectorPage.Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,43 @@ namespace LiftLog.Ui.Pages.Screenshot;

public partial class ScreenshotCollectorPage
{
private SessionBlueprint demoSessionBlueprint =
new(
Name: "Session 1",
Exercises:
[
new ExerciseBlueprint(
Name: "Squat",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
new ExerciseBlueprint(
Name: "Bench Press",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
new ExerciseBlueprint(
Name: "Deadlift",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
],
Notes: ""
);
private SessionBlueprint demoSessionBlueprint = new(
Name: "Session 1",
Exercises:
[
new ExerciseBlueprint(
Name: "Squat",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
new ExerciseBlueprint(
Name: "Bench Press",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
new ExerciseBlueprint(
Name: "Deadlift",
Sets: 3,
RepsPerSet: 10,
WeightIncreaseOnSuccess: 2.5m,
RestBetweenSets: Rest.Medium,
SupersetWithNext: false,
Notes: "",
Link: ""
),
],
Notes: ""
);

private async Task HandleHomeScreenshotCollection()
{
Expand Down
37 changes: 18 additions & 19 deletions LiftLog.Ui/Store/App/AppState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,24 @@ public record AppState(
(int Year, int Month)? HistoryYearMonth
)
{
public static readonly AppState InitialState =
new(
Title: "LiftLog",
IsHydrated: false,
ProState: new ProState(ProToken: null),
ReopenCurrentSessionTargets:
[
SessionTarget.WorkoutSession,
SessionTarget.HistorySession,
SessionTarget.FeedSession,
],
BackNavigationUrl: null,
LatestSettingsUrl: null,
HasRequestedNotificationPermission: false,
ColorScheme: new AppColorScheme<uint>(),
AppLaunchCount: 0,
AppRatingResult: AppRatingResult.NotRated,
HistoryYearMonth: null
);
public static readonly AppState InitialState = new(
Title: "LiftLog",
IsHydrated: false,
ProState: new ProState(ProToken: null),
ReopenCurrentSessionTargets:
[
SessionTarget.WorkoutSession,
SessionTarget.HistorySession,
SessionTarget.FeedSession,
],
BackNavigationUrl: null,
LatestSettingsUrl: null,
HasRequestedNotificationPermission: false,
ColorScheme: new AppColorScheme<uint>(),
AppLaunchCount: 0,
AppRatingResult: AppRatingResult.NotRated,
HistoryYearMonth: null
);
};

public enum AppRatingResult
Expand Down
Loading

0 comments on commit 07cb438

Please sign in to comment.