Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Curriculum Recommender fake curricula time stamps #57902

Merged
merged 1 commit into from Apr 9, 2024

Conversation

TurnerRiley
Copy link
Contributor

@TurnerRiley TurnerRiley commented Apr 9, 2024

Yesterday, there were flaky Curriculum Recommender unit tests. Nearly all the values are hard-coded to test the recommenders so my guess is that the flakiness came from setting the published dates and comparing them. If a curriculum was published within 1 or 2 years ago, it gains a certain number of points when being scored. Since the test curricula had hard-coded published dates that were right on the cusps (e.g. Today minus one year exactly), I think sometimes the test would run and a given curriculum would have been considered published within one year ago, and sometimes not (thus, why the failing test showed the curricula scores in the wrong order).

This PR increases each published date by one month so that there are no dates right on the cusp of scoring points or not.

Links

Slack discussion: here

Testing story

Tested locally and it's still passing.

@TurnerRiley TurnerRiley requested review from allison-code-dot-org and a team April 9, 2024 17:57
Copy link
Contributor

@hannahbergam hannahbergam left a comment

Choose a reason for hiding this comment

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

LGTM, though admittedly I didn't check to make sure they're a month in the correct direction (trusting drone here!)

@TurnerRiley TurnerRiley merged commit d0281b0 into staging Apr 9, 2024
2 checks passed
@TurnerRiley TurnerRiley deleted the increase-dates-by-month-recommender branch April 9, 2024 19:10
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.

None yet

2 participants