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

[CONTENT] Remove all start codes #4920

Merged
merged 13 commits into from
Dec 18, 2023
Merged

[CONTENT] Remove all start codes #4920

merged 13 commits into from
Dec 18, 2023

Conversation

Felienne
Copy link
Member

@Felienne Felienne commented Dec 18, 2023

Oops, my genius regex used in #4913 missed a few start_codes! This catches and removes them all

How to test
Please verify that there are no more occurrences of start_code in the adventure yamls

@ghost
Copy link

ghost commented Dec 18, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@rix0rrr
Copy link
Collaborator

rix0rrr commented Dec 18, 2023

I'm happy to ship it, but given that you asked for a double check, there are a number of other places where start_code is still referenced. Are you interested in removing these as well, or do you just want the current PR shipped?

tools/rewrite-content-yaml.py
52:    "start_code",

website/frontend_types.py
86:    start_code: str
103:            start_code='',  # Teacher adventures don't seem to have this

content/adventures/adventures.schema.json
43:        "start_code": { "type": "string" },

static/js/app.ts
247:      adventure.start_code = programFromLs.code;
556:          adventure.start_code = code;
1928:    theGlobalEditor.contents = adventure.start_code;
2027:  const programChanged = theGlobalEditor.contents !== adventure.start_code;
2037:  const programSuspiciouslyShrunk = wasSavedBefore && theGlobalEditor.contents.length < adventure.start_code.length * su [...]
2086:    adventure.start_code = code;
2093:    adventure.start_code = code;

static/js/types.ts
38:  start_code: string;

app.py
165:                start_code=adventure['levels'][level].get('start_code', ""))
182:    Mutates the adventures in-place, by setting the 'save_name', 'start_code'
208:        adventure.start_code = program.code
1224:                start_code=loaded_program.code,
1391:                start_code=loaded_program.code,
1515:                                               start_code=code,

Copy link
Contributor

mergify bot commented Dec 18, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 69b684d into main Dec 18, 2023
11 checks passed
@mergify mergify bot deleted the more-start-codes branch December 18, 2023 16:32
Copy link
Contributor

mergify bot commented Dec 18, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

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.

2 participants