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

Python test runner umbrella issue #52536

Open
1 of 15 tasks
ojeytonwilliams opened this issue Dec 13, 2023 · 2 comments
Open
1 of 15 tasks

Python test runner umbrella issue #52536

ojeytonwilliams opened this issue Dec 13, 2023 · 2 comments
Labels
new python course platform: learn UI side of the client application that needs familiarity with React, Gatsby etc.

Comments

@ojeytonwilliams
Copy link
Contributor

ojeytonwilliams commented Dec 13, 2023

After #52526 goes in, the following issues will need addressing:

MVP

i18n (post-MVP)

  • Update the translation parser to handle Python comments

Nice to have

Refactors

  • Put code shared between test-evaluator and python-test-evaluator into a common module
  • Rather than using createTerminal to open and prepare term, use an async constructor to instantiate an object

At some point

  • Allow interruption of pyodide. This is quite hard because the security requirements for SharedArrayBuffer are high. As it stands, we cannot enable those headers and working out how (or even if) we can enable them is an involved process. First thing to do is to test interrupts locally to make 100% sure the UX is good (i.e. that it's significantly quicker to interrupt an infinite loop or a blocking input call than simply terminating and recreating the worker). If it's not, there's no need to investigate further.
  • If that is not feasible, one alternative is to allow cancellation of blocking input from the main thread. This would only be a partial solution, however. If, for example, the python runs an infinite loop, it would not be possible to cancel it without terminating the entire worker.
@ojeytonwilliams ojeytonwilliams added platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. new python course labels Dec 13, 2023
@ShaunSHamilton
Copy link
Member

UI: add buttons to run and cancel the learner's code

Instead of this, I still think having Campers type out python3 main.py in the terminal/preview/console thing is better.

Proxy errors to the console. We don't need to redirect stdout, since the terminal shows that, but errors do need to be shown ref. #52411

Personally, I have always disliked having a "Shell" and a "Console" (e.g. Replit). I would prefer we not do the same, and, instead have a single terminal we:

  1. Allow campers to type in
  2. Show the output of running the code in

I do not see benefit from further separating the experience to an actual dev/local environment.

@gikf
Copy link
Member

gikf commented Dec 21, 2023

I don't know where exactly put it on the list, so I'm linking here another python test runner issue: #52448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new python course platform: learn UI side of the client application that needs familiarity with React, Gatsby etc.
Projects
None yet
Development

No branches or pull requests

3 participants