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

Mirror update button description in public API of CodeExercise #81

Closed
wants to merge 1 commit into from

Conversation

agoscinski
Copy link
Collaborator

@agoscinski agoscinski commented Nov 29, 2024

To improve the API from a user perspective we use the same naming for public functions that update a CodeExercise instance as the buttons as their description. This means renaming run_update to run_code and duplicating the functionality of the run_update with the function update, since the update button is called "Update" when no code is given on initialization. Since run_code was already taken we rename it to call_code

To improve the API from a user perspective we use the same naming for
public functions that update a `CodeExercise` instantce as the buttons
as their description. This means renaming `run_update` to `run_code` and
duplicating the functionality of the `run_update` with the function
`update`, since the update button is called "Update" when no `code` is
given on initalization. Since `run_code` was already taken we rename it
tc `call_code`
@agoscinski
Copy link
Collaborator Author

agoscinski commented Nov 30, 2024

I am not so convinced that this is actually better. Since "run_update" is more transparent to the teacher who gives an update function that runs the code, so it describes more what happens. We decided for "Run code" in the naming of the button because for the student who never sees the construction of the widget this is more intuitive.

We could rename update_func to update reflecting better the naming.

@agoscinski
Copy link
Collaborator Author

I favor the change update_func to update in PR #85

@agoscinski agoscinski closed this Nov 30, 2024
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.

1 participant