Skip to content

Create stg classes#30

Merged
RJO23 merged 4 commits into
mainfrom
create-stg-classes
Apr 10, 2026
Merged

Create stg classes#30
RJO23 merged 4 commits into
mainfrom
create-stg-classes

Conversation

@RJO23
Copy link
Copy Markdown
Collaborator

@RJO23 RJO23 commented Apr 2, 2026

  • Cleaned text.
  • Wrote standard, unit and accepted values tests.
  • Calculated class duration.

@harjeetkalsi
Copy link
Copy Markdown
Collaborator

Can you link the ticket please?

@RJO23
Copy link
Copy Markdown
Collaborator Author

RJO23 commented Apr 2, 2026

#5

Comment thread models/staging/stg_classes.yml
Comment thread models/staging/stg_classes.sql
Comment thread models/staging/stg_classes.yml
Copy link
Copy Markdown
Collaborator

@rosie-taylor rosie-taylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a unit test to this? Something that double checks edge cases (e.g. for duration)

Comment thread models/staging/stg_classes.yml
Comment thread models/staging/stg_classes.yml Outdated
- name: duration_minutes
description: "Calculated length of the class in minutes."
tests:
- not_null No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there accepted values for this? like 30, 45 and 60? maybe check

…d data types to avoid conflicts. Also added two missing class categories.
Copy link
Copy Markdown
Collaborator

@EmilyYoung26 EmilyYoung26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice and clean and I can see you've made all the changes and added a singular test similar to my one. Nice job!

Comment thread tests/singular_tests/stg_classes_start_time_before_end_time.sql
Comment thread models/staging/stg_classes.sql Outdated
Comment thread models/staging/stg_classes.yml
Comment thread models/staging/stg_classes.yml Outdated
- accepted_values:
arguments:
values: ['Boxing Basics', 'Boxing Conditioning', 'Evening Boxing', 'Express HIIT', 'Flow Yoga', 'HIIT Blast', 'Lunch Yoga', 'Mobility Reset', 'Morning Muay Thai', 'Morning Pilates', 'Muay Thai Advanced', 'Muay Thai Fundamentals', 'Pilates Core', 'Restore Yoga', 'Stretch & Recover']
values: ['Express Hiit', 'Hiit Blast', 'Boxing Basics', 'Boxing Conditioning', 'Evening Boxing', 'Express HIIT', 'Flow Yoga', 'HIIT Blast', 'Lunch Yoga', 'Mobility Reset', 'Morning Muay Thai', 'Morning Pilates', 'Muay Thai Advanced', 'Muay Thai Fundamentals', 'Pilates Core', 'Restore Yoga', 'Stretch & Recover']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class_name accepted values should match the actual cleaned output of initcap(trim(class_name)). Right now it looks like a mix of raw and cleaned values, especially around HIIT/Hiit. For example, because initcap would turn:

HIIT Blast into Hiit Blast
Express HIIT into Express Hiit

We shouldnt have the raw version in the accepted values as we are checking they turned into the clean version.

Copy link
Copy Markdown
Collaborator

@harjeetkalsi harjeetkalsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good, just a few changes and things to think about.

Copy link
Copy Markdown
Collaborator

@EmilyYoung26 EmilyYoung26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice and clean, happy to approve! Great job 😄

@RJO23 RJO23 merged commit 0d1bb19 into main Apr 10, 2026
1 check passed
@RJO23 RJO23 deleted the create-stg-classes branch April 10, 2026 09:56
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.

4 participants