Seed different project types - #987
Merged
Merged
Conversation
raspberrypiherokubot
temporarily deployed
to
editor-api-p-seed-other-ctb9ft
August 26, 2026 15:27
Inactive
zetter-rpf
marked this pull request as ready for review
August 26, 2026 15:37
zetter-rpf
force-pushed
the
seed-other-project-types
branch
from
August 26, 2026 15:57
be11b86 to
77502f7
Compare
raspberrypiherokubot
temporarily deployed
to
editor-api-p-seed-other-eccnnx
August 26, 2026 15:58
Inactive
Test coverage93.47% line coverage reported by SimpleCov. |
DNR500
approved these changes
Aug 26, 2026
DNR500
left a comment
Contributor
There was a problem hiding this comment.
Looks good, nice to have this to better support those test in LXIT
Previously the education seed tasks only ever created Python lessons/projects, with lesson names drawn from a random Faker programming language that had no relation to the actual project content. This made it harder to manually test school class flows, or run E2E tests, against Scratch or HTML/CSS lessons using the seed data. This change makes create_lessons build one lesson per entry in LESSON_PROJECT_TYPES (python, html/css, scratch) for a school class, naming each lesson after its project type (e.g. "Lesson 3 scratch") and generating a project with matching starter content via create_project: a .py component for Python, an .html/.css pair for HTML/CSS, and a Scratch component (seeded from lib/tasks/seed_data/lesson_scratch_starter.json) for Scratch. "Project type" is used instead of "language" throughout, since Scratch and HTML/CSS aren't languages. Both for_education.rake and test_seeds.rake share this behaviour, and the seeded school gets scratch_enabled set in both, matching the real constraint enforced when a teacher creates a Scratch lesson via LessonCreation#verify_lesson_scratch!. Existing specs for for_education and test_seeds are updated for the new lesson counts and assert on the specific lesson names/project types for the Scratch and HTML/CSS lessons.
These are both the same and are just used to represent the Scratch Starter project
This was added in as a stub before we saved projects to the db
zetter-rpf
force-pushed
the
seed-other-project-types
branch
from
August 27, 2026 13:19
77502f7 to
d474ec1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
What's changed?
Previously we only created Python projects in our seed data which made integration testing harder.
This PR also creates Scratch and HTML projects and gives them clearer names.
I've also turned the Scratch feature flag on for the School to make the setup for the Scratch tests simpler.
I've also changed the local dev seeds to use the same method, so it will be easier to test different projects in dev too.
Steps to perform after deploying to production
After this is deployed, https://github.com/RaspberryPiFoundation/learner-experience-integration-tests/pull/72
should be merged immediately after
Made with help from Claude