Skip to content

Commit

Permalink
Add Evaluate... fields for Mandate (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippluca authored Jan 10, 2025
2 parents f673ce4 + cd1dd6b commit 6561b1c
Show file tree
Hide file tree
Showing 9 changed files with 469 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
dotnet-version: "8.0"

- name: Install dotnet-ef
run: dotnet tool install --global dotnet-ef

- name: Install dependencies
run: dotnet restore Geopilot.sln

Expand All @@ -35,6 +38,10 @@ jobs:
working-directory: ./src/Geopilot.Frontend
run: npm run lint

- name: Check migration history
working-directory: ./src/Geopilot.Api
run: dotnet ef migrations has-pending-model-changes

- name: Start test db
run: docker compose up -d --wait --wait-timeout 30 db

Expand Down
3 changes: 3 additions & 0 deletions src/Geopilot.Api/ContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public static void SeedMandates(this Context context)
.RuleFor(o => o.Id, f => 0)
.RuleFor(o => o.Name, f => f.Commerce.ProductName())
.RuleFor(o => o.FileTypes, f => f.PickRandom(knownFileFormats, 4).Distinct().ToArray())
.RuleFor(o => o.EvaluatePrecursorDelivery, f => f.PickRandom<FieldEvaluationType>())
.RuleFor(o => o.EvaluatePartial, f => f.PickRandom<FieldEvaluationType>())
.RuleFor(o => o.EvaluateComment, f => f.PickRandom<FieldEvaluationType>())
.RuleFor(o => o.SpatialExtent, f => GetExtent())
.Ignore(o => o.Coordinates)
.RuleFor(o => o.Organisations, f => f.PickRandom(context.Organisations.ToList(), 1).ToList())
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6561b1c

Please sign in to comment.