Skip to content

refactor: ♻️ turn foer_besoegsdag into a single resource#93

Open
joelostblom wants to merge 6 commits into
refactor/sefnc-week-suffixfrom
refactor/foer_besoegsdag_week_suffix
Open

refactor: ♻️ turn foer_besoegsdag into a single resource#93
joelostblom wants to merge 6 commits into
refactor/sefnc-week-suffixfrom
refactor/foer_besoegsdag_week_suffix

Conversation

@joelostblom
Copy link
Copy Markdown

@joelostblom joelostblom commented May 27, 2026

Merge after #90

Description

This PR combines got a little bit more messy than the other ones because some fields were not in part of each visit and therefore some of them changed from being required to being optional.

But overall this PR does the following:

  • Combine foer_besoegsdag_2, foer_besoegsdag_3, and foer_besoegsdag_4 into one foer_besoegsdag resource.
  • Add a required visit field with values 2, 3, and 4, and include it in the primary key with event.
  • Normalize before-visit workflow field names by removing _wfv2, _wfv3, and _wfv4 suffixes.
  • Mark fields as optional when they are not present across all joined visits.
  • Remove visit-specific annotation text such as Visit 2, Visit 3, Visit 4, and Wfv2/Wfv3/Wfv4 when it only repeats the new visit field.

Closes #54

This PR needs an in-depth review.

Checklist

  • Ran just run-all

Normalize foer_besoegsdag visit-specific forms
into one resource schema with a visit field
so repeated workflow metadata is represented
by rows instead of suffixed resources.
Only remove foer_besoegsdag visit suffixes for the joined visits
so descriptions keep meaningful references to other visits and avoid doubled punctuation.
Update generated metadata
so foer_besoegsdag visits 2, 3, and 4 share one resource
with a visit key and normalized workflow fields.
Build the before-visit field-to-visits map with a reducer so common workflow fields are identified without nested filtering comprehensions.
@joelostblom joelostblom moved this from Todo to In review in Data development May 29, 2026
@joelostblom joelostblom marked this pull request as ready for review May 29, 2026 20:07
@joelostblom joelostblom requested a review from a team as a code owner May 29, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant