Skip to content

Experience CS: Update name of ten-block-mission project and consistently use sentence case for project names #544

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

Merged
merged 4 commits into from
May 13, 2025

Conversation

floehopper
Copy link
Contributor

@floehopper floehopper commented May 13, 2025

See https://github.com/RaspberryPiFoundation/experience-cs/issues/451 & https://github.com/RaspberryPiFoundation/experience-cs/issues/454.

This renames a bunch of the seed Scratch projects used in Experience CS. See individual commit notes for details.

This changes the check for project existence to only consider projects
of type `Project::Types::SCRATCH`. Note that the `Project.only_scratch`
scope includes the call to `Project.unscoped`, so the only change is to
add `project_type: 'scratch'` to the query.
When I ran the rake task locally, I saw the following output:

    > bundle exec rake projects:create_experience_cs_examples
    Scratch project with identifier 'experience-cs-example' already exists
    Scratch project with identifier 'experience-cs-example' has not changed
    Scratch project with identifier 'dialogue-in-scratch' already exists
    Scratch project with identifier 'dialogue-in-scratch' has not changed
    Scratch project with identifier 'ten-block-mission' already exists
    Scratch project with identifier 'ten-block-mission' updated successfully
    Scratch project with identifier 'blank-scratch-starter' already exists
    Scratch project with identifier 'blank-scratch-starter' has not changed
    Scratch project with identifier 'lets-explore-scratch' already exists
    Scratch project with identifier 'lets-explore-scratch' has not changed
    Scratch project with identifier 'transforming-sprites' already exists
    Scratch project with identifier 'transforming-sprites' has not changed

This suggests that only the `ten-block-mission` project was updated as
intended. I then ran the following command to check the attributes for
that project had been updated correctly:

    > rails r "pp Project.only_scratch(true).find_by(identifier: 'ten-block-mission')"
     id: "2b037df1-3140-47ae-8c05-7dc83ea76a94",
     user_id: nil,
     name: "Ten Block Mission",
     identifier: "ten-block-mission",
     project_type: "scratch",
     created_at: Thu, 01 May 2025 15:01:55.815684000 UTC +00:00,
     updated_at: Tue, 13 May 2025 10:33:04.817462000 UTC +00:00,
     remixed_from_id: nil,
     locale: "en",
     remix_origin: nil,
     school_id: nil,
     lesson_id: nil,
     instructions: nil>

I can see that the name has been changed to "Ten Block Mission" as
expected. The only other attribute that had changed was the `updated_at`
as you would expect.
As per this issue [1]. I thought it was worth doing this aspect of that
issue now given that it tends to take a while to get changes to
editor-api deployed to production.

When I ran the rake task, I saw the following output which seemed to
make sense:

    > bundle exec rake projects:create_experience_cs_examples
    Scratch project with identifier 'experience-cs-example' already exists
    Scratch project with identifier 'experience-cs-example' updated successfully
    Scratch project with identifier 'dialogue-in-scratch' already exists
    Scratch project with identifier 'dialogue-in-scratch' has not changed
    Scratch project with identifier 'ten-block-mission' already exists
    Scratch project with identifier 'ten-block-mission' updated successfully
    Scratch project with identifier 'blank-scratch-starter' already exists
    Scratch project with identifier 'blank-scratch-starter' updated successfully
    Scratch project with identifier 'lets-explore-scratch' already exists
    Scratch project with identifier 'lets-explore-scratch' updated successfully
    Scratch project with identifier 'transforming-sprites' already exists
    Scratch project with identifier 'transforming-sprites' updated successfully

[1]: RaspberryPiFoundation/experience-cs#454
@cla-bot cla-bot bot added the cla-signed label May 13, 2025
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-api-p-update-ten-vyoekw May 13, 2025 10:52 Inactive
Copy link
Contributor

@chrisroos chrisroos left a comment

Choose a reason for hiding this comment

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

This all looks good to me, @floehopper 👍

I took a copy of the staging database (using ./bin/db-sync/staging-to-local.sh), ran rake projects:create_experience_cs_examples and observed the same output as in the message of the final commit in this PR.

@floehopper floehopper merged commit f348dfc into main May 13, 2025
3 checks passed
@floehopper floehopper deleted the update-ten-block-mission-project-for-experience-cs branch May 13, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants